Gstreamer 1.0:教程中的视频无法在MacOS上播放 [英] Gstreamer 1.0: Video from tutorials is not playing on MacOS
问题描述
我正在尝试编译本教程 Tutorial_01 在装有Xcode 7.2的MacOS 10.11.3上并且没有收到任何视频:我可以听到音频,但似乎视频窗口丢失了.
I am trying to compile this tutorial Tutorial_01 on my MacOS 10.11.3 with Xcode 7.2 and not getting any video: I can hear an audio but it seems like the video window is lost somewhere.
我尝试使用命令行gat-launch-1.0播放相同的媒体:
I tried playing the same media with command line gat-launch-1.0:
gst-launch-1.0 -v playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm
,并且可以在OpenGL Renderer中很好地打开媒体.
and it works just fine opening the media in OpenGL Renderer.
有什么想法吗?
预先感谢, 最高
更新:在调试模式下收到此警告:
Update: Getting this warning while in debug mode:
0:00:00.314802000 [336m64763[00m 0x7f93e4854a30 [32;01mFIXME [00m [00m videodecoder gstvideodecoder.c:1057:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vp8dec0>[00m Sub-class should implement drain()
推荐答案
看起来您需要在Mac上运行Glib事件循环.
looks like you need to run Glib event loop on mac.
定义变量
GMainLoop *main_loop;
然后在创建管道之后运行循环:
Then run loop after pipeline creation:
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
可能您需要回调来控制循环,因此您可以使用
g_timeout_add
.
Probably you need callback for controlling loop so you can use
g_timeout_add
.
希望有帮助
更新:
GStreamer总线-此链接也应提供帮助
GStreamer Bus - this link should help too
这篇关于Gstreamer 1.0:教程中的视频无法在MacOS上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!