After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 321451 - GstRtpBuffer: no way to create a sub buffer with only the payload data
GstRtpBuffer: no way to create a sub buffer with only the payload data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.9.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 319388
 
 
Reported: 2005-11-14 17:32 UTC by Sebastien Cote
Modified: 2005-11-21 19:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1.56 KB, patch)
2005-11-19 17:02 UTC, Sebastien Cote
none Details | Review

Description Sebastien Cote 2005-11-14 17:32:24 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);
Comment 1 Sebastien Cote 2005-11-19 17:02:53 UTC
Created attachment 54946 [details] [review]
Proposed fix

This patch adds a function called gst_rtpbuffer_get_payload_buffer () which
returns a GstBuffer*.
Comment 2 Wim Taymans 2005-11-19 18:19:03 UTC
looks ok