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

Jaap A. Haitsma jaap at haitsma.org
Sun Nov 18 22:42:14 CET 2007


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.

One that is always grabbing and displaying the video. That pipeline
can  use a handoff signal so we can receive all the frames in a
callback.

Taking a picture is trivial in that case. Just store a one of the frames.

The second pipeline encodes the video. That pipeline is started when
recording of video is started/stopped when the user presses the
appropriate buttons. This pipeline should get it's input frames from
a callback. The question now is how do you push the frames we receive
in the callback in the encoding pipeline?

Or maybe there is a better way to achieve no video interuptions in
some other way

Thanks

Jaap





Jaap

[1] http://www.gnome.org/projects/cheese/




More information about the gstreamer-devel mailing list