Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gstreamer 1.0: Video from tutorials is not playing on MacOS

Tags:

c

gstreamer

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()
like image 840
Max Golovanchuk Avatar asked Feb 01 '16 17:02

Max Golovanchuk


2 Answers

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

like image 194
Dmitry Paloskin Avatar answered Nov 15 '22 04:11

Dmitry Paloskin


I don't think playbin2 is still a valid source plugin anymore. It's functionality has been migrated into playbin (I think).

But anyway - check the error codes if something is not working. They usually give a good readable error of what is wrong.

gstreamer.com Is not an official resource of the gstreamer project and focuses on the outdated 0.10 release branch. I recommend looking for examples at http://gstreamer.freedesktop.org. Even the gstreamer.com start page recommends that.

like image 39
Florian Zwoch Avatar answered Nov 15 '22 04:11

Florian Zwoch