<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
This code worked for me<br>
<blockquote><small>static void</small><br>
<small>sigint_restore (void)</small><br>
<small>{</small><br>
<small> struct sigaction action;</small><br>
<br>
<small> memset (&action, 0, sizeof (action));</small><br>
<small> action.sa_handler = SIG_DFL;</small><br>
<br>
<small> sigaction (SIGINT, &action, NULL);</small><br>
<small>}</small><br>
<br>
<br>
<small>static void</small><br>
<small>sigint_handler_sighandler (int signum)</small><br>
<small>{</small><br>
<small> g_print ("Caught interrupt -- ");</small><br>
<br>
<small> gst_element_send_event (pipeline, gst_event_new_eos ());</small><br>
<small> sigint_restore ();</small><br>
<small>}</small><br>
<br>
<br>
<small>static void</small><br>
<small>sigint_setup (void)</small><br>
<small>{</small><br>
<small> struct sigaction action;</small><br>
<br>
<small> memset (&action, 0, sizeof (action));</small><br>
<small> action.sa_handler = sigint_handler_sighandler;</small><br>
<br>
<small> sigaction (SIGINT, &action, NULL);</small><br>
<small>}</small><br>
</blockquote>
(with sigint_setup being called when I was ready in the main code).
<b>However, if I had problems with the pipeline</b>, sending eos was
useless. The pipeline problem would mean that the pipeline would
never signal that it had stopped.<br>
<br>
Ian<br>
<br>
<div class="moz-cite-prefix">On 30/01/2013 22:10, Wes Miller wrote:<br>
</div>
<blockquote cite="mid:1359583856379-4658253.post@n4.nabble.com"
type="cite">
<pre wrap="">I tried using sigaction instead fo signal. No help.
It's almost like the SIGKILL kills the gobjects before it get to my program.
Which of course makes no sense since gst-launch works perfectly well.
I note gst-launch has its own eventg loop (at least it looks like one).
Would that make a diffrence?
</pre>
</blockquote>
<br>
</body>
</html>