Commit 6dbfdecb by ccwu Committed by Oliver Woodman

Let the mp4 extractor support "camm" metadata tracks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139626848
parent 4a30dff5
......@@ -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() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment