turning parts of pipeline on/off

Jan Spurný JSpurny at seznam.cz
Tue Jun 21 11:37:28 PDT 2011


Hi,

I have a simple pipeline (actually it's generated according to
configuration and much more complicated, but it allways ends up after
something that gives x-video/raw-yuv, like "decodebin" shown below):

 souphttpsrc location="someurl" ! decodebin ! my_app_sink

and I would like to be able to get jpeg snapshots from time to time. Since
"my_app_sink" needs raw yuv input, I splitted the pipeline with tee:

 souphttpsrc location="someurl" ! decodebin ! tee name=t  ! my_app_sink t. ! queue ! jpegenc ! my_jpeg_appsink

or in crude ascii art:

 souphttpsrc -> decodebin -> tee ----------> my_app_sink
                              \-> jpegenc -> my_jpeg_appsink


it works, but "jpegenc" is running all the time, consuming CPU power and
in "my_jpeg_appsink" I'm just "throwing jpegs away" most of the time, since I
need the jpeg only once in a while - less than one per minute (while
my input stream has usualy more than 10fps).

Now comes my question - is there any way to "turn off" the "my_jpeg_appsink"
part of the pipeline when I don't need jpegs and only turn it on when
I need one without disturbing the "my_app_sink" part?

If my description is confusing, please tell me and I'll try again.

Thanks for any help or suggestions

Regards,
Jan Spurny



More information about the gstreamer-devel mailing list