Getting the element factory name.

Sameer Naik sameer.subscriptions at damagehead.com
Fri Jun 3 10:21:53 PDT 2011


thanks.

On Fri, Jun 3, 2011 at 10:02 PM, Michael Smith <msmith at xiph.org> wrote:
> GST_ELEMENT_NAME on an element will give you the element name. If
> that's what you want - great.
>
> However, you ASKED for the element factory name. For that, you can use
> GST_PLUGIN_FEATURE_NAME(elementfactory).
>
> Note that you want to call this on the element factory, NOT the element.
>
> Mike
>
>
> On Fri, Jun 3, 2011 at 8:51 AM, Sameer Naik
> <sameer.subscriptions at damagehead.com> wrote:
>> 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
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list