Type Find Function Not Called in GStreamer Plugin

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Sat Feb 2 22:47:29 PST 2013


On Feb 2, 2013 1:12 AM, "johnwesting" <john.blank.westing at gmail.com> wrote:
>
> I have an element that decodes a media type, mytype for example. I want
to register the type so that the decodebin element can use my element if
needed. I added the code for what I thought would work, but my type_find()
function is never called. Any ideas on what I'm doing wrong? Here's what
the code looks like:
>
>     #define MY_CAPS (gst_static_caps_get(&my_caps))
>
>     static GstStaticCaps my_caps = GST_STATIC_CAPS("audio/x-mycaps");
>     static gchar *my_exts[] = { "mtype", NULL };

Is this supposed to be "mtype" or "mytype" here?

HTH,
-mandeep

>
>     static void type_find(GstTypeFind *_type_find, gpointer callback)
>     {
>        printf("Type Find Function\r\n");
>        gst_type_find_suggest(_type_find, GST_TYPE_FIND_POSSIBLE,
gst_static_caps_get(&my_caps));
>     }
>
>     gboolean plugin_init(GstPlugin *plugin)
>     {
>        if(!gst_type_find_register(plugin, "mytype", GST_RANK_PRIMARY,
type_find, my_exts, MY_CAPS, NULL, NULL))
>          return FALSE;
>
>        if(!gst_element_register(plugin, "myelement", GST_RANK_PRIMARY,
MY_ELEMENT_TYPE)
>           return FALSE;
>
>        return(TRUE);
>     }
>
>
> ________________________________
> View this message in context: Type Find Function Not Called in GStreamer
Plugin
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130203/2243fba8/attachment.html>


More information about the gstreamer-devel mailing list