[gst-devel] Saving a live stream

Arnout Vandecappelle arnout at mind.be
Mon Feb 2 09:53:39 CET 2009


On Friday 30 January 2009 11:02:07 Hayden Andrews wrote:
> 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.

 I doubt it ever will be since there are no sponsors for it.

> I'm not filled with confidence when you suggest that something else is
> bound to go wrong! Is this not a fairly standard scenario?
[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.


> I guess that I should be sending this EOS to the
> pipe before calling quit() ??? How do I go about doing that?

 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

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  D206 D44B 5155 DF98 550D  3F2A 2213 88AA A1C7 C933




More information about the gstreamer-devel mailing list