uridecodebin - creating bin and adding to pipeline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

uridecodebin - creating bin and adding to pipeline

stuart68
Hi,

Can someone help me get this right. I want to create a bin which uses uridecodebin and then add it to my pipeline. I have certain signal and properties I wish to set on uridecodebin, here is the code:

        pipeline = gst_pipeline_new("");

        GstElement* uriDecodebin = gst_bin_new("uridecodebin");
        gst_bin_add(GST_BIN(pipeline), uriDecodebin);

        g_signal_connect(uriDecodebin, "pad-added", G_CALLBACK(callbackPadAdded), this);
        g_signal_connect(uriDecodebin, "drained", G_CALLBACK(sourceDrainedCallback), this);
       
        bool useBuffering = false;
        g_object_set(G_OBJECT(uriDecodebin),
                        "buffer-size", 150000,
                        "download", "false",
                        "use-buffering", useBuffering,
                        NULL);

When I try to run this I get:

(<unknown>:1371): GLib-GObject-WARNING **: gsignal.c:2273: signal `drained' is invalid for instance `0x483030'

(<unknown>:1371): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstBin' has no property named `buffer-size'

(<unknown>:1371): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion `GST_IS_ELEMENT (dest)' failed

Thanks,
Stuart

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: uridecodebin - creating bin and adding to pipeline

michael smith-6-3
On Mon, Oct 3, 2011 at 4:33 AM, Stuart Gray <[hidden email]> wrote:
> Hi,
>
> Can someone help me get this right. I want to create a bin which uses
> uridecodebin and then add it to my pipeline. I have certain signal and
> properties I wish to set on uridecodebin, here is the code:
>
>         pipeline = gst_pipeline_new("");
>
>         GstElement* uriDecodebin = gst_bin_new("uridecodebin");

You're creating an (empty) bin called 'uridecodebin'.

You wanted to create an instance of the 'uridecodebin' element (which
you may also have wanted to call 'uridecodebin', but that doesn't
really matter):

   GstElement *uriDecodebin = gst_element_factory_make("uridecodebin", NULL);


>         gst_bin_add(GST_BIN(pipeline), uriDecodebin);
>
>         g_signal_connect(uriDecodebin, "pad-added",
> G_CALLBACK(callbackPadAdded), this);
>         g_signal_connect(uriDecodebin, "drained",
> G_CALLBACK(sourceDrainedCallback), this);
>
>         bool useBuffering = false;
>         g_object_set(G_OBJECT(uriDecodebin),
>                         "buffer-size", 150000,
>                         "download", "false",
>                         "use-buffering", useBuffering,
>                         NULL);

And 'download' is a boolean property - pass a gboolean, not a string, for that.

Mike
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel