mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
typefindfunctions: Add support HEIF file format finding
A HEIF compatiable file (i.e., mif1 brand) needs special concern since 'moov' atom is not mandatory for the file although HEIF is a variant of ISOBMFF See http://standards.iso.org/ittf/PubliclyAvailableStandards/c066067_ISO_IEC_23008-12_2017.zip
This commit is contained in:
parent
4e80ea6473
commit
909b59dd55
1 changed files with 10 additions and 0 deletions
|
@ -3350,6 +3350,12 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (STRNCMP (&data[4], "ftypmif1", 8) == 0) {
|
||||||
|
tip = GST_TYPE_FIND_MAXIMUM;
|
||||||
|
variant = "heif";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* box/atom types that are in common with ISO base media file format */
|
/* box/atom types that are in common with ISO base media file format */
|
||||||
if (STRNCMP (&data[4], "moov", 4) == 0 ||
|
if (STRNCMP (&data[4], "moov", 4) == 0 ||
|
||||||
STRNCMP (&data[4], "mdat", 4) == 0 ||
|
STRNCMP (&data[4], "mdat", 4) == 0 ||
|
||||||
|
@ -3395,6 +3401,10 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
|
||||||
tip = GST_TYPE_FIND_MAXIMUM;
|
tip = GST_TYPE_FIND_MAXIMUM;
|
||||||
variant = "iso";
|
variant = "iso";
|
||||||
goto done;
|
goto done;
|
||||||
|
} else if (STRNCMP (&data[new_offset], "mif1", 4) == 0) {
|
||||||
|
tip = GST_TYPE_FIND_MAXIMUM;
|
||||||
|
variant = "heif";
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
new_offset += 4;
|
new_offset += 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue