Valve is blocking other parts of the pipeline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Valve is blocking other parts of the pipeline

I'm connecting the each srcpads of a decodebin to its own valve, then connecting each valve as an input to mpegtsmux. This is my decodebin on-pad-added function (error checking removed here but everything reported ok):

int valvenum = 0;
GstElement *pipeline, *mpegtsmux, *valves[4];
static gboolean on_pad_added (GstElement *gstdecodebin, GstPad *pad, gpointer user_data)
    GstPad *tsmux_sinkpad;
    GstPad *valve_srcpad, *valve_sinkpad;
    tsmux_sinkpad = gst_element_get_compatible_pad (mpegtsmux, pad, NULL);
    valves[valvenum++] = gst_element_factory_make ("valve", NULL);
    gst_bin_add (GST_BIN(pipeline), valves[valvenum]);
    valve_srcpad = gst_element_get_static_pad (valves[valvenum], "src");
    valve_sinkpad = gst_element_get_static_pad (valves[valvenum], "sink");
    gst_pad_link (pad, valve_sinkpad);
    gst_pad_link (valve_srcpad, tsmux_sinkpad)
    gst_pad_set_active(valve_srcpad, TRUE);
    gst_pad_set_active(valve_sinkpad, TRUE);
    return TRUE;

I have one video and one audio stream in my test file. If I set drop=true on either of the valves, I don't get any more data on any mpegtsmux input, even if I then set drop=false. What else should I be doing? Thanks.
Reply | Threaded
Open this post in threaded view

Re: Valve is blocking other parts of the pipeline

Hi, I am facing same problem. I am playing following pipeline using
Gst.parse_launch_full funciton in pythong, Gst1.0.

rtspsrc name=rtsp_src location=r    tsp:// ! decodebin
name=decoder ! omxh264enc name=enc ! h264par    se name=parser ! mp4mux
name=mux ! queue name=que1 min-threshold-time=6000000000 max-    size-time=0
max-size-bytes=0 max-size-buffers=0 ! valve name=valve drop=1

After receiving some user signal I would like to change value of drop to 0
and add filesink after valve, to store video in file from queue. For this, I
added buffer blocking problem on src pad of queue, once I receive signal
from user. However, probe callback is never being called. Can anyone guide
me please ? I am new to gstreamer and might be missing something very basic.

Sent from:
gstreamer-devel mailing list
[hidden email]