From 57f7d57c91f785d75afc0560f8cd68f2193c14ef Mon Sep 17 00:00:00 2001 From: Santiago Seifert Date: Thu, 26 Aug 2021 10:59:01 +0000 Subject: [PATCH] Fix paragraph in MediaMuxer's javadoc Originally I meant to fix the "applicaton" typo. Then I saw the width exceeded 100 columns, and then I noticed that some sentences were redundant, latin was being used, etc. So I generally reworked the paragraph. I believe a full javadoc review is due. Change-Id: I584b844a1083c2b66623fbdff7c8002da2e914ad Test: Not applicable. --- media/java/android/media/MediaMuxer.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/media/java/android/media/MediaMuxer.java b/media/java/android/media/MediaMuxer.java index ac19c21ae0854..b8e7930e1dcac 100644 --- a/media/java/android/media/MediaMuxer.java +++ b/media/java/android/media/MediaMuxer.java @@ -69,17 +69,14 @@ import java.util.Map;

Metadata Track

- Per-frame metadata is useful in carrying extra information that correlated with video or audio to - facilitate offline processing, e.g. gyro signals from the sensor could help video stabilization when - doing offline processing. Metadata track is only supported in MP4 container. When adding a new - metadata track, track's mime format must start with prefix "application/", e.g. "applicaton/gyro". - Metadata's format/layout will be defined by the application. Writing metadata is nearly the same as - writing video/audio data except that the data will not be from mediacodec. Application just needs - to pass the bytebuffer that contains the metadata and also the associated timestamp to the - {@link #writeSampleData} api. The timestamp must be in the same time base as video and audio. The - generated MP4 file uses TextMetaDataSampleEntry defined in section 12.3.3.2 of the ISOBMFF to signal - the metadata's mime format. When using{@link android.media.MediaExtractor} to extract the file with - metadata track, the mime format of the metadata will be extracted into {@link android.media.MediaFormat}. + Per-frame metadata carries information that correlates with video or audio to facilitate offline + processing. For example, gyro signals from the sensor can help video stabilization when doing + offline processing. Metadata tracks are only supported when multiplexing to the MP4 container + format. When adding a new metadata track, the MIME type format must start with prefix + "application/" (for example, "application/gyro"). The format of the metadata is + application-defined. Metadata timestamps must be in the same time base as video and audio + timestamps. The generated MP4 file uses TextMetaDataSampleEntry (defined in section 12.3.3.2 of + the ISOBMFF specification) to signal the metadata's MIME type.

    MediaMuxer muxer = new MediaMuxer("temp.mp4", OutputFormat.MUXER_OUTPUT_MPEG_4);