Using input-selector

Sebastian Dröge sebastian at centricular.com
Sun Jan 19 01:56:35 PST 2014


On Do, 2014-01-16 at 09:55 +0100, Jan Alexander Steffens wrote:
> Hello List,
> 
> I'm trying to use input-selector to switch between two streams.
> Streams that are unconnected should be paused (in case of a file) or
> continue running as normal (except without output; in case of a
> livestream). How do I do this? I think my previous attempts fail
> because the sink gets confused when the timestamps suddenly change.
> 
> For the big picture; I'm trying to get the bits and pieces together to
> build a live video composer.

That's actually not so trivial to do unfortunately. The default case is
that input-selector just drops data from every unselected stream, so
that should be no problem.

However pausing the file-based streams is, as the pausing is usually
only implemented in the sinks and for other elements there's usually no
difference between PLAYING and PAUSED state. Also you will need to
adjust the timestamp after the pausing to be at the exact current
running time, not the running time when you paused. For the latter you
should be able to use the pad offsets (gst_pad_set_offset()), for the
pausing you could just block the pads of the file-based streams
(gst_pad_add_probe() with a blocking probe type).

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140119/dc863c11/attachment.pgp>


More information about the gstreamer-devel mailing list