Emulating behavior of gst-launch -e in gst program
Wes Miller
wmiller at sdr.com
Wed Jan 30 09:04:07 PST 2013
I read several posts on this topic here and elsewhere, but none answered my
question.
Given any program that implements a gst pipeline either using
gst_parse_launch() or a fully coded pipeline. how do I capture an external
/ctrl-c/ and turn it into a graceful shutdown?
I currently have a gst_parse_launch() pipeline that works well enough to map
my mic to my speakers. The gst_pipeline variable, /my_pipeline,/ is global
and at pipeline creation time does contain a nonzero value.
I also have a signal catcher in place with actions to handle SIGINT and
SIGKILL. Print statements prove that the sighandler does get called when I
/ctrl-c/ or send the program a /kill -9/. However, in the signal handler
/my_pipeline/ equals 0, so I can't use
gst_element_send_event( my_pipeline, gst_event_new_eos() );
I copied the eos handler out of gst_launch as best I could. It managed to
require the multiple /ctrl-c/'s, but /my_pipeline/ is still 0 by the time
the sighandler is launched.
Thanks for any help.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Emulating-behavior-of-gst-launch-e-in-gst-program-tp4658243.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list