an example of how to test for idle buffers using GST_PAD_PROBE_TYPE_IDLE

Nicolas Dufresne nicolas at ndufresne.ca
Tue Jan 17 18:47:40 UTC 2017


Le lundi 16 janvier 2017 à 15:02 -0800, vanderhoffer a écrit :
> I am having some issues with rtmpsink. Somewhere in my pipeline I am
> getting
> a buffer issue that is causing the rtmp feed to disconnect, even
> though the
> the pipeline reports GST_STATE_PLAYING
> 
> I have the following
> /*elem_rtmp = gst_element_factory_make ("rtmpsink", "rtmpS");
> elem_rtmp_pad_sink = gst_element_get_static_pad (elem_rtmp, "sink"); 
> gst_pad_add_probe
> (elem_rtmp_pad_sink,GST_PAD_PROBE_TYPE_IDLE,doalert, NULL,
> NULL);*/
> 
> 
> /*void *doalert(){
>     printf("Probe reports no data\n");
> }*/
> 
> Even though the stream disconnects, the probe never fires. 
> Have I got this wrong?

We have improved the documentation recently:

    When either one of GST_PAD_PROBE_TYPE_IDLE or
    GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a blocking
    probe.

> 
> I do not want to block the element, just report when  the buffers
> stop
> flowing to it.

I have never tested that with an IDLE probe. The entire purpose of that
probe is to block the flow as soon as possible, rather then on the next
 buffer. But maybe returning GST_PAD_PROBE_PASS (rather then OK) will
prevent blocking. Let us know, you may also look into the code. It
looks like a strange use of this probe.

regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170117/69b3b3f1/attachment.sig>


More information about the gstreamer-devel mailing list