gst-libs/gst/rtp/gstrtpbuffer.h: gst-libs/gst/rtp/gstrtpbuffer.c

Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

patch from: Sebastien Cote <sebas642@yahoo.ca>

* gst-libs/gst/rtp/gstrtpbuffer.h:
* gst-libs/gst/rtp/gstrtpbuffer.c
(gst_rtpbuffer_get_payload_buffer): New function.
This commit is contained in:
Andy Wingo 2005-11-21 19:12:51 +00:00
parent 06d5485123
commit 3daa90cc7a
3 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2005-11-21 Andy Wingo <wingo@pobox.com>
patch from: Sebastien Cote <sebas642@yahoo.ca>
* gst-libs/gst/rtp/gstrtpbuffer.h:
* gst-libs/gst/rtp/gstrtpbuffer.c
(gst_rtpbuffer_get_payload_buffer): New function.
2005-11-21 Andy Wingo <wingo@pobox.com>
* gst/playback/gstplaybin.c (gen_audio_element)

View file

@ -446,6 +446,19 @@ gst_rtpbuffer_set_timestamp (GstBuffer * buffer, guint32 timestamp)
GST_RTP_HEADER_TIMESTAMP (buffer) = g_htonl (timestamp);
}
GstBuffer *
gst_rtpbuffer_get_payload_buffer (GstBuffer * buffer)
{
guint len;
g_return_val_if_fail (GST_IS_BUFFER (buffer), 0);
g_return_val_if_fail (GST_BUFFER_DATA (buffer) != NULL, 0);
len = gst_rtpbuffer_get_payload_len (buffer);
return gst_buffer_create_sub (buffer, GST_RTP_HEADER_LEN
+ GST_RTP_HEADER_CSRC_SIZE (buffer), len);
}
guint
gst_rtpbuffer_get_payload_len (GstBuffer * buffer)

View file

@ -120,6 +120,7 @@ void gst_rtpbuffer_set_seq (GstBuffer *buffer, guint16 seq);
guint32 gst_rtpbuffer_get_timestamp (GstBuffer *buffer);
void gst_rtpbuffer_set_timestamp (GstBuffer *buffer, guint32 timestamp);
GstBuffer* gst_rtpbuffer_get_payload_buffer (GstBuffer *buffer);
guint gst_rtpbuffer_get_payload_len (GstBuffer *buffer);
gpointer gst_rtpbuffer_get_payload (GstBuffer *buffer);