在成功执行了几个教程后,尝试编译和运行示例 appsrc 代码。这是一个文档代码,应该可以运行,但是...
用于编译的命令
gcc appGuideAppSrc.c -o appGuide `pkg-config --cflags --libs gstreamer-0.10 gstreamer-app-0.10`
之后出现以下错误
appGuideAppSrc.c: In function ‘cb_need_data’:
appGuideAppSrc.c:14:8: warning: assignment makes pointer from integer without a cast [enabled by default]
appGuideAppSrc.c:18:25: error: lvalue required as left operand of assignment
好的,警告很好,但它引发错误的那一行似乎没问题
GST_BUFFER_PTS (buffer) = timestamp;
根据@Michal 下面的回答,将其更改为 TIMESTAMP 并收到以下错误
(appGuide:11043): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed
(appGuide:11043): GStreamer-CRITICAL **: gst_bin_add_many: assertion `GST_IS_ELEMENT (element_1)' failed
(appGuide:11043): GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT (element_1)' failed
(appGuide:11043): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed
(appGuide:11043): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(appGuide:11043): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
任何输入?
参考:
整个appsrc示例代码