typefind: Added "dash" and "avc3" fourCC codes to qt_type_find.

This commit adds detection of the "dash" and "avc3" compatible brands
in qt_type_find.

Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new
structure for fragmented MP4 called "avc3". The principal difference
between AVC1 and AVC3 is the location of the codec initialisation
data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV
box (moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in
the first sample of every fragment (i.e. the first sample in each mdat
box).  The principal reason for avc3 is to make it easier for client
implementations, because it removes the requirement to insert the
SPS+PPS in to the decoder pipeline every time there is a representation
change.

https://bugzilla.gnome.org/show_bug.cgi?id=702004
This commit is contained in:
Alex Ashley 2013-06-10 16:06:21 +01:00 committed by Sebastian Dröge
parent d400188452
commit 7240e2e38c

View file

@ -3011,7 +3011,8 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
break;
}
if (STRNCMP (&data[4], "ftypisml", 8) == 0) {
if (STRNCMP (&data[4], "ftypisml", 8) == 0 ||
STRNCMP (&data[4], "ftypavc3", 8) == 0) {
tip = GST_TYPE_FIND_MAXIMUM;
variant = "iso-fragmented";
break;
@ -3051,7 +3052,9 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
if (data == NULL)
goto done;
if (STRNCMP (&data[4], "isom", 4) == 0 ||
STRNCMP (&data[4], "dash", 4) == 0 ||
STRNCMP (&data[4], "avc1", 4) == 0 ||
STRNCMP (&data[4], "avc3", 4) == 0 ||
STRNCMP (&data[4], "mp41", 4) == 0 ||
STRNCMP (&data[4], "mp42", 4) == 0) {
tip = GST_TYPE_FIND_MAXIMUM;