<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Arnout,<br>
<br>
Thanks heaps again for your reply. I tried the 'identity' idea at the
end of last week, and the test was apparently very successful ....
except that the person who tested it stopped the stream source before
stopping the saveStream script, so the script exited on it's own accord
because of the received EOS. I have only just this morning updated the
script, and it will hopefully be tested in the next few days.<br>
<br>
Now, when the Perl script receives a signal to exit, it blocks the src
pad of the souphttpsrc element, and then sends an EOS signal to the
next element in the pipe. The script then ends on it's own accord upon
seeing the EOS signal on the bus.<br>
<br>
Thanks for your help! Much appreciated! Hopefully this test will
produce what we want! :)<br>
<br>
H<br>
<br>
Arnout Vandecappelle wrote:
<blockquote cite="mid:200902020953.39866.arnout@mind.be" type="cite">
<pre wrap="">On Friday 30 January 2009 11:02:07 Hayden Andrews wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm going to try the 'identity' idea as your element is not yet in the
build of GStreamer that is on the production machine.
</pre>
</blockquote>
<pre wrap=""><!---->
I doubt it ever will be since there are no sponsors for it.
</pre>
<blockquote type="cite">
<pre wrap="">I'm not filled with confidence when you suggest that something else is
bound to go wrong! Is this not a fairly standard scenario?
</pre>
</blockquote>
<pre wrap=""><!---->[snip]
Although I never actually tried it, I think the identity single-segment thing
will do want you want automatically if you select your chunk using a seek
event. The seek event will be interpreted by the demuxer, and I believe it
will send a synchronous newsegment on all its src pads.
</pre>
<blockquote type="cite">
<pre wrap="">I guess that I should be sending this EOS to the
pipe before calling quit() ??? How do I go about doing that?
</pre>
</blockquote>
<pre wrap=""><!---->
I don't know how to do it in perl, but it's probably similar to the way you
do it in C.
You have to push an EOS event to an element or a pad upstream from the mixer.
You can choose any element, but probably the source element (souphttpsrc?) is
the easiest. In C it would be something like:
gst_pad_send_event(srcelement, gst_event_new_eos());
Actually, it's possible that just setting the source element state to NULL is
sufficient to trigger the EOS. You anyway have to set the source element
state to NULL, otherwise it will keep on pushing buffers after the EOS, which
is not allowed.
After sending the EOS, you can wait for an EOS message to appear on the bus.
This message indicates that all sinks have recieved an EOS. After that you
can tear down the pipeline.
Regards,
Arnout
</pre>
</blockquote>
</body>
</html>