Unable to create decodebin2 GstElement
Krzysztof Konopko
krzysztof.konopko at youview.com
Mon Nov 19 05:00:43 PST 2012
Hi Mandeep,
Your app is referring to GStreamer-1.0 which does not include decodebin2
(removed and replaced with "decodebin"). Use "decodebin" in your app
instead.
The reason it works with gst-launch is that it refers to your
GStreamer-0.10.x installation. If you want to mimic your app behaviour
on the command line use gst-launch-1.0 instead. You should see a similar
error as in your app.
HTH,
Kris
On 19/11/12 12:55, Mandeep Sandhu wrote:
> Hi All,
>
> I'm stumped by a very simple issue. Somehow I'm not able to create a
> decodebin2 element.
>
> This is how I create it:
>
> GstElement *pipeline, *source, *decoder;
>
> /* Initialisation */
> gst_init (&argc, &argv);
>
> /* Create gstreamer elements */
> pipeline = gst_pipeline_new ("av-player");
> source = gst_element_factory_make ("filesrc", "source");
> decoder = gst_element_factory_make ("decodebin2", "decodebin2");
>
> if (!pipeline || !source || !decoder) {
> g_print("pip:%p src:%p dec:%p \n", pipeline, source, decoder);
> g_printerr ("One element could not be created. Exiting.\n");
> return -1;
> }
>
> The "decoder" is always NULL!
>
> deocdebin2 works fine when used from gst-launch app. I'm attaching a
> compilable sample code which illustrates this issue. I'm compiling it
> using the following cmd:
>
> $ gcc -Wall basicgst.c -o basicgst $(pkg-config --cflags --libs gstreamer-1.0)
>
> It must be something trivial as I've not seen anyone complain about
> not being able to instantiate the decodebin2 element. Though I can't
> figure out what the issue might be! :/
>
> Any hints appreciated.
>
> Thanks,
> -mandeep
>
>
>
> _______________________________________________
> 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