mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
Add video/x-mng typefinding for completeness
Original commit message from CVS: Add video/x-mng typefinding for completeness
This commit is contained in:
parent
cf2adfbb33
commit
adb4ddd384
1 changed files with 18 additions and 0 deletions
|
@ -902,6 +902,21 @@ png_type_find (GstTypeFind *tf, gpointer unused)
|
|||
}
|
||||
}
|
||||
|
||||
/*** video/x-mng *******************/
|
||||
#define MNG_CAPS gst_caps_new ("mng_type_find", "video/x-mng", NULL)
|
||||
static void
|
||||
mng_type_find (GstTypeFind *tf, gpointer unused)
|
||||
{
|
||||
guint8 *data = gst_type_find_peek (tf, 0, 8);
|
||||
guint8 header[4] = {0x0D, 0x0A, 0x1A, 0x0A};
|
||||
|
||||
if (data && (data[0] == 0x8A) && memcmp (data + 1, "MNG", 3) == 0) {
|
||||
if (memcmp (data + 4, header, 4) == 0) {
|
||||
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MNG_CAPS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*** image/bmp *********************/
|
||||
#define BMP_CAPS gst_caps_new ("bmp_type_find", "image/bmp", NULL)
|
||||
static void
|
||||
|
@ -1048,6 +1063,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
static gchar * dv_exts[] = {"dv", NULL};
|
||||
static gchar * sid_exts[] = {"sid", NULL};
|
||||
static gchar * xcf_exts[] = {"xcf", NULL};
|
||||
static gchar * mng_exts[] = {"mng", NULL};
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (type_find_debug, "typefindfunctions", GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions");
|
||||
|
||||
|
@ -1109,6 +1125,8 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
|||
sid_type_find, sid_exts, SID_CAPS, NULL);
|
||||
gst_type_find_factory_register (plugin, "image/x-xcf", GST_ELEMENT_RANK_SECONDARY,
|
||||
xcf_type_find, xcf_exts, XCF_CAPS, NULL);
|
||||
gst_type_find_factory_register (plugin, "video/x-mng", GST_ELEMENT_RANK_SECONDARY,
|
||||
mng_type_find, mng_exts, MNG_CAPS, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue