Commit Graph

12209 Commits

Author SHA1 Message Date
Michael Niedermayer 918b411636 rtpdec: support CSRC
Untested, due to lack of rtp stream with CSRCs, but the code as
is does not work with multiple CSRCs

Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 16:20:31 +01:00
Michael Niedermayer 77041e2474 Merge commit '094a7405e5d8463d7d167d893e04934ec1a84ecd'
* commit '094a7405e5d8463d7d167d893e04934ec1a84ecd':
  x86: ABSB: port to cpuflags
  sdp: Include SRTP crypto params if using the srtp protocol

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 16:12:24 +01:00
Michael Niedermayer b52925d2cd Merge commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05'
* commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05':
  lavf: Add a protocol for SRTP encryption/decryption
  rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 16:05:34 +01:00
Michael Niedermayer e7e0186eeb Merge commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d'
* commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d':
  lavf: Add functions for SRTP decryption/encryption
  lavu: Add an API for calculating HMAC (RFC 2104)

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 15:57:33 +01:00
Michael Niedermayer 353dbaa297 Merge commit '3f111804eb5c603a344706b84b7164cbf7b4e0df'
* commit '3f111804eb5c603a344706b84b7164cbf7b4e0df':
  libvpx: make vp8 and vp9 selectable
  libvpx: support vp9
  nut: support vp9 tag
  mkv: support vp9 tag
  rtpdec: Make variables that should wrap unsigned

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 14:57:57 +01:00
Michael Niedermayer 8686b6c68b Merge commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e'
* commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e':
  build: Remove stray Makefile entry for non-existent VCR1 encoder
  rtpdec: Handle more received packets than expected when sending RR

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 14:42:24 +01:00
Michael Niedermayer eaf1f01169 Merge commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def'
* commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def':
  rtpdec: Simplify insertion into the linked list queue
  rtpdec: Remove a woefully misplaced comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 14:34:32 +01:00
Martin Storsjö 611bf39bde sdp: Include SRTP crypto params if using the srtp protocol
Also print port numbers for this protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:55:29 +02:00
Martin Storsjö 2f3bada63e lavf: Add a protocol for SRTP encryption/decryption
This is mostly useful for encryption together with the RTP muxer,
but could also be set up as IO towards the peer with the SDP
demuxer with custom IO.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:55:10 +02:00
Martin Storsjö 424da30830 rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)
This only takes care of decrypting incoming packets; the outgoing
RTCP packets are not encrypted. This is enough for some use cases,
and signalling crypto keys for use with outgoing RTCP packets
doesn't fit as simply into the API. If the SDP demuxer is hooked
up with custom IO, the return packets can be encrypted e.g. via the
SRTP protocol.

If the SRTP keys aren't available within the SDP, the decryption
can be handled externally as well (when using custom IO).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:54:40 +02:00
Martin Storsjö ab2ad8bd56 lavf: Add functions for SRTP decryption/encryption
This supports the AES_CM_128_HMAC_SHA1_80 and
AES_CM_128_HMAC_SHA1_32 cipher suites (from RFC 4568) at the
moment. The main missing features are replay protection (which can be
added later without changing the internal API), and the F8 and null
ciphers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:54:34 +02:00
Diego Biurrun d8c772de53 nutdec: Always return a value from nut_read_timestamp()
The function is a callback that is called by ff_gen_search with
a constant stream index.

Avoid a false positive on older gcc version.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 02:15:09 +01:00
Giorgio Vazzana 39403c6c1b oggparsetheora: fix comment header parsing
Pass the correct header size to ff_vorbis_comment()

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 20:47:27 +02:00
Luca Barbato 23a610b9d6 nut: support vp9 tag 2013-01-14 19:20:47 +01:00
Tom Finegan 66aabd76a9 mkv: support vp9 tag 2013-01-14 19:20:47 +01:00
Martin Storsjö d596f2b322 rtpdec: Make variables that should wrap unsigned
This makes the behaviour defined when they wrap around. The value
assigned to expected_prior was a uint32_t already.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 20:09:42 +02:00
Martin Storsjö 30b50f79ae rtpdec: Handle more received packets than expected when sending RR
Without this, we'd signal a huge loss rate (due to unsigned
wraparound) if we had received one packet more than expected (that
is, one seq number sent twice). The code has a check for lost_interval
<= 0, but that doesn't do what was intended as long as the variable is
unsigned.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 17:52:02 +02:00
Martin Storsjö d0fe217e39 rtpdec: Simplify insertion into the linked list queue
By using a pointer-to-pointer, we avoid having to keep track
of the previous packet separately.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 17:51:48 +02:00
Martin Storsjö 62761934b0 rtpdec: Remove a woefully misplaced comment
The code below the comment does not at all relate to statistics,
and even if moved to the right place, the comment adds little
value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 17:51:42 +02:00
Michael Niedermayer 6dc8505417 rtmpproto: Fix assignments in if()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:13:00 +02:00
Michael Niedermayer d641ee94b5 lavf: Fix assignments in if()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:12:55 +02:00
Michael Niedermayer a601eb9543 rtmpproto: Fix assignments in if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 05:05:42 +01:00
Michael Niedermayer 1ac5a8d7e3 lavf/mux: Fix assignments in if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 05:05:41 +01:00
Stefano Sabatini 98247e3368 lavf: clarify/extend documentation for AVFormatContext::analyzeduration
"analyzeduration" is not used to detect the input duration, but to
specify the max probe data duration. Fix option description and related
doc entry accordingly.
2013-01-13 15:09:09 +01:00
Stefano Sabatini 78e27c44c3 lavf/utils: clarify/extend messages in avformat_find_stream_info()
In particular, specify the unit of the shown values in case the max probe
size/duration is reached.
2013-01-13 15:09:09 +01:00
Michael Niedermayer 3bcf443f91 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Send a valid "delay since SR" value in the RTCP RR packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-13 14:06:01 +01:00
Michael Niedermayer 6cd1dbe6df Merge commit 'e568db40258d549777ac1c16971678e18a18f5f5'
* commit 'e568db40258d549777ac1c16971678e18a18f5f5':
  rtpdec: Calculate and report packet reception jitter

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-13 14:00:12 +01:00
Michael Niedermayer 6d6eb7c12c Merge commit 'abae27ed3acd0a7c54f11760c5be2d2653c4edf8'
* commit 'abae27ed3acd0a7c54f11760c5be2d2653c4edf8':
  rtpdec: Fix the calculation of expected number of packets
  fate: vp3: Fix fate-vp3-coeff-level64 test dependencies

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-13 13:54:52 +01:00
Martin Storsjö 22c436c85e rtpdec: Send a valid "delay since SR" value in the RTCP RR packets
Previously, we always signalled a zero time since the last RTCP
SR, which is dubious.

The code also suggested that this would be the difference in
RTP NTP time units (32.32 fixed point), while it actually is
in in 1/65536 second units. (RFC 3550 section 6.4.1)

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 19:55:49 +02:00
Martin Storsjö e568db4025 rtpdec: Calculate and report packet reception jitter
This brings back some code that was added originally in 4a6cc061
but never was used, and was removed as unused in 4cc843fa. The
code is updated to actually work and is tested to return sane
values.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 19:53:53 +02:00
Martin Storsjö abae27ed3a rtpdec: Fix the calculation of expected number of packets
The base_seq variable is set to first_seq - 1 (in
rtp_init_sequence), so no + 1 is needed here.

This avoids reporting 1 lost packet from the start.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 19:48:41 +02:00
Paul B Mahol 868ac91c8d frmdec: do not abuse ff_codec_get_id()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-12 14:39:13 +00:00
Michael Niedermayer db1ba2213f lavf: use avpriv_find_pix_fmt instead of ff_
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 14:09:08 +01:00
Michael Niedermayer 15daa8f9dd Merge commit 'f61272f0efd80da437570aad2c40e00f9d3f4fe6'
* commit 'f61272f0efd80da437570aad2c40e00f9d3f4fe6':
  ratecontrol: K&R cosmetic formatting
  rtpdec: Remove a useless todo comment

Conflicts:
	libavcodec/ratecontrol.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 13:32:13 +01:00
Michael Niedermayer e730c3a2cb Merge commit '54cb096ee4558b3bfc28c2fcd6418ce82dc39fe1'
* commit '54cb096ee4558b3bfc28c2fcd6418ce82dc39fe1':
  rtsp: Remove an outdated comment
  rtsp: Remove references to weirdly named variables in other files

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 13:14:05 +01:00
Michael Niedermayer dda2d29748 Merge commit 'c44784c9bb9d0ddf5d39d0dfa640816a57b8f457'
* commit 'c44784c9bb9d0ddf5d39d0dfa640816a57b8f457':
  rtp: Rename a static variable to normal naming conventions
  rtp: Cosmetic cleanup

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 13:00:50 +01:00
Stefano Sabatini 255ec768da lavf/http: fix/extend option descriptions
In particular, favor predicative form over nominal description of the set
parameter. This is more globally consistent.
2013-01-12 10:41:56 +01:00
Martin Storsjö f6804c3e1b rtpdec: Remove a useless todo comment
The question can be answered: No, we do not know the initial sequence
number from the SDP. In certain cases, it can be known from the
RTP-Info response header in RTSP though. (In that case, we use it as
timestamp origin, but not for rtp receiver statistics.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:02:17 +02:00
Martin Storsjö 54cb096ee4 rtsp: Remove an outdated comment
It is unclear what the bug exactly was and if it ever was fixed,
and we don't even support decoding via faad any longer. The
comment has been present since d0deedcb in 2006.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:02:11 +02:00
Martin Storsjö 3900d53fb1 rtsp: Remove references to weirdly named variables in other files
One of them is renamed now, but mentioning it by name serves
no purpose here.  The other table mentioned ceased to exist
under that name in 4934884a1 in 2006.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:02:04 +02:00
Martin Storsjö c44784c9bb rtp: Rename a static variable to normal naming conventions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:01:51 +02:00
Martin Storsjö 58b5971881 rtp: Cosmetic cleanup
Remove leftover debug comments, fix brace placement and
add whitespace, remove unnecessary and weirdly placed braces.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:01:28 +02:00
Michael Niedermayer e5e422bcc3 mxfdec: Fix integer overflow with many channels
Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-11 17:42:04 +01:00
Michael Niedermayer 2e230cf1b5 au: switch to ff_pcm_read_packet() again, after the merge
This fixes G722 durations

Suggested-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-11 15:18:58 +01:00
Michael Niedermayer 6fc0648932 Merge commit '7b8c5b263bc680eff5710bee5994de39d47fc15e'
* commit '7b8c5b263bc680eff5710bee5994de39d47fc15e':
  vc1dec: prevent a crash due missing pred_flag parameter
  matroska: Fix use after free

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-11 13:01:07 +01:00
Paul B Mahol 3ac85bebd5 lavf: remove nonexistent symbols
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-11 10:07:52 +00:00
Dale Curtis ae3d416369 matroska: Fix use after free
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-11 00:12:08 +01:00
Michael Niedermayer 36055aa876 idcin: fix memleak
Found-by: valgrind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 17:26:03 +01:00
Michael Niedermayer 91da6b97c7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_vp8: Don't trim too much data from broken frames
  rtpdec_vp8: Simplify code by using an existing helper function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 13:07:25 +01:00
Michael Niedermayer ac6e074fb7 Merge commit 'ed79093222ceb42f0c3a39095a69af0b32be5450'
* commit 'ed79093222ceb42f0c3a39095a69af0b32be5450':
  rtpdec: Add a terminating null byte at the end of the SDES/CNAME
  yuv4mpeg: do not use deprecated functions
  oggdec: fix faulty cleanup prototype
  idcin: return 0 from idcin_read_packet() on success.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:57:08 +01:00