Improve documentation for metadataSampleEntry method
PiperOrigin-RevId: 529693415
This commit is contained in:
parent
c2da310718
commit
954b694b42
@ -226,20 +226,18 @@ import java.util.Locale;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a metadata sample entry box.
|
* Returns a text metadata sample entry box as per ISO/IEC 14496-12: 8.5.2.2.
|
||||||
*
|
*
|
||||||
* <p>This contains the sample entry (to be placed within the sample description box) for metadata
|
* <p>This contains the sample entry (to be placed within the sample description box) for the text
|
||||||
* tracks.
|
* metadata tracks.
|
||||||
*
|
|
||||||
* <p>The mett box corresponds to text metadata sample entry.
|
|
||||||
*/
|
*/
|
||||||
public static ByteBuffer metadataSampleEntry(Format format) {
|
public static ByteBuffer textMetaDataSampleEntry(Format format) {
|
||||||
ByteBuffer contents = ByteBuffer.allocate(Mp4Utils.MAX_FIXED_LEAF_BOX_SIZE);
|
ByteBuffer contents = ByteBuffer.allocate(Mp4Utils.MAX_FIXED_LEAF_BOX_SIZE);
|
||||||
String mimeType = checkNotNull(format.sampleMimeType);
|
String mimeType = checkNotNull(format.sampleMimeType);
|
||||||
byte[] mimeBytes = Util.getUtf8Bytes(mimeType);
|
byte[] mimeBytes = Util.getUtf8Bytes(mimeType);
|
||||||
contents.put(mimeBytes);
|
contents.put(mimeBytes); // content_encoding
|
||||||
contents.put((byte) 0x00);
|
contents.put((byte) 0x00);
|
||||||
contents.put(mimeBytes);
|
contents.put(mimeBytes); // mime_format
|
||||||
contents.put((byte) 0x00);
|
contents.put((byte) 0x00);
|
||||||
|
|
||||||
contents.flip();
|
contents.flip();
|
||||||
|
@ -99,7 +99,7 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
|
|||||||
? Boxes.videoSampleEntry(format)
|
? Boxes.videoSampleEntry(format)
|
||||||
: (isAudio
|
: (isAudio
|
||||||
? Boxes.audioSampleEntry(format)
|
? Boxes.audioSampleEntry(format)
|
||||||
: Boxes.metadataSampleEntry(format)));
|
: Boxes.textMetaDataSampleEntry(format)));
|
||||||
ByteBuffer stts = Boxes.stts(sampleDurationsVu);
|
ByteBuffer stts = Boxes.stts(sampleDurationsVu);
|
||||||
ByteBuffer stsz = Boxes.stsz(track.writtenSamples());
|
ByteBuffer stsz = Boxes.stsz(track.writtenSamples());
|
||||||
ByteBuffer stsc = Boxes.stsc(track.writtenChunkSampleCounts());
|
ByteBuffer stsc = Boxes.stsc(track.writtenChunkSampleCounts());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user