running GStreamer as a background process/daemon
Sergei Vorobyov
sergei.vorobyov at facilitylabs.com
Tue Jun 24 15:31:20 PDT 2014
I resolved the problem by simply adding the explicit export DISPLAY=:0.0 to
the script:
#!/bin/bash
case $1 in
start)
echo $$ > /var/run-usr/mp.pid;
export DISPLAY=:0.0
exec 2>&1 /path/to/my/mp 1>/dev/null ;;
although the apparently equivalent (to export DISPLAY=:0.0)
Display *display = XOpenDisplay (":0");
nor
Display *display = XOpenDisplay (":0.0");
in the mp code don't help. This was the problem!
On Tue, Jun 24, 2014 at 3:41 PM, Sergei Vorobyov <
sergei.vorobyov at facilitylabs.com> wrote:
> 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) 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.
>
> Any ideas? Thanks!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140625/6e11d34b/attachment.html>
More information about the gstreamer-devel
mailing list