Meta with timestamp

José Rafael zerafael at gmail.com
Tue Mar 20 15:03:50 UTC 2018


Hi Edward

Thank you for the help.

With gst_buffer_make_writable(), as below, I have the first meta
propagated, and after a segmentation fault.
It should make a copy if not writable, no?

If I use gst_buffer_copy() it processes the buffer without the seg fault,
but not writing back on the right buffer.

This make me think dest_buff is being changes somewhere else.

I don't get the funcionality of  GST_PAD_PROBE_INFO_DATA(), should be in
the transformation function?

Regards
Rafael

gboolean gst_meta_ts_transform (GstBuffer *dest_buf, GstMeta *src_meta,
GstBuffer *src_buf, GQuark type, gpointer data) {
*        dest_buf = gst_buffer_make_writable(dest_buf);*
        if(! gst_buffer_is_writable(dest_buf))
        {
                printf("gst_meta_ts_transform: not writable to be
transformed\n");
                return FALSE;
        }
        GstMeta* dest_meta = (GstMeta*)GST_META_TS_ADD(dest_buf);
        GstMetaTS* src_meta_ts = (GstMetaTS*)src_meta;
        GstMetaTS* dest_meta_ts = (GstMetaTS*)dest_meta;
        dest_meta_ts->in_timestamp = src_meta_ts->in_timestamp;
        return TRUE;
}



On 20 March 2018 at 15:24, Edward Hervey <bilboed at bilboed.com> wrote:

> Hi,
>
>   Just ensure the buffer is writable (it won't actually copy the
> underlying memory) with gst_buffer_make_writable() and set it back to
> the GST_PAD_PROBE_INFO_DATA so that it gets propagated.
>
>    Edward
>
> On Tue, 2018-03-20 at 13:39 +0100, José Rafael wrote:
> > Hello,
> >
> > I'm using the code below to timestamp a pipeline and get a delay in
> > the end for the buffers.
> > It work fine usually, putting the but timestamp at the src pad and
> > getting the difference in the sink.
> > However, in a longer transcoding pipeline the transform function
> > always get non writable buffers, and the meta is not replicated.
> >
> > Is there a way to now who is blocking the buffer, or a workaround?
> >
> > Any tips will be really appreciated.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180320/ccd709bf/attachment.html>


More information about the gstreamer-devel mailing list