Commit graph

37 commits

Author SHA1 Message Date
Branko Subasic 4dd5c5b808 rtpbuffer: add gst_rtp_buffer_get_payload_bytes
The function gst_rtp_buffer_get_payload can not be used in Python
because it lacks necessary length parameter. This patch adds a new
function, gst_rtp_buffer_get_payload_bytes, to use from Python
bindings. The new function has the advisory "Rename to:" annotation
so it can replace the gst_rtp_buffer_get_payload whan creating
bindings.

The function gst_rtp_buffer_get_extension_bytes is also added. It wraps
gst_rtp_buffer_get_extension_data which doesn't work in Python due to
incomplete annotation and because it returns the length as number of
32-bit words.

https://bugzilla.gnome.org/show_bug.cgi?id=698562
2013-06-18 11:23:40 +02:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Wim Taymans f548e58385 rtp: remove unused field 2012-08-22 09:56:39 +02:00
Wim Taymans 11a494d5c9 rtp: Add support for multiple memory blocks in RTP
Add support RTP buffers with multiple memory blocks. We allow one block for the
header, one for the extension data, N for data and one memory block for the
padding.
Remove the validate function, we validate now when we map because we need to
parse things in order to map multiple memory blocks.
2012-07-17 16:41:36 +02:00
Wim Taymans 6e9d28eef6 rtp: fix initializer 2012-04-02 11:05:38 +02:00
Wim Taymans 92f46c07fe rtpbuffer: keep more state
Prepare for the future, make it possible to map multiple buffer regions, like
the header and the payload.
2012-04-02 10:31:18 +02:00
Wim Taymans e7575bc525 rtp: improve structures
Remove flags that is in the mapinfo now
2012-01-25 12:30:53 +01:00
Wim Taymans fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Tim-Philipp Müller 54c5cd8c3f rtpbuffer: add GST_RTP_BUFFER_INIT to initialize RTP buffers on the stack
Fixes build of -good.
2011-12-09 15:03:41 +00:00
Wim Taymans 107d5a3d05 rtp: fix headers
indent, add padding, remove old abidata
2011-11-11 19:21:09 +01:00
Wim Taymans e33b73f9df tests: fix RTP and RTCP unit tests 2011-03-28 18:42:09 +02:00
Wim Taymans 3d25a4b470 libs: port to new data API 2011-03-27 13:55:15 +02:00
Olivier Crête 7536d96d7c rtpbuffer: Add function to transform a GstBuffer into a GstBufferList
Add a new function called gst_rtp_buffer_list_from_buffer() that takes
a GstBuffer containing a RTP packets and spits out a GstBufferList
containing two buffers, one with the header and the other with the payload.
2010-10-05 16:19:14 +02:00
Olivier Crête f6b7ea3d39 rtpbuffer: Add functions to add RFC 5285 header extensions to GstBufferLists
Add functions to add header extensions to buffer lists, these functions only modify
the header part of the buffer lists, so the data is not copied.
2010-10-05 16:19:14 +02:00
Olivier Crête fb770ca5e5 rtpbuffer: Add function to read RFC 5285 header extensions from GstBufferLists 2010-10-05 16:19:14 +02:00
Olivier Crête 484871b495 rtpbuffer: Add function to add RTP header extensions with a two bytes header 2010-10-05 16:19:14 +02:00
Olivier Crête 02a0139451 rtpbuffer: Add function to append RFC 5285 one byte header extensions 2010-10-05 16:19:14 +02:00
Olivier Crête e4c06debb2 rtpbuffer: Add function to parse RFC 5285 header extensions
RFC 5285 describes a generic method to add multiple header extensions to RTP packets.
These functions parse these headers and return them, both for the one-byte header and the
two bytes headers.
2010-10-05 16:19:14 +02:00
Wim Taymans 66c388a0e0 rtp: add bufferlist support 2009-06-18 18:51:04 +02:00
Thijs Vermeir b8d39bc200 Add gst_rtp_buffer_set_extension_data()
Original commit message from CVS:
Patch by: Thijs Vermeir <thijsvermeir at gmail dot com>
* gst-libs/gst/rtp/gstrtpbuffer.c:
(gst_rtp_buffer_set_extension_data):
* gst-libs/gst/rtp/gstrtpbuffer.h:
* tests/check/libs/rtp.c: (GST_START_TEST), (rtp_suite):
Add gst_rtp_buffer_set_extension_data()
Add a unit test for this addition. Fixes #511478.
API: GstRTPBuffer:gst_rtp_buffer_set_extension_data()
2008-02-01 11:09:16 +00:00
Wim Taymans 7cdfb6d154 gst-libs/gst/rtp/: Added new file and header to deal with payload info.
Original commit message from CVS:
* gst-libs/gst/rtp/Makefile.am:
* gst-libs/gst/rtp/gstrtppayloads.c: (gst_rtp_payload_info_for_pt),
(gst_rtp_payload_info_for_name):
* gst-libs/gst/rtp/gstrtppayloads.h:
Added new file and header to deal with payload info.
* gst-libs/gst/rtp/gstrtpbuffer.c: (gst_rtp_buffer_validate_data),
(gst_rtp_buffer_default_clock_rate):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Payload specific stuff is move to new headers.
Implement _default_clock rate using the new payload function.
* gst-libs/gst/sdp/gstsdpmessage.c: (is_multicast_address),
(gst_sdp_parse_line):
* gst-libs/gst/sdp/gstsdpmessage.h:
Add some more comments.
2007-10-01 13:22:14 +00:00
Wim Taymans 6f93db5ab5 Fix parsing of RB blocks.
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_packet_get_rb),
(gst_rtcp_packet_sdes_copy_entry), (gst_rtcp_ntp_to_unix),
(gst_rtcp_unix_to_ntp):
* gst-libs/gst/rtp/gstrtcpbuffer.h:
Fix parsing of RB blocks.
Fix docs.
Added helper functions to convert to/from UNIX and NTP time.
API: gst_rtcp_ntp_to_unix()
API: gst_rtcp_unix_to_ntp()
* gst-libs/gst/rtp/gstrtpbuffer.c: (gst_rtp_buffer_validate_data),
(gst_rtp_buffer_get_header_len),
(gst_rtp_buffer_get_extension_data),
(gst_rtp_buffer_get_payload_subbuffer),
(gst_rtp_buffer_get_payload_len), (gst_rtp_buffer_get_payload),
(gst_rtp_buffer_ext_timestamp):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Fix some more docs.
Implement handling of packets with extensions.
Fix padding check in _validate().
Added function to get extension data.
API: gst_rtp_buffer_get_header_len()
API: gst_rtp_buffer_get_extension_data()
2007-09-03 19:31:11 +00:00
Wim Taymans 27ea51ec37 gst-libs/gst/rtp/gstrtcpbuffer.c: Use g_strndup which does exactly what we want.
Original commit message from CVS:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_sdes_copy_entry):
Use g_strndup which does exactly what we want.
* gst-libs/gst/rtp/gstrtpbuffer.c: (gst_rtp_buffer_compare_seqnum),
(gst_rtp_buffer_ext_timestamp):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Add helper function to compare seqnums.
Add helper function to calculate extended timestamps.
API: gst_rtp_buffer_compare_seqnum()
API: gst_rtp_buffer_ext_timestamp()
2007-08-31 15:21:13 +00:00
Wim Taymans 804e7d1759 gst-libs/gst/rtp/gstrtpbuffer.*: Fix fixed payload names and docs.
Original commit message from CVS:
* gst-libs/gst/rtp/gstrtpbuffer.c:
(gst_rtp_buffer_default_clock_rate):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Fix fixed payload names and docs.
Added method to get the default clock rates of fixed payload types.
API: GstRTPBuffer::gst_rtp_buffer_default_clock_rate()
2007-03-29 10:17:52 +00:00
Wim Taymans 81e92118da gst-libs/gst/rtp/gstrtpbuffer.h: Add some more fixed payloads.
Original commit message from CVS:
* gst-libs/gst/rtp/gstrtpbuffer.h:
Add some more fixed payloads.
2007-01-24 12:10:56 +00:00
Wim Taymans cfb0252782 Document GstRTPBuffer.
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/rtp/gstrtpbuffer.c: (gst_rtp_buffer_set_packet_len),
(gst_rtp_buffer_pad_to), (gst_rtp_buffer_get_payload_subbuffer),
(gst_rtp_buffer_get_payload_buffer):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Document GstRTPBuffer.
Added function to efficiently strip payload headers.
API: gst_rtp_buffer_get_payload_subbuffer()
2006-08-18 16:43:26 +00:00
Philippe Kalaf 8675bc89e4 gst-libs/gst/rtp/README: Some new documentation
Original commit message from CVS:
2006-05-18 Philippe Kalaf <philippe.kalaf@collabora.co.uk>

* gst-libs/gst/rtp/README:
Some new documentation
* gst-libs/gst/rtp/gstrtpbuffer.h:
Added GST_RTP_PAYLOAD_DYNAMIC_STRING for use by children
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
* gst-libs/gst/rtp/gstbasertpaudiopayload.h:
New RTP audio base payloader class. Supports frame or sample based codecs.
Not enabled in Makefile.am until approved.
2006-05-18 23:00:02 +00:00
Thomas Vander Stichele 6f18aadd6b reverting rtp patches to fix freeze break on -base as explained on the list
Original commit message from CVS:
reverting rtp patches to fix freeze break on -base as explained on the list
2006-04-13 09:26:27 +00:00
Philippe Kalaf a916af7c48 gst-libs/gst/rtp/gstrtpbuffer.h: Added GST_RTP_PAYLOAD_DYNAMIC_STRING for use by children
Original commit message from CVS:
2006-04-12 Philippe Kalaf <philippe.kalaf@collabora.co.uk>

* gst-libs/gst/rtp/gstrtpbuffer.h:
Added GST_RTP_PAYLOAD_DYNAMIC_STRING for use by children
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
* gst-libs/gst/rtp/gstbasertpaudiopayload.h:
New RTP audio base payloader class. Supports frame or sample based codecs
2006-04-13 03:55:12 +00:00
Thomas Vander Stichele 5f83aa7dfa expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:42:02 +00:00
Thomas Vander Stichele ff18d8e298 Do burger's rename for rtp payloaders and depayloaders
Original commit message from CVS:

* docs/libs/tmpl/gstcolorbalance.sgml:
* gst-libs/gst/rtp/gstbasertpdepayload.c:
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtpbuffer.c:
* gst-libs/gst/rtp/gstrtpbuffer.h:
Do burger's rename for rtp payloaders and depayloaders
2005-12-01 14:29:59 +00:00
Andy Wingo 3daa90cc7a 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.
2005-11-21 19:12:51 +00:00
Zeeshan Ali 00e8471356 I'm too lazy to comment this
Original commit message from CVS:
*** empty log message ***
2005-10-26 21:42:21 +00:00
Philippe Kalaf 003cd58432 gst-libs/gst/rtp/rtpbasedepayload.c: Set timestamp and add queue delay to timestamp
Original commit message from CVS:
2005-10-09  Philippe Khalaf <burger@speedy.org>

* gst-libs/gst/rtp/rtpbasedepayload.c:
Set timestamp and add queue delay to timestamp
* gst-libs/gst/rtp/rtpbuffer.h:
Set correct payload type for h263
2005-10-09 21:32:34 +00:00
Wim Taymans 7667a989d3 gst-libs/gst/rtp/gstbasertpdepayload.*: Fix for RTPBuffer changes.
Original commit message from CVS:
* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_chain),
(gst_base_rtp_depayload_add_to_queue),
(gst_base_rtp_depayload_push),
(gst_base_rtp_depayload_queue_release):
* gst-libs/gst/rtp/gstbasertpdepayload.h:
Fix for RTPBuffer changes.

* gst-libs/gst/rtp/gstrtpbuffer.c: (gst_rtpbuffer_allocate_data),
(gst_rtpbuffer_new_take_data), (gst_rtpbuffer_new_copy_data),
(gst_rtpbuffer_new_allocate), (gst_rtpbuffer_new_allocate_len),
(gst_rtpbuffer_calc_header_len), (gst_rtpbuffer_calc_packet_len),
(gst_rtpbuffer_calc_payload_len), (gst_rtpbuffer_validate_data),
(gst_rtpbuffer_validate), (gst_rtpbuffer_set_packet_len),
(gst_rtpbuffer_get_packet_len), (gst_rtpbuffer_get_version),
(gst_rtpbuffer_set_version), (gst_rtpbuffer_get_padding),
(gst_rtpbuffer_set_padding), (gst_rtpbuffer_pad_to),
(gst_rtpbuffer_get_extension), (gst_rtpbuffer_set_extension),
(gst_rtpbuffer_get_ssrc), (gst_rtpbuffer_set_ssrc),
(gst_rtpbuffer_get_csrc_count), (gst_rtpbuffer_get_csrc),
(gst_rtpbuffer_set_csrc), (gst_rtpbuffer_get_marker),
(gst_rtpbuffer_set_marker), (gst_rtpbuffer_get_payload_type),
(gst_rtpbuffer_set_payload_type), (gst_rtpbuffer_get_seq),
(gst_rtpbuffer_set_seq), (gst_rtpbuffer_get_timestamp),
(gst_rtpbuffer_set_timestamp), (gst_rtpbuffer_get_payload_len),
(gst_rtpbuffer_get_payload):
* gst-libs/gst/rtp/gstrtpbuffer.h:
Don't subclass GstBuffer but add methods and helper functions
to construct and manipulate RTP packets in regular GstBuffers.
2005-08-18 10:23:54 +00:00
Tim-Philipp Müller b9b56ce7d3 gst-libs/gst/: Add padding (you will need to rebuild gst-plugins-base, gst-plugins and all applications afterwards!)
Original commit message from CVS:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiofilter.h:
* gst-libs/gst/audio/gstaudiosink.h:
* gst-libs/gst/audio/gstaudiosrc.h:
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstbaseaudiosrc.h:
* gst-libs/gst/audio/gstringbuffer.h:
* gst-libs/gst/net/gstnetbuffer.h:
* gst-libs/gst/rtp/gstbasertpdepayload.h:
* gst-libs/gst/rtp/gstrtpbuffer.h:
Add padding (you will need to rebuild gst-plugins-base,
gst-plugins and all applications afterwards!)
2005-08-09 17:29:40 +00:00
Philippe Kalaf dc0610faff gst-libs/gst/rtp gst-libs/gst/rtp/gstbasertpdepayload.c gst-libs/gst/rtp/gstbasertpdepayload.h gst-libs/gst/rtp/gstrt...
Original commit message from CVS:
* gst-libs/gst/rtp
* gst-libs/gst/rtp/gstbasertpdepayload.c
* gst-libs/gst/rtp/gstbasertpdepayload.h
* gst-libs/gst/rtp/gstrtpbuffer.c
* gst-libs/gst/rtp/gstrtpbuffer.h
* gst-libs/gst/rtp/Makefile.am
* gst-libs/gst/rtp/README

Support libs for RTP. Basicaly this add a GstRTPBuffer (extended GstBuffer) and
a Depayloader Base class that shall be used by payload specific depayloaders.
2005-07-14 10:29:30 +00:00