Unable to create decodebin2 GstElement
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Mon Nov 19 04:55:51 PST 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basicgst.c
Type: text/x-csrc
Size: 720 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121119/27e7646d/attachment.c>
More information about the gstreamer-devel
mailing list