Getting the element factory name.

Sameer Naik sameer.subscriptions at damagehead.com
Fri Jun 3 08:51:57 PDT 2011


I just checked up on how gst_bin_get_by_name () call works.

children = gst_bin_iterate_recurse (bin);
result = gst_iterator_find_custom (children, (GCompareFunc)
compare_name, (gpointer) name);
gst_iterator_free (children);

And in the compare_name function
eq = strcmp (GST_ELEMENT_NAME (element), name);

It seems GST_ELEMENT_NAME () is how it is supposed to be done. Looks
like something is wrong in my code.

Thanks
~Sameer

On Fri, Jun 3, 2011 at 9:01 PM, Sameer Naik
<sameer.subscriptions at damagehead.com> wrote:
> Hello,
>
> I am using the gstreamer-0.10.34. I would like to know how do i get
> the name of an element factory.
> I create an element, say
>
> GstElement *element;
> GstElementFactory *factory;
>
> element = gst_element_factory_make ("queue2", NULL);
> factory = gst_element_get_factory (element);
>
> I need to query the factory such that it return "queue2" as its name.
>
> In an earlier release of gstreamer i used to call:
> factoryname = GST_ELEMENT_NAME (factory);
>
> And i would get the factoryname as "queue2". But in the 0.10.34
> release it returns "elementfactoryXXX", where XXX is a random number.
> I am writing a function to return a reference to am element belonging
> to a particular factory.
>
> Thanks and Regards
> ~Sameer
>


More information about the gstreamer-devel mailing list