Reading and Modifying Buffers in a Pipeline

Hassan Muhammad hassanmuhammad221 at
Tue Nov 10 07:24:54 UTC 2020

Hi. I am new to gstreamer and trying to figure out a way to read buffers
from a video source, modifying the buffers in some way (e.g. draw overlay
information) and output the buffers to a video or filesink. I am using the
gstreamer-rust bindings and have not been able to find a solution to this
problem. Reading on the forums, I tried to add a pad probe at the source
element of the following pipeline as a test by getting the static pad:

"videotestsrc ! autovideosink"

I am able to read the buffer from "" :

*src_pad.add_probe(gst::PadProbeType::BUFFER, |_, probe_info| {*

However, if I try to map the buffer as writable by using

it doesn't allow me to do so with the error "cannot borrow as mutable". At
this point I am completely lost and unable to find an alternative to read
and modify a buffer element through a pad probe. Any help or
suggestion would be appreciated to help me overcome this.

Muhammad Hassan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list