GNOME Bugzilla – Bug 321451
GstRtpBuffer: no way to create a sub buffer with only the payload data
Last modified: 2005-11-21 19:13:48 UTC
GstRtpBuffer allows access the the payload only through the function: gpointer gst_rtpbuffer_get_payload (GstBuffer *buffer) This doesn't allow to create a subbuffer that contains the payload data without doing a copy. We need a function that returns a subbuffer which contains only the payload data. This would prevent useless copying of data like the following (taken from gstrtpg711dec.c): payload_len = gst_rtpbuffer_get_payload_len (buf); payload = gst_rtpbuffer_get_payload (buf); outbuf = gst_buffer_new_and_alloc (payload_len); memcpy (GST_BUFFER_DATA (outbuf), payload, payload_len);
Created attachment 54946 [details] [review] Proposed fix This patch adds a function called gst_rtpbuffer_get_payload_buffer () which returns a GstBuffer*.
looks ok