Add support for 'mett' sample description
PiperOrigin-RevId: 333272292
This commit is contained in:
parent
7b51797d4b
commit
69ca49f939
@ -355,6 +355,9 @@ import java.util.List;
|
|||||||
@SuppressWarnings("ConstantCaseForConstants")
|
@SuppressWarnings("ConstantCaseForConstants")
|
||||||
public static final int TYPE_camm = 0x63616d6d;
|
public static final int TYPE_camm = 0x63616d6d;
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantCaseForConstants")
|
||||||
|
public static final int TYPE_mett = 0x6d657474;
|
||||||
|
|
||||||
@SuppressWarnings("ConstantCaseForConstants")
|
@SuppressWarnings("ConstantCaseForConstants")
|
||||||
public static final int TYPE_alac = 0x616c6163;
|
public static final int TYPE_alac = 0x616c6163;
|
||||||
|
|
||||||
|
@ -891,6 +891,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
|| childAtomType == Atom.TYPE_c608) {
|
|| childAtomType == Atom.TYPE_c608) {
|
||||||
parseTextSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId,
|
parseTextSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId,
|
||||||
language, out);
|
language, out);
|
||||||
|
} else if (childAtomType == Atom.TYPE_mett) {
|
||||||
|
parseMetaDataSampleEntry(stsd, childAtomType, childStartPosition, trackId, out);
|
||||||
} else if (childAtomType == Atom.TYPE_camm) {
|
} else if (childAtomType == Atom.TYPE_camm) {
|
||||||
out.format =
|
out.format =
|
||||||
new Format.Builder()
|
new Format.Builder()
|
||||||
@ -1097,6 +1099,18 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void parseMetaDataSampleEntry(
|
||||||
|
ParsableByteArray parent, int atomType, int position, int trackId, StsdData out) {
|
||||||
|
parent.setPosition(position + Atom.HEADER_SIZE + StsdData.STSD_HEADER_SIZE);
|
||||||
|
if (atomType == Atom.TYPE_mett) {
|
||||||
|
parent.readNullTerminatedString(); // Skip optional content_encoding
|
||||||
|
@Nullable String mimeType = parent.readNullTerminatedString();
|
||||||
|
if (mimeType != null) {
|
||||||
|
out.format = new Format.Builder().setId(trackId).setSampleMimeType(mimeType).build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the edts atom (defined in ISO/IEC 14496-12 subsection 8.6.5).
|
* Parses the edts atom (defined in ISO/IEC 14496-12 subsection 8.6.5).
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user