GST_PAD_PROBE_HANDLED

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

GST_PAD_PROBE_HANDLED

marc lievens-2
Hi,

We are extracting video parts from soure file to destination file via multiple seeks, which work great.
The pipeline is :

    source | matroskademux | queue | h264parse | matroskamux | filesink and is executed on windows 10 with gstreamer 1.10.2

On pad-added signal we add a probe ( settings GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST).
The probe is added on sink of queue. On probe callback the follwing code is executed:

    GstMessage* msg = gst_message_new_application(GST_OBJECT_CAST(pipeline),    gst_structure_new_empty("ExPrerolled"));
    gst_bus_post(pipe_.bus, msg);
    gst_pad_remove_probe(pad, GST_PAD_PROBE_INFO_ID(info));
    GST_PAD_PROBE_INFO_FLOW_RETURN (info) = GST_FLOW_FLUSHING;
    return GST_PAD_PROBE_HANDLED;

Now it seems that when GST_PAD_PROBE_HANDLED is returned a memory leak is seen and when GST_PAD_PROBE_DROP is returned the memory leak disapeared.

Are we doing something wrong or is there indeed some kind of memory leak?

When message" ExPrerolled" is received seeking starts to extract video.

Thanks in advance,
Marc

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GST_PAD_PROBE_HANDLED

Nicolas Dufresne-5
Le mardi 04 avril 2017 à 15:28 +0200, marc lievens a écrit :
> Now it seems that when GST_PAD_PROBE_HANDLED is returned a memory
> leak is seen and when GST_PAD_PROBE_DROP is returned the memory leak
> disapeared.
> Are we doing something wrong or is there indeed some kind of memory
> leak?

As the doc says, it's the same behaviour "except that in this case you
need to unref the buffer or event yourself"

regards,
Nicolas

p.s. The Doc

"Data has been handled in the probe and will not be forwarded further.
For events and buffers this is the same behaviour as GST_PAD_PROBE_DROP
(except that in this case you need to unref the buffer or event
yourself). For queries it will also return TRUE to the caller. The
probe can also modify the GstFlowReturn value by using the
GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. Note that the resulting
query must contain valid entries. Since: 1.6"



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Loading...