Unix signal handling in GStreamer app

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Unix signal handling in GStreamer app

daniel-2
Hi,
I have registered SIGINT handler using g_unix_signal_add(), to
gracefully close app when user presses Ctrl-C. In my pipeline I use
autovideosink, which uses X server to display graphics. When it connects
to local X server (DISPLAY=:0), everything works as expected. However
when I want to connect to X server running on another machine
(DISPLAY=192.168.100.10:0.0), my SIGINT handler stops working. I suspect
that X video sink registers its own handler and removes my one.

gst-launch somehow handles this properly. I have checked its code for
some hints, but did not find anything obvious. Additionally it
implements its own event loop, instead of g_main_loop_run() which I use
in my app.

How to properly handle SIGINT in my app?

Regards,
Daniel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel