Commit graph

71 commits

Author SHA1 Message Date
Thibault Saunier 909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Josep Torra c1a5a36bba rtcpbuffer: test for len instead of type
The function rtcp_packet_min_length() returns a length for each known type
and -1 for unknown types. This change fixes the test accordingly and silences
the following warning.

gstrtcpbuffer.c:567:12: error: comparison of constant -1 with expression of type 'GstRTCPType' is always false
      [-Werror,-Wtautological-constant-out-of-range-compare]
  if (type == -1)
2019-03-21 19:27:28 +01:00
Seungha Yang c389dbf332 rtcpbuffer: Remove invalid sanity check
Checking the address distance between given begin/end sequence
doesn't make sense. They are output params.

This is to fix weird failure of libs_rtp on Windows
2018-12-30 23:25:14 +00:00
Tim-Philipp Müller 83806dc4e1 rtcpbuffer: fix typo 2018-12-30 18:06:58 +00:00
Tim-Philipp Müller 44b18ea2b6 rtcpbuffer: fix function guards with side effects
Code in g_return_*() must not have side effects, as it
might be compiled out if -DG_DISABLE_CHECKS is used, in
which case we would read garbage off the stack.
2018-12-30 17:28:38 +00:00
Olivier Crête 01a25d81c1 rtcpbuffer: Validate the length of RTCP packets 2018-12-13 14:01:06 -05:00
Justin Kim 5303e2c32b rtcpbuffer: add support XR packet parsing
According to RFC3611, the extended report blocks in XR packet can
have variable length. To visit each block, the iterator should look
into block header. Once XR type is extracted, users can parse the
detailed information by given functions.

Loss/Duplicate RLE
The Loss RLE and the Duplicate RLE have same format so
they can share parsers. For unit test, randomly generated
pseudo packet is used.

Packet Receipt Times
The packet receipt times report block has a list of receipt
times which are in [begin_seq, end_seq).

Receiver Reference Time paser for XR packet
The receiver reference time has ntptime which is 64 bit type.

DLRR
The DLRR report block consists of sub-blocks which has ssrc, last RR,
and delay since last RR. The number of sub-blocks should be calculated
from block length.

Statistics Summary
The Statistics Summary report block provides fixed length
information.

VoIP Metrics
VoIP Metrics consists of several metrics even though they are in
a report block. Data retrieving functions are added per metrics.

https://bugzilla.gnome.org/show_bug.cgi?id=789822
2018-12-13 14:01:06 -05:00
Tim-Philipp Müller ca15315565 gst-libs: include config.h in all source files
This will be needed later when we get our export define from config.h
2018-08-13 09:23:34 +01:00
Mark Nauwelaerts fe6f65b1c2 rtp: fix some GIR annotations
Mostly related to out and array parameters.
2018-04-23 19:33:12 +02:00
Sebastian Dröge d33c407f6b rtp: Require gconstpointer instead of gpointer for gst_rt[c]p_buffer_new_copy_data() 2017-11-17 14:14:55 +02:00
Edward Hervey ae865ec1d1 rtcpbuffer: fix left shift override
Needs to be cast to the target type
2017-11-04 16:56:10 +01:00
Justin Kim 33709106e9 rtcpbuffer: Add XR type
RTCP XR provides supplements information of the report blocks
from SR and RR. This patch is for downgrading warnings when
XR is detected before implementing entire block types of RFC3611.

https://bugzilla.gnome.org/show_bug.cgi?id=789743
2017-11-01 10:54:10 +02:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Tim-Philipp Müller 3ab183c758 rtp: rtcpbuffer: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Tim-Philipp Müller 5377088f1e rtp: rtpcbuffer: fix Since markers
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Stian Selnes 93196092d1 rtcpbuffer: Add API for APP packets
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-24 14:24:11 +02:00
Haakon Sporsheim d8e9a711a0 rtcpbuffer: Add profile-specific extension API.
https://bugzilla.gnome.org/show_bug.cgi?id=761950
2016-03-24 14:22:54 +02:00
Stian Selnes 1586981b1b rtcpbuffer: Fix validation of packets with padding
The padding (if any) is included in the length of the last packet, see
RFC 3550.

Section 6.4.1:
   padding (P): 1 bit
      If the padding bit is set, this individual RTCP packet contains
      some additional padding octets at the end which are not part of
      the control information but are included in the length field. The
      last octet of the padding is a count of how many padding octets
      should be ignored, including itself (it will be a multiple of
      four).

Section A.2:
   *  The padding bit (P) should be zero for the first packet of a
      compound RTCP packet because padding should only be applied, if it
      is needed, to the last packet.

   *  The length fields of the individual RTCP packets must add up to
      the overall length of the compound RTCP packet as received.

https://bugzilla.gnome.org/show_bug.cgi?id=751883
2015-07-06 12:06:47 +03:00
Sebastian Dröge bf5d3bf868 rtcpbuffer: Improve documentation of new functions a bit
Also actually add them to the documentation.
2015-06-05 10:18:21 +02:00
Jose Antonio Santos Cadenas 9931bef8ca rtcpbuffer: Update package validation to support reduced size rtcp packets
According to this section of the rfc.
https://tools.ietf.org/html/rfc5506#section-3.4.2
The validation should be updated to accept more types of RTCP
packages, with this mask change feedback packages will be also
accepted.

Change-Id: If5ead59e03c7c60bbe45a9b09f3ff680e7fa4868
2015-06-05 10:18:21 +02:00
Zaheer Abbas Merali 3ef295d9d6 rtcpbuffer: fix spelling of word in comment 2014-12-12 08:32:15 -08:00
Vincent Penquerc'h ffdf87b121 rtcpbuffer: check claimed data size against available size
Coverity 1208773
2014-04-30 18:13:15 +01:00
Tim-Philipp Müller bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Wim Taymans ca1dac6982 rtcpbuffer: do additional packet checks
Check the packet size and avoid crashing on malformed packets.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=655727
2013-08-26 11:47:40 +02:00
Wim Taymans b848f38215 rtcpbuffer: improve bye parsing
It is an error to ask for a non-existing BYE SSRC, the caller should
check the SSRC count first.
2013-08-26 11:46:11 +02:00
Wim Taymans c1da65da5e rtcpbuffer: calculate FB packet length correctly 2013-08-06 15:44:03 +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
Evan Nemerson f21c4667b9 rtp: add many missing annotations on RTP/RTCP buffer functions 2012-07-17 11:10:37 +02:00
Edward Hervey 2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Wim Taymans 9ef519d99a Improve buffer allocation of wrapped memory 2012-04-01 18:11:23 +02:00
Wim Taymans 345dc31f20 update for buffer api change 2012-03-30 18:15:30 +02:00
Wim Taymans 63f3f27164 update for new memory api 2012-02-22 02:05:24 +01:00
Olivier Crête cb044668d3 rtcpbuffer: Set the map.size to the current size of the RTCP packet
maxsize is the maximum size
2012-01-27 19:01:55 +01:00
Olivier Crête b993b8457d rtpcbuffer: To write inside a RTCP buffer, you must be able to read
So always require read
2012-01-27 19:01:55 +01:00
Olivier Crête 6b559a50fb rtcpbuffer: Return errors if the map mode doesn't match the actions 2012-01-27 19:01:55 +01:00
Olivier Crête ab359d36d5 rtcpbuffer: Don't try to modify read-only buffers 2012-01-27 19:01:55 +01: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
Wim Taymans d9ef75b799 rtcp: handle size update correctly
Do explicit resize to set the size of a buffer instead of setting a value in
unmap.
2012-01-19 15:20:01 +01:00
Sebastian Dröge dc8984d76c Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/app/gstappsrc.c
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/video/videooverlay.c
	gst/playback/gstplaysink.c
	gst/playback/gststreamsynchronizer.c
	tests/check/Makefile.am
	win32/common/libgstvideo.def
2012-01-10 13:15:12 +01:00
Pascal Buhler 0febae7443 rtcpbuffer: prevent overflow of 16bit header length.
RTCP header can be  (2^16 + 1) * 4 bytes long, so when validating a bogus
packet it was possible to get a 16bit overflow resulting in a length of 0.
This would put the gst_rtcp_buffer_validate_data function in a endless loop.

https://bugzilla.gnome.org/show_bug.cgi?id=667313
2012-01-05 11:12:25 +00:00
Tim-Philipp Müller 177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik 14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Wim Taymans fc04bcecbe fix docs 2011-11-14 10:46:56 +01:00
Wim Taymans ccf511a5d4 rename BaseRTP -> RTPBase 2011-11-11 12:24:08 +01:00
Mark Nauwelaerts 06557739ab rtcpbuffer: provide a WRITE map with maximum available size
... which allows adding additional packets and may be needed to counteract
the shrink that implicitly occurred during a map/unmap cycle when adding
a previous packet.
2011-07-09 18:23:18 +02:00
Wim Taymans 9c54ca5254 -base: update for buffer API change 2011-06-13 16:32:56 +02:00
Wim Taymans 4007076b55 Merge branch 'master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
2011-04-06 16:33:56 +02:00
Pascal Buhler 1ad98b0d98 rtcpbuffer: Round to next 32bit word, not current 32bit word at end of SDES chunk 2011-04-05 15:27:03 +02:00
Wim Taymans da1c863711 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/tag/gstvorbistag.c
2011-04-04 11:31:33 +02:00