<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hey Tom<div><br></div><div>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.</div><div><br></div><div>If on the other hand you plan to access the video data, you’re better off implementing videofilter.</div><div><div><br><div dir="ltr">Michael</div><div dir="ltr"><br><blockquote type="cite">On 22 Nov 2021, at 19:44, tom via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Hello,<br><br>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)<br><br>From what i've read creating a plugin that has gstbasetransform ( <a href="https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c">https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c</a>) would be the best match. </div><div dir="ltr"><br></div><div>Is this correct ? Or is gstbasetransform for modifying metadata only , not adding new metadata ?</div><div>If so, which base class should I look at , and which function pointer/callback would be the best to add new metadata ? ( <span style="color:rgb(218,218,218);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre">copy_metadata , </span><span style="color:rgb(218,218,218);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre">transform_meta, </span><span style="color:rgb(218,218,218);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre">prepare_output_buffer....)</span></div><div><span style="color:rgb(218,218,218);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre">
</span>kind regards<span style="color:rgb(218,218,218);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre"><br></span></div><div>tom</div><div><br></div></div></div>
</div></blockquote></div></div></body></html>