plugin to add meta data right after capture

Michael Gruner michael.gruner at ridgerun.com
Tue Nov 23 02:06:43 UTC 2021


Hey Tom

If you're only adding a meta to the buffer then basetransform should be okay. Note that you should not add a meta in the transform virtual method, since the buffer is not guaranteed to be writable. One trick is to implement prepare_output_buffer and assign the output to a writable version of the input (as in gst_buffer_make_writable). Then you can add the meta to the output buffer. You’ll still need to implement transform to return GST_FLOW_OK.

If on the other hand you plan to access the video data, you’re better off implementing videofilter.

Michael

> On 22 Nov 2021, at 19:44, tom via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> 
> Hello,
> 
> I'm trying to add custom metadata to my pipeline as early as possible so it matches the capture video frame as closely as possible. (so i can add GPS location, speed, direction)
> 
> From what i've read creating a plugin that has gstbasetransform ( https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c)  would be the best match. 
> 
> Is this correct ? Or is gstbasetransform for modifying metadata only , not adding new metadata ?
> If so, which base class should I look at , and which function pointer/callback would be the best to add new metadata ? ( copy_metadata , transform_meta, prepare_output_buffer....)
> 
> kind regards
> tom
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211122/4c93bc74/attachment.htm>


More information about the gstreamer-devel mailing list