mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
typefindfunctions: Add various CMAF brands to the MP4 typefinder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
This commit is contained in:
parent
041bc2652b
commit
37a744889c
1 changed files with 34 additions and 0 deletions
|
@ -3412,6 +3412,27 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
|
|||
guint64 size;
|
||||
const gchar *variant = NULL;
|
||||
static const gchar *qt_brands[] = { "qt " };
|
||||
static const gchar *cmaf_brands[] = {
|
||||
"cmf2",
|
||||
"cmfc",
|
||||
/* CMAF AVC */
|
||||
"cfsd",
|
||||
"cfhd",
|
||||
"chdf",
|
||||
/* CMAF AAC */
|
||||
"caac",
|
||||
"caaa",
|
||||
/* CMAF CEA closed captions */
|
||||
"ccea",
|
||||
/* CMAF HEVC */
|
||||
"chhd",
|
||||
"chh1",
|
||||
"cud8",
|
||||
"cud1",
|
||||
"chd1",
|
||||
"clg1"
|
||||
/* TODO: CMAF WebVTT / IMSC1 */
|
||||
};
|
||||
static const gchar *iso_brands[] = {
|
||||
"isom",
|
||||
"avc1",
|
||||
|
@ -3445,6 +3466,12 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
|
|||
break;
|
||||
}
|
||||
|
||||
if (ftyp_brand_is (&data[8], cmaf_brands, G_N_ELEMENTS (cmaf_brands))) {
|
||||
tip = GST_TYPE_FIND_MAXIMUM;
|
||||
variant = "cmaf";
|
||||
break;
|
||||
}
|
||||
|
||||
if (ftyp_brand_is (&data[8], iso_brands, G_N_ELEMENTS (iso_brands))) {
|
||||
tip = GST_TYPE_FIND_MAXIMUM;
|
||||
variant = "iso";
|
||||
|
@ -3530,6 +3557,13 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
|
|||
goto done;
|
||||
new_offset = 12;
|
||||
while (new_offset + 4 <= size) {
|
||||
if (ftyp_brand_is (&data[new_offset], cmaf_brands,
|
||||
G_N_ELEMENTS (cmaf_brands))) {
|
||||
tip = GST_TYPE_FIND_MAXIMUM;
|
||||
variant = "cmaf";
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ftyp_brand_is (&data[new_offset], iso_brands,
|
||||
G_N_ELEMENTS (iso_brands))) {
|
||||
tip = GST_TYPE_FIND_MAXIMUM;
|
||||
|
|
Loading…
Reference in a new issue