Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GStreamer tutorial not working

Tags:

c

gstreamer

I'm working my way through the GStreamer documentation. I'm running on OSX 10.8.5 and I can initalize GStreamer using the example 4.1 code (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-init.html) from the command line with gcc eg41.c -o eg41 -framework GStreamer -I/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers

and similar for example 4.2. Now I'm wanting to work through the tutorials that come with the SDK. I've copied the whole "tutorials" folder and can compile the first one with gcc basic-tutorial-1.c -o basic1 -framework GStreamer -I/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers

However, when I try to run the basic1 file, I get the following error message:

(basic1:62265): GStreamer-CRITICAL **: GstStateChangeReturn gst_element_set_state(GstElement *, GstState): assertion 'GST_IS_ELEMENT (element)' failed

(basic1:62265): GStreamer-CRITICAL **: GstBus *gst_element_get_bus(GstElement *): assertion 'GST_IS_ELEMENT (element)' failed

(basic1:62265): GStreamer-CRITICAL **: GstMessage *gst_bus_timed_pop_filtered(GstBus *, GstClockTime, GstMessageType): assertion 'GST_IS_BUS (bus)' failed

(basic1:62265): GStreamer-CRITICAL **: void gst_object_unref(gpointer): assertion 'object != NULL' failed

(basic1:62265): GStreamer-CRITICAL **: GstStateChangeReturn gst_element_set_state(GstElement *, GstState): assertion 'GST_IS_ELEMENT (element)' failed

(basic1:62265): GStreamer-CRITICAL **: void gst_object_unref(gpointer): assertion 'object != NULL' failed

What am I missing here?

Thanks so much!

like image 328
ThatGuy Avatar asked Mar 19 '23 14:03

ThatGuy


1 Answers

(Modifying the apparently helpful comment to an actual answer since this seems like a common problem...)

The GStreamer SDK (and the relevant documentation) is still based on Gstreamer 0.10. The example code in this case uses playbin2: if you want to try the same code with Gstreamer 1.0, you'll need to change that to playbin -- otherwise it looks fine.

With regards to API differences between 0.10 vs 1.0 in general, there is a list of changes in the docs.

like image 95
Jussi Kukkonen Avatar answered Apr 02 '23 13:04

Jussi Kukkonen