mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
typefindfunctions: add audio/audible typefinder
https://bugzilla.gnome.org/show_bug.cgi?id=715050
This commit is contained in:
parent
5e8e6276cd
commit
ddda5866c5
1 changed files with 26 additions and 0 deletions
|
@ -5325,6 +5325,29 @@ pva_type_find (GstTypeFind * tf, gpointer private)
|
||||||
gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, PVA_CAPS);
|
gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, PVA_CAPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*** audio/audible ***/
|
||||||
|
|
||||||
|
/* derived from pyaudibletags
|
||||||
|
* http://code.google.com/p/pyaudibletags/source/browse/trunk/pyaudibletags.py
|
||||||
|
*/
|
||||||
|
|
||||||
|
static GstStaticCaps aa_caps = GST_STATIC_CAPS ("audio/audible");
|
||||||
|
|
||||||
|
#define AA_CAPS gst_static_caps_get(&aa_caps)
|
||||||
|
|
||||||
|
static void
|
||||||
|
aa_type_find (GstTypeFind * tf, gpointer private)
|
||||||
|
{
|
||||||
|
const guint8 *data;
|
||||||
|
|
||||||
|
data = gst_type_find_peek (tf, 4, 4);
|
||||||
|
if (data == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (data[0] == 0x57 && data[1] == 0x90 && data[2] == 0x75 && data[3] == 0x36)
|
||||||
|
gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, AA_CAPS);
|
||||||
|
}
|
||||||
|
|
||||||
/*** generic typefind for streams that have some data at a specific position***/
|
/*** generic typefind for streams that have some data at a specific position***/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -5721,6 +5744,9 @@ plugin_init (GstPlugin * plugin)
|
||||||
TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-xi", GST_RANK_SECONDARY,
|
TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-xi", GST_RANK_SECONDARY,
|
||||||
"xi", "Extended Instrument: ", 21, GST_TYPE_FIND_MAXIMUM);
|
"xi", "Extended Instrument: ", 21, GST_TYPE_FIND_MAXIMUM);
|
||||||
|
|
||||||
|
TYPE_FIND_REGISTER (plugin, "audio/audible", GST_RANK_MARGINAL,
|
||||||
|
aa_type_find, "aa,aax", AA_CAPS, NULL, NULL);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue