Correspondence between appsrc input and appsink output buffers

Sebastian Dröge sebastian at centricular.com
Wed Nov 9 07:49:57 UTC 2016


On Tue, 2016-11-08 at 20:04 -0800, Benjamin Hepp wrote:
> Hi Sebastian,
> 
> thanks for this tip, it works like a charm. I wouldn't have figured
> out that I can use GstMeta for this.
> 
> One note for others who might try to do something similar: Depending
> on the pipeline one has to lower the refcount of the destination
> buffer to 1 within the meta transformation function. Otherwise the
> buffer cannot be mapped writable and thus the GstMeta fails to be
> attached to the buffer. This seems to be an ok workaround though.

That's generally not a good idea and should cause crashes or other
problems over time. You always have to do the reference counting
correct.


If a buffer is not writable, you need to copy it (the buffer, not the
actual memory inside it). See gst_buffer_make_writable() for automating
that task.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161109/b5dd3f7e/attachment.sig>


More information about the gstreamer-devel mailing list