Can we check when an element's sink pad receives a buffer to add custom data to it

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

Can we check when an element's sink pad receives a buffer to add custom data to it

Nostalgia
Hi,

Hope someone can help me in the following :

1) How we can detect the arriving of buffers to an element's sink pad ?
If (1) is possible :
2) Can we add a callback to a function that indicating that sink pad has
received a buffer to do some modifications to this buffer or to add extra
custom data to it ?

If (1) isn't possible : when adding meta data to a buffer, is this extra
data will be processed by other elements or it will be transmitting from one
element to another without modifying ? (e.g. if i add a metadata to a buffer
pushed through my appsource, when an encoder element receives this buffers,
it will compress the metadata with the initial buffer ?)

Hope that I succeed to transmit what I need clearly !

Regards,



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can we check when an element's sink pad receives a buffer to add custom data to it

Arjen Veenhuizen
Yes, you are looking for buffer probes, see
https://gstreamer.freedesktop.org/documentation/design/probes.html and
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-add-probe

You can change the data in the buffer as well, but someone else can probably
explain it better than I can;). W.r.t. metadata: AFAIK not all elements pass
metadata transparently (but that might have changed in 1.12/1.14).



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel