running GStreamer as a background process/daemon

Tim Müller tim at centricular.com
Tue Jun 24 15:24:17 PDT 2014


On Tue, 2014-06-24 at 15:41 +0200, Sergei Vorobyov wrote:

Hi Sergei,

> To make my GStreamer app unsinkable (sad to say the GStreamer
> sometimes freezes after a few days of intensive repetitive usage with
> dynamic pipes, caps, etc)

Would be great if you could file bugs about etc, esp. if you can connect
to it with gdb when it freezes and get a stack trace for all threads
(thread apply all bt) and maybe make a graph of the pipeline. Not so
easy of course.

>  I decided to start, monitor, and relaunch when needed my media player
> as a background process. Trouble is:
> 
> 
> the background process fails in the very beginning at
> 
> 
> if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
>                                          GST_STATE_CHANGE_FAILURE) {
>             LOG_ERROR("failed to set pipeline to PLAYING");
>             EXIT(-1);
> }
> 
> 
> whereas it always works OK in the foreground mode.
> 
> 
> Note that my
> 
> 
> Display *display = XOpenDisplay (":0");
> 
> 
> Window window = XCreateWindow(display, ...
> 
> 
> 
> gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sink), window);
> 
> 
> 
> (where sink is ximagesink; I am trying to overlay my ximagesink over
> an X-window)
> 
> 
> all work OK in the fore- and background modes.
> 
> 
> Of course, I cannot test the void result
> of gst_video_overlay_set_window_handle.

So you are saying that the explicit
gst_video_overlay_set_window_handle() always works? And what exactly
does not always work then? Letting the video sink create the window
itself? And what is the error message you get on the bus when it fails?

Cheers
 -Tim


-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list