add support s263

This commit is contained in:
ood_tsen 2015-07-22 21:08:38 +08:00
parent 85e0bca33d
commit cf2e539a31
5 changed files with 11 additions and 3 deletions

View File

@ -92,6 +92,8 @@ import java.util.List;
public static final int TYPE_stco = Util.getIntegerCodeForString("stco");
public static final int TYPE_co64 = Util.getIntegerCodeForString("co64");
public static final int TYPE_tx3g = Util.getIntegerCodeForString("tx3g");
public static final int TYPE_s263 = Util.getIntegerCodeForString("s263");
public static final int TYPE_d263 = Util.getIntegerCodeForString("d263");
public final int type;

View File

@ -336,7 +336,8 @@ import java.util.List;
int childAtomType = stsd.readInt();
if (childAtomType == Atom.TYPE_avc1 || childAtomType == Atom.TYPE_avc3
|| childAtomType == Atom.TYPE_encv || childAtomType == Atom.TYPE_mp4v
|| childAtomType == Atom.TYPE_hvc1 || childAtomType == Atom.TYPE_hev1) {
|| childAtomType == Atom.TYPE_hvc1 || childAtomType == Atom.TYPE_hev1
|| childAtomType == Atom.TYPE_s263) {
parseVideoSampleEntry(stsd, childStartPosition, childAtomSize, durationUs, holder, i);
} else if (childAtomType == Atom.TYPE_mp4a || childAtomType == Atom.TYPE_enca
|| childAtomType == Atom.TYPE_ac_3) {
@ -387,6 +388,9 @@ import java.util.List;
Pair<List<byte[]>, Integer> hvcCData = parseHvcCFromParent(parent, childStartPosition);
initializationData = hvcCData.first;
out.nalUnitLengthFieldLength = hvcCData.second;
} else if (childAtomType == Atom.TYPE_d263) {
Assertions.checkState(mimeType == null);
mimeType = MimeTypes.VIDEO_H263;
} else if (childAtomType == Atom.TYPE_esds) {
Assertions.checkState(mimeType == null);
Pair<String, byte[]> mimeTypeAndInitializationData =

View File

@ -697,7 +697,7 @@ public final class FragmentedMp4Extractor implements Extractor {
|| atom == Atom.TYPE_trun || atom == Atom.TYPE_mvex || atom == Atom.TYPE_mdia
|| atom == Atom.TYPE_minf || atom == Atom.TYPE_stbl || atom == Atom.TYPE_pssh
|| atom == Atom.TYPE_saiz || atom == Atom.TYPE_uuid || atom == Atom.TYPE_senc
|| atom == Atom.TYPE_pasp;
|| atom == Atom.TYPE_pasp || atom == Atom.TYPE_s263;
}
/** Returns whether the extractor should parse a container atom with type {@code atom}. */

View File

@ -365,7 +365,8 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|| atom == Atom.TYPE_avc1 || atom == Atom.TYPE_avcC || atom == Atom.TYPE_mp4a
|| atom == Atom.TYPE_esds || atom == Atom.TYPE_stts || atom == Atom.TYPE_stss
|| atom == Atom.TYPE_ctts || atom == Atom.TYPE_stsc || atom == Atom.TYPE_stsz
|| atom == Atom.TYPE_stco || atom == Atom.TYPE_co64 || atom == Atom.TYPE_tkhd;
|| atom == Atom.TYPE_stco || atom == Atom.TYPE_co64 || atom == Atom.TYPE_tkhd
|| atom == Atom.TYPE_s263;
}
/** Returns whether the extractor should parse a container atom with type {@code atom}. */

View File

@ -37,6 +37,7 @@ public class MimeTypes {
public static final String VIDEO_VP8 = BASE_TYPE_VIDEO + "/x-vnd.on2.vp8";
public static final String VIDEO_VP9 = BASE_TYPE_VIDEO + "/x-vnd.on2.vp9";
public static final String VIDEO_MP4V = BASE_TYPE_VIDEO + "/mp4v-es";
public static final String VIDEO_H263 = BASE_TYPE_VIDEO + "/3gpp";
public static final String AUDIO_MP4 = BASE_TYPE_AUDIO + "/mp4";
public static final String AUDIO_AAC = BASE_TYPE_AUDIO + "/mp4a-latm";