Name queue20 is not unique in bin , not adding - when connecting uridecodebin to queue2

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Oct 4 01:25:52 PDT 2011


On Tue, 2011-10-04 at 10:43 +0800, Stuart Gray wrote:

> In trying to connect uridecodebin to queue2 I get the following output
> from gstreamer:
>
> (<unknown>:1363): GStreamer-WARNING **: Name queue20 is not unique in
> bin , not adding
>
> My code is as follows:
> 
>         pipeline = gst_pipeline_new("");
> 
>         uriDecodebin = gst_element_factory_make("uridecodebin", NULL);
> 
>         g_object_set(G_OBJECT(uriDecodebin), "buffer-size", 150000,
> NULL);
>         g_object_set(G_OBJECT(uriDecodebin), "download", false, NULL);
>         g_object_set(G_OBJECT(uriDecodebin), "use-buffering", false,
> NULL);
>         g_signal_connect(G_OBJECT(uriDecodebin), "drained",
> G_CALLBACK(sourceDrainedCallback), this);
>         /* connect uridecodebin to _sourceQ when it creates its output
> pad */
>         g_signal_connect(G_OBJECT(uriDecodebin), "pad-added",
> G_CALLBACK(callbackPadAdded), this);
> 
>         outputBin = gst_bin_new("output-bin");
> ...
>         _sourceQ = gst_element_factory_make("queue2", NULL);
>         gst_bin_add_many(GST_BIN(outputBin), _sourceQ, _pcmSink,
> NULL); 
> ...

What does your callbackPadAdded look like?

I'm guessing you are creating "queue" elements in there. It's basically
a bug in the way GStreamer creates default names for elements if you
don't specify one. The first "queue2" instance will get named "queue20"
and the twentieth "queue" instance will get named "queue20" as well,
which may cause problems if you are using both at the same time. It's
hard to change now though, because it would break code that relies on
the the naming scheme.

In this case, you could just use a normal queue instead of queue2 before
the sink (or just not use a queue at all?).

Cheers
 -Tim




More information about the gstreamer-devel mailing list