[gst-devel] How to let cheese switch between video mode and photo mode without interupting video

Jaap A. Haitsma jaap at haitsma.org
Thu Nov 29 20:48:29 CET 2007


On Nov 27, 2007 10:21 PM, Stefan Kost <ensonic at hora-obscura.de> wrote:
>
> Hi,
>
> Jaap A. Haitsma schrieb:
> > On Nov 19, 2007 9:05 PM, Jaap A. Haitsma <jaap at haitsma.org> wrote:
> >> On Nov 19, 2007 8:56 PM, Stefan Kost <ensonic at hora-obscura.de> wrote:
> >>> Hi,
> >>>
> >>> Jaap A. Haitsma schrieb:
> >>>> Hi,
> >>>>
> >>>> I guess some of you are familiar with the cheese webcam program [1]
> >>>> Cheese used to have two pipelines (one for taking a picture and one
> >>>> for recording a video). We refactored that code and made one pipeline
> >>>> to which we connect a photo_bin or video encoding bin to the pipeline
> >>>> depending on if we are in video or photo mode.
> >>>>
> >>>> In order to do that we need to stop and start the pipeline. Therefore
> >>>> the video is interupted
> >>>>
> >>>> So what we would like is have 2 pipelines running.
> >>> What about running one pipeline with a switch element. I haven't used it yet
> >>> myself. If that does not work using a tee and pad blocking could also work.
> >>>
> >> Thanks, I was looking for such a switch element. Probably because the
> >> name is so logical I overlooked it :-(
> >>
> >> I'll give it a try
> >>
> > I tried it. switch is unfortunately not the element I was looking for.
> > It switches inputs not outputs like I need. I tried the suggestion of
> > blocking pads but if I block one element in one branch of the tee the
> > other one also stops. See attached example:
> >
> > The example use videotestsrc which is tee'd to two imagesinks by
> > pressing the sink1 button you can block /unblock the first sink
> >
> > However if the first sink gets blocked also the second one gets
> > blocked. So that doesn't really help me. Is there anything I do wrong?
> > Should I try something else?
>
> Hmm, the queues should decouple it. Does it help if you make the queue leaky
> (check the property).
>
Thanks this works :-)

Jaap




More information about the gstreamer-devel mailing list