Unable to create decodebin2 GstElement
Wim Taymans
wim.taymans at gmail.com
Mon Nov 19 04:59:47 PST 2012
On 11/19/2012 01:55 PM, 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)
You are linking against GStreamer 1.0. decodebin2 was renamed to
decodebin in GStreamer 1.0.
Wim
>
> 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