[gst-devel] syncronizing multiple pipelines

Attila RS avgrind911 at gmail.com
Fri Apr 16 19:26:47 CEST 2010


I'm working on a app that needs to dynamically add/remove outputs without
affecting already active outputs. Below is a simple example.

1. Receive an RTP stream with audio/video and playback both.
2. Stop audio output associated with the above stream.
3. Receive a 2nd RTP stream with audio and playback audio.
4. Stop 2nd RTP stream.
5. Connect audio output back to the first RTP stream without affecting the
video.

In order to be able to dynamically add/remove outputs I have separated the
input (udpsrc/depay/demux), the video output (decode/vidsink) and the audio
output (decode/audsink) into 3 separate pipelines and link them together
with ghost pads. This seems to work well for doing the above controls, but I
have 2 problems.

1. Synchronization is a mess. It looks like each pipeline is using a
different clock and as a result audio/video is out of sync.
2. Adding a new output pipeline to a running input pipeline result in out of
sync clocks, so the newly added output thinks it is too far ahead/behind and
just dumps all data instead of outputting it. Disabling sync and the newly
added pipeline starts playing fine, but of course it is out of sync.

I think the second problem can probably be improved or eliminated by forcing
a new segment event when linking the output, but still the clocks need to
be synchronized between the pipelines in order for a/v to sync correctly and
playback smoothly.

Any thoughts on how to better handle these problems? Maybe forcing the
output pipelines to use the input pipelines clock? Or perhaps there is a way
to maintain the control I need without using 3 different pipelines?

Thanks for the help.

Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100416/e20dd55e/attachment.htm>


More information about the gstreamer-devel mailing list