Pausing a gstreamer thread made with tee

lacho.tomov lacho.tomov at gmail.com
Fri Aug 14 10:24:32 PDT 2015


Hello,

I have a gstreamer pipeline that takes video from the webcam and splits it
into two threads:
1) use appsink so I can programmatically edit the captured frames
2) saves the video to a file

The pipeline looks like this:

gst-launch-1.0 v4l2src device=/dev/video0 \
! tee name=t ! queue ! videoconvert ! videoscale ! appsink name=sink
caps="video/x-raw,format=RGB,width=800,framerate=15/1" t. \
! queue ! video/x-raw,width=800,framerate=15/1 ! jpegenc ! avimux ! filesink
location=/tmp/output.avi
I'm using this inside a C++ app.

My problem is that in most of the time I don't need the two threads running
simultaneously, but only one of them. And in rare cases - need both.
So I need some way to temporarily pause/stop either the appsink or the video
saving - in order to save CPU.

I've been looking for such a solution, but no luck so far - is there any way
to do that?

Thanks in advance!




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Pausing-a-gstreamer-thread-made-with-tee-tp4673168.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list