Problem while adding typefind functionality to a parser plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem while adding typefind functionality to a parser plugin

mohid
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Problem while adding typefind functionality to a parser plugin

Tim-Philipp Müller-2
On Wed, 2011-08-17 at 23:50 -0700, mohid wrote:

Hi,

> I have added typefind functionality to my wma parser plugin.

Ok. (To figure out the type of what exactly?)


> But after compilation when I check by gst-inspect, it is showing
> "wma_parser: a typefind fuction"
>
> But when I remove the type find functionality, gst-inspect is working fine.

So what is the problem? That your parser element doesn't show up any
more, only the typefind function? If so, my guess would be that you are
using the same name for the typefinder and your element..

Would be helpful to see the relevant parts of your code.

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem while adding typefind functionality to a parser plugin

mohid
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Problem while adding typefind functionality to a parser plugin

Tim-Philipp Müller-2
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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem while adding typefind functionality to a parser plugin

mohid
CONTENTS DELETED
The author has deleted this message.