Dynamic linking for custom bins
waldemar
valdemar at gmail.com
Thu May 1 15:29:17 PDT 2014
Hello everyone!
I've been playing and developing with gstreamer for a couple of months, no
problems... until now, seems like I'm stuck with understanding how dynamic
linking works.
The app I'm developing works with a timeline, where media elements(video,
image, audio) get in an out a scene following a script. The pipeline that
works as the scene has the following structure:
videomixer -> videoconvert -> capsfilter -> autovideosink
audiomixer -> autoaudiosink
The idea is to create custom bins for playing video segments at any time in
the pipeline timeline. These bins have two ghost src pads, one for video and
one for audio, that are linked to requested pads from the videomixer and
audiomixer in order to play their content in the pipeline.
filesrc -> queue -> decodebin -> videoconvert -> videoscale -> _video_pad
-> audioconvert -> volume ->
_audio_pad
Custom bins are set to PAUSED as soon as their elements are created, and
they play OK if they are linked to the mixers as soon as the pipeline starts
playing.
The problem comes with linking elements while the pipeline is already
playing, for this I'm using g_timeout_add. If I try to link a custom bin
while playing as soon as I request the new pads to the mixers the pipeline
goes to READY, delaying/freezing the video, and after a couple of seconds it
continues playing all the elements.
I tried blocking the pads on the pad-added event on decodebin, wait for all
the pads to be blocked to perform a gst_element_seek to unblock, flush and
then connect to the mixers, but the delayed persists or sometimes the
pipeline gets stuck in the READY state.
so, Would you advice me how to ensure these custom bins are going to be
ready to be linked(with their seek offset) to the main pipeline to play
their content smoothly???
Thanks in advance!
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-linking-for-custom-bins-tp4666704.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list