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

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=, 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?

gstreamer-devel mailing list
[hidden email]