Problem while adding typefind functionality to a parser plugin
Tim-Philipp Müller
t.i.m at zen.co.uk
Thu Aug 18 07:40:43 PDT 2011
On Thu, 2011-08-18 at 07:19 -0700, mohid wrote:
> When I add the below modifications, it didn't work.
>
> static gboolean
> plugin_init (GstPlugin * plugin)
> {
> if (!gst_element_register (plugin, "TEL_WMA_Parser", ...)
> return FALSE;
>
> if (!gst_type_find_register (plugin, "TEL_WMA_Parser", ...)
> return FALSE;
>
> return gst_element_register (plugin, "TEL_WMA_Parser", GST_RANK_PRIMARY,
> GST_TYPE_WMA_PARSER);
> }
>
> I am not sure whether I am allowed to register both as an element and
> typefind in the same plugin_init()
You are allowed to do that.
However, you need to register them with different names. Here you use
the same name ("TEL_WMA_Parser") for all the plugin features, that won't
work.
Also, you are registering your parser element twice if I'm not mistaken.
So try:
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "TEL_WMA_Parser", ...)
return FALSE;
if (!gst_type_find_register (plugin, "TEL_WMA_Typefinder", ...)
return FALSE;
return TRUE;
}
or so.
Cheers
-Tim
More information about the gstreamer-devel
mailing list