mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Let the mp4 extractor support "camm" metadata tracks.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139626848
This commit is contained in:
parent
4a30dff524
commit
6dbfdecbe0
3 changed files with 8 additions and 0 deletions
|
|
@ -133,6 +133,7 @@ import java.util.List;
|
|||
public static final int TYPE_vp08 = Util.getIntegerCodeForString("vp08");
|
||||
public static final int TYPE_vp09 = Util.getIntegerCodeForString("vp09");
|
||||
public static final int TYPE_vpcC = Util.getIntegerCodeForString("vpcC");
|
||||
public static final int TYPE_camm = Util.getIntegerCodeForString("camm");
|
||||
|
||||
public final int type;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import java.util.List;
|
|||
private static final int TYPE_subt = Util.getIntegerCodeForString("subt");
|
||||
private static final int TYPE_clcp = Util.getIntegerCodeForString("clcp");
|
||||
private static final int TYPE_cenc = Util.getIntegerCodeForString("cenc");
|
||||
private static final int TYPE_meta = Util.getIntegerCodeForString("meta");
|
||||
|
||||
/**
|
||||
* Parses a trak atom (defined in 14496-12).
|
||||
|
|
@ -541,6 +542,8 @@ import java.util.List;
|
|||
} else if (trackType == TYPE_text || trackType == TYPE_sbtl || trackType == TYPE_subt
|
||||
|| trackType == TYPE_clcp) {
|
||||
return C.TRACK_TYPE_TEXT;
|
||||
} else if (trackType == TYPE_meta) {
|
||||
return C.TRACK_TYPE_METADATA;
|
||||
} else {
|
||||
return C.TRACK_TYPE_UNKNOWN;
|
||||
}
|
||||
|
|
@ -621,6 +624,9 @@ import java.util.List;
|
|||
out.format = Format.createTextSampleFormat(Integer.toString(trackId),
|
||||
MimeTypes.APPLICATION_CEA608, null, Format.NO_VALUE, 0, language, drmInitData);
|
||||
out.requiredSampleTransformation = Track.TRANSFORMATION_CEA608_CDAT;
|
||||
} else if (childAtomType == Atom.TYPE_camm) {
|
||||
out.format = Format.createSampleFormat(Integer.toString(trackId),
|
||||
MimeTypes.APPLICATION_CAMERA_MOTION, null, Format.NO_VALUE, drmInitData);
|
||||
}
|
||||
stsd.setPosition(childStartPosition + childAtomSize);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public final class MimeTypes {
|
|||
public static final String APPLICATION_VOBSUB = BASE_TYPE_APPLICATION + "/vobsub";
|
||||
public static final String APPLICATION_PGS = BASE_TYPE_APPLICATION + "/pgs";
|
||||
public static final String APPLICATION_SCTE35 = BASE_TYPE_APPLICATION + "/x-scte35";
|
||||
public static final String APPLICATION_CAMERA_MOTION = BASE_TYPE_APPLICATION + "/x-camera-motion";
|
||||
|
||||
private MimeTypes() {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue