Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
836 views
in Technique[技术] by (71.8m points)

c - Gstreamer 1.0: Video from tutorials is not playing on MacOS

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.

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

and it works just fine opening the media in OpenGL Renderer.

Any ideas?

Thanks in advance, Max

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()
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

looks like you need to run Glib event loop on mac.

Define the variable

GMainLoop *main_loop;

Then run loop after pipeline creation:

main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);

Probably you need callback for controlling loop so you can use g_timeout_add.

Hope it helps

Update:

GStreamer Bus - this link should help too


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...