[gst-devel] totem and osssink? (long)

Martin Soto soto at informatik.uni-kl.de
Fri Mar 12 14:01:01 CET 2004


On Fri, 2004-03-12 at 15:07, Benjamin Otte wrote:
> Well, I don't think you can force the same time on both disconts. Imagine 
> having essentially two pipelines, one being { v4lsrc ! 
> some_cache_that_allows_seeking_back } ! xvideosink, the other being { osssrc ! 
> some_cache_that_allows_seeking_back } ! osssink
> 
> So just tell the 2 elements to always use the same time whenever possible.
> Kinda like this:
> GstSynchronize *sync = gst_synchronize_new ();
> gst_synchronize_set_master (sync, GST_SYNCHRONIZABLE (audiosink));
> gst_synchronize_add_slave (sync, GST_SYNCHRONIZABLE (videosink));
> [...]

What would it really mean that the two pipelines "use the same time"?
I'd define it as the two _sources_ timestamping the material using the
same clock (for example, a clock provided by the osssrc). So first, of
all, you'd have to specify something like

sync1 = gst_synchronize_new ();
gst_synchronize_set_master (sync1, GST_SYNCHRONIZABLE (osssrc));
gst_synchronize_add_slave (sync1, GST_SYNCHRONIZABLE (v4lsrc));

this guarantees that material comes properly timestamped from the
sources. Now, in order to synchronize the playback, you say

sync2 = gst_synchronize_new ();
gst_synchronize_set_master (sync2, GST_SYNCHRONIZABLE (osssink));
gst_synchronize_add_slave (sync2, GST_SYNCHRONIZABLE (xvideosink));

> gst_synchronize_seek (sync, GST_SEEK_SET, my_timestamp);
> And now GstSynchronize magically makes sure that both elements stay in sync. 
> Maybe it even throws an error when it's not possible to keep them synced.

Looks plausible. Since I never played with seeking in GStreamer, I can
not imagine what sort of events would be sent in this case. But, all in
all, it makes sense.

M. S.
-- 
Martin Soto <soto at informatik.uni-kl.de>





More information about the gstreamer-devel mailing list