Using the valve plugin correctly in a gstreamer pipeline

Bruce Tsai wagamama.tsai at gmail.com
Thu May 4 01:45:27 UTC 2017


The pipeline state is changed step-by-step, “NULL” -> “READY” -> “PAUSED” -> “PLAYING”.
From my understanding, all sink elements need to be changed to “PAUSED” state then whole pipeline successfully changes to “PAUSED” state.
Normally a “sink” element needs to received one buffer (preroll) to go to “PAUSED” state.
Now there is a “valve” in front of filesink (in your case).
The filesink never receives a buffer so it cannot go to “PAUSED” state.
As a result, the whole pipeline is waiting for filesink to change its state forever.

There are two options to overcome this situation.

1. Do not add filesink in the beginning.
Add filesink only when you want to save video to file and do not forget to not drop in valve.

2. Lock state of filesink by gst_element_set_locked_state(filesink, TRUE);
Then state of filesink is not sync with parent (pipeline).
And you need to change its state manually.


--
Yi-Lung (Bruce) Tsai
wagamama.tsai at gmail.com





> On May 3, 2017, at 11:45 PM, xargon <daga_pankaj at yahoo.com> wrote:
> 
> I am trying to use the `valve` plugin to basically block one branch of a
> `tee` in a gstreamer pipeline but this is setting my whole pipeline to
> `PAUSED`. So, what I am doing is basically saving H264 encoded video from my
> camera stream and also displaying it on the screen at the same time.
> 
> I try to use the `valve` plugin to block off a branch as follows;
> 
> 
> 
> However, this basically seems to set the whole pipeline to PAUSED rather
> than just the branch. I was still expecting to see the camera stream on the
> display but that is not the case.
> 
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-the-valve-plugin-correctly-in-a-gstreamer-pipeline-tp4682904.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170504/99aecd48/attachment.html>


More information about the gstreamer-devel mailing list