[gst-devel] Switching two video sources with input-selector
Andres Gonzalez
acandido at hi-iberia.es
Thu Oct 7 17:18:02 CEST 2010
On 28/09/10 19:41, Mark Kretschmann wrote:
> Heya,
>
> I am trying to build an application with GStreamer that allows
> switching between two video sources dynamically, one being a
> live-video (videotestsrc for now), and the other a filesrc. The sink
> is a standard xvimagesink.
>
> The goal is to do the switching with as little latency as possible,
> and also only running the elements that are necessary for each source.
> Wim Taymans recommended to use an "input-selector" for switching
> between the sources, which makes sense to me.
>
> However, how should the pipeline design look? Would I need two
> pipelines, one for each source, and play/pause them dynamically? Where
> must the input-selector and the sink go?
>
>
> Thanks,
> Mark.
>
Hello Mark,
I send you an example of something I've been working on. I think it will
be useful as an starting point for you.
The usage is:
$ python switch-any.py <filename>
(The file must be MPEG)
Feel free to ask further questions about it.
By the way, about "only running the elements that are necessary for each
source", as far as I know input-selector makes all its input elements
play (although you only see one of them). In fact, non selected inputs
run at higher speed. If you want to improve this, I'm interested.
Regards,
Andrés
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switch-any.py
Type: text/x-python
Size: 14544 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20101007/a580df74/attachment.py>
More information about the gstreamer-devel
mailing list