Add and stream buffer metadata

Raheeb Muzaffar raheeb.muzaffar at yahoo.com
Wed Jun 10 07:23:03 PDT 2015


Hello,
I am streaming video using udp . I am trying to add metadata at the server to udp packets and extract the metadata at the client. At the server I have added probe to udpsink as below.

pad1 = gst_element_get_static_pad (Data.usink, "sink");
  gst_pad_add_probe (pad1, GST_PAD_PROBE_TYPE_BUFFER_LIST,
      (GstPadProbeCallback) cb_have_data1, NULL, NULL);
  gst_object_unref (pad1);


static GstPadProbeReturn cb_have_data1(GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
GstPadProbeReturn ret = GST_PAD_PROBE_OK;

gint size1;
GstBufferList *list;

list = gst_pad_probe_info_get_buffer_list(info);
size1 = gst_buffer_list_length(list);
for(i=0; i<size1; i++)
{
GstBuffer *buffer1 = gst_buffer_list_get(list, i);
gst_buffer_add_my_example_meta (buffer1, num);
num++;
}
return ret;
}

I implemented the metadata API using the link http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-allocation-meta.html where with every buffer I am adding number. The problem is that I am unable to get the metadata at the client side. Would you have any idea what's wrong?
Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150610/e72fd901/attachment-0001.html>


More information about the gstreamer-devel mailing list