[gst-devel] Gstreamer queries

René Stadler mail at renestadler.de
Mon Oct 8 14:24:14 CEST 2007


Am Dienstag, den 18.09.2007, 15:28 +0530 schrieb Praveen Kumar:
> Hi ,
> 
> I have following queries regarding GStreamer. Please help me in this regard.
> 
> 1. How will application choose between plug-ins which are already existing and
>    newly implemented  plug-in of same kind.

I'm not sure I understand this question.  I'll assume you want to know
how for example a newer (better) mp3 decoder element gets chosen over an
older one.  This can only be done automatically if the application does
not explicitly hard code a specific decoder but instead uses decodebin
(or playbin or decodebin2).  The decodebin element implements
auto-plugging of decoders, and if two or more elements are found which
decode the same format, the one with the higher rank will get chosen.  A
plugin sets an element's rank in the call to gst_element_register.

> 2. Do we always need to give different element factory names for each
> element in a
>    pipeline. Assume pipeline has 3 elements. Whats is the
> implication/purpose of  giving 3 different names for 3 elements
> creation?
>    What is the effect in giving one factory name  for all 3 elements creation?

First I need to point out that it seems you are mistaking the element
factory name for the element (object instance) name.  The 
gst_element_factory_make function takes the factory name and a name for
the object as arguments.  I guess your question is about the second
argument here.

The API docs mention somewhere that the element (object) name should be
unique inside a bin (therefore also inside a pipeline).  However, this
is currently not enforced anywhere.  This might change in the future of
course.  The purpose is probably to allow gst_bin_get_by_name to return
a well defined result, so you need to avoid name collisions there.

I don't really see your issue with that, though.  Since you ask if you
can just use the same name for different elements, you obviously are not
interested in gst_bin_get_by_name usage.  This means that you don't have
to care about the name at all.  Note that gst_element_factory_make
allows you to simply pass NULL for the name.  It will then give the
element instance a name that is guaranteed to be unique.

> 3. Difference in linking elements present in a bin and linking pads
> present in the respective elements.
> 
> regards,
> -Praveen

The third question isn't clear to me.  Are you asking why you cannot
link the pad of an element that is inside a bin to a pad that is outside
of this bin directly?

-- 
Regards,
  René Stadler






More information about the gstreamer-devel mailing list