<div dir="ltr">Hi Edward<div><br></div><div>Thank you for the help. </div><div><br></div><div>With gst_buffer_make_writable(), as below, I have the first meta propagated, and after a segmentation fault.</div><div>It should make a copy if not writable, no? </div><div><br></div><div>If I use gst_buffer_copy() it processes the buffer without the seg fault, but not writing back on the right buffer. </div><div><br></div><div>This make me think dest_buff is being changes somewhere else.</div><div><br></div><div>I don't get the funcionality of
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">GST_PAD_PROBE_INFO_DATA(), should be in the transformation function?</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Regards</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Rafael</span></div><div><br></div><div><div>gboolean gst_meta_ts_transform (GstBuffer *dest_buf, GstMeta *src_meta, GstBuffer *src_buf, GQuark type, gpointer data) {</div><div><b> dest_buf = gst_buffer_make_writable(dest_buf);</b></div><div> if(! gst_buffer_is_writable(dest_buf))</div><div> {</div><div> printf("gst_meta_ts_transform: not writable to be transformed\n");</div><div> return FALSE;</div><div> }</div><div> GstMeta* dest_meta = (GstMeta*)GST_META_TS_ADD(dest_buf);</div><div> GstMetaTS* src_meta_ts = (GstMetaTS*)src_meta;</div><div> GstMetaTS* dest_meta_ts = (GstMetaTS*)dest_meta;</div><div> dest_meta_ts->in_timestamp = src_meta_ts->in_timestamp;</div><div> return TRUE;</div><div>}</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 March 2018 at 15:24, Edward Hervey <span dir="ltr"><<a href="mailto:bilboed@bilboed.com" target="_blank">bilboed@bilboed.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Just ensure the buffer is writable (it won't actually copy the<br>
underlying memory) with gst_buffer_make_writable() and set it back to<br>
the GST_PAD_PROBE_INFO_DATA so that it gets propagated.<br>
<br>
Edward<br>
<span class=""><br>
On Tue, 2018-03-20 at 13:39 +0100, José Rafael wrote:<br>
> Hello,<br>
><br>
> I'm using the code below to timestamp a pipeline and get a delay in<br>
> the end for the buffers.<br>
> It work fine usually, putting the but timestamp at the src pad and<br>
> getting the difference in the sink.<br>
> However, in a longer transcoding pipeline the transform function<br>
> always get non writable buffers, and the meta is not replicated.<br>
><br>
> Is there a way to now who is blocking the buffer, or a workaround?<br>
><br>
> Any tips will be really appreciated.<br>
</span>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
</blockquote></div><br></div>