GStreamer教程不起作用

Tha*_*Guy 4 c gstreamer

我正在通过GStreamer文档工作.我正在OSX 10.8.5上运行,我可以使用示例4.1代码(http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-init.html)从中获取GStreamer的资格.命令行gcc eg41.c -o eg41 -framework GStreamer -I/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers

和类似的例如4.2.现在我想要完成SDK附带的教程.我复制了整个"教程"文件夹,可以编译第一个gcc basic-tutorial-1.c -o basic1 -framework GStreamer -I/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers

但是,当我尝试运行basic1文件时,我收到以下错误消息:

(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
Run Code Online (Sandbox Code Playgroud)

我在这里错过了什么?

非常感谢!

Jus*_*nen 7

(修改对实际答案显然有帮助的评论,因为这似乎是一个常见的问题...)

GStreamer SDK(以及相关文档)仍然基于Gstreamer 0.10.本中的示例代码使用playbin2:如果您想使用Gstreamer 1.0尝试相同的代码,则需要将其更改为playbin- 否则看起来很好.

关于一般的0.10和1.0之间的API差异,文档中有一个更改列表.