[gst-devel] Resetting base time in part of running pipeline

Arnout Vandecappelle arnout at mind.be
Wed Nov 12 14:23:55 CET 2008


 Hoi all,

 I have a pipeline running a live source, from which I tee off into a matroska 
filesink.  I have implemented dynamic replacement of this filesink without 
interrupting the pipeline.  Took a bit of trial-and-error to get the pad 
blocking right, but now this is working fine.

 However, the timestamps in the second and later files don't start from zero.  
That's pretty normal, since the live source is providing the buffer 
timestamps and is blissfully unaware of any changes in the pipeline.  
However, the result is that on some players, the playing will stall until so 
many seconds have elapsed and playing is in sync with the timestamps again.

 Therefore, I need to reset the buffer timestamps in the filesink branch so 
they start at zero.  I see several ways to do this (none simple).

 * Simply set the pipeline's base time to 0.  Unfortunately, this reset 
doesn't apply to any buffers already existing in the pipeline (e.g. in 
queues), so they'd have to be flushed out.  I'd prefer to avoid loosing 
buffers.

 * Perhaps something can be done with latencies (which I haven't studied in 
detail).  However, I expect also then some flushing will be required.

 * Create a new filter element that rebases buffer timestamps (a bit like 
videorate, but adding an offset rather than rounding to the framerate).

 I'd like to hear your suggestions about which path to choose.  If it turns 
out to be the third one, I'll put it in bugzilla as a patch to -plugins-bad 
(although it fits more in -base).

 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