Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-21rtpdec/srtp: Handle CSRC fields being presentMartin Storsjö
This is untested in practice, but follows the spec. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21rtpdec: Check the return value from av_new_packetMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20rtpdec: Move setting the parsing flags to the actual depacketizersMartin Storsjö
This gets rid of almost all the codec specific details from the generic rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20rtpdec: Split handling of mpeg12 audio/video to a separate depacketizerMartin Storsjö
This also adds checking of mallocs. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20rtpdec: Split mpegts parsing to a normal depacketizerMartin Storsjö
This gets rid of a number of special cases from the common rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20rtpdec: Reorder payload handler registration alphabeticallyMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)Martin Storsjö
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-14rtpdec: Handle more received packets than expected when sending RRMartin Storsjö
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-14rtpdec: Simplify insertion into the linked list queueMartin Storsjö
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-14rtpdec: Remove a woefully misplaced commentMartin Storsjö
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-12rtpdec: Send a valid "delay since SR" value in the RTCP RR packetsMartin Storsjö
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-12rtpdec: Calculate and report packet reception jitterMartin Storsjö
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-12rtpdec: Fix the calculation of expected number of packetsMartin Storsjö
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-12rtpdec: Remove a useless todo commentMartin Storsjö
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-10rtpdec: Add a terminating null byte at the end of the SDES/CNAMEMartin Storsjö
This is required by RFC 3550 (section 6.5): The list of items in each chunk MUST be terminated by one or more null octets, the first of which is interpreted as an item type of zero to denote the end of the list. This was implicitly added as padding before, unless the host name length matched up so no padding was added. This makes wireshark parse the packets properly if other RTCP items are appended to the same packet. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08rtpdec: Support sending RTCP feedback packetsMartin Storsjö
This sends NACK for missed packets and PLI (picture loss indication) if a depacketizer indicates that it needs a new keyframe, according to RFC 4585. This is only enabled if the SDP indicated that feedback is supported (via the AVPF or SAVPF profile names). The feedback packets are throttled to a certain maximum interval (currently 250 ms) to make sure the feedback packets don't eat up too much bandwidth (which might be counterproductive). The RFC specifies a more elaborate feedback packet scheduling. The feedback packets are currently sent independently from normal RTCP RR packets, which is not totally spec compliant, but works fine in the environments I've tested it in. (RFC 5506 allows this, but requires a SDP attribute for enabling it.) Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08rtpdec: Store the dynamic payload handler in the rtpdec contextMartin Storsjö
This allows calling other dynamic payload handler functions if needed. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-03rtsp: Add support for depacketizing RTP data via custom IOMartin Storsjö
To use this, set sdpflags=custom_io to the sdp demuxer. During the avformat_open_input call, the SDP is read from the AVFormatContext AVIOContext (ctx->pb) - after the avformat_open_input call, during the av_read_frame() calls, the same ctx->pb is used for reading packets (and sending back RTCP RR packets). Normally, one would use this with a read-only AVIOContext for the SDP during the avformat_open_input call, then close that one and replace it with a read-write one for the packets after the avformat_open_input call has returned. This allows using the RTP depacketizers as "pure" demuxers, without having them tied to the libavformat network IO. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-03rtpdec: Move the URLContext used for RTCP RR out from the context, to a ↵Martin Storsjö
parameter Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21rtpdec: Pass the sequence number to depacketizersMartin Storsjö
This allows depacketizers to figure out if packets have been lost. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12rtpdec: Limit writing to the buffer sizeMartin Storsjö
This fixes potential buffer overwrites. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-10rtpdec: Remove an outdated todo commentMartin Storsjö
This comment was added in e309128f, in 2002, and has been brought along since then more or less unmodified. The first point of the todo was implemented in dbf30963 in 2006, the second one is not relevant to rtpdec.c (brought along from rtp.c in 8eb793c4 in 2008) but would be more relevant to the rtp muxer, although it isn't a good idea anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-10rtpdec: Rename a static variable to normal naming conventionsMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-09rtpdec: K&R formatting and spelling cosmeticsMartin Storsjö
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-02rtpdec: factorize identical code used in several handlersAnton Khirnov
2012-10-28rtpdec: Cosmetic cleanupMartin Storsjö
Mainly clean up the RTP statistics code, plus a few other obviously misindentend lines. Remove some useless comments, de-doxygenize some comments, add spacing around operators and fix a typo. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-22rtpdec: Don't pass a non-AVClass pointer as log contextMartin Storsjö
The log context is assumed to start with an AVClass pointer. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09rtp: Support packetization/depacketization of opusMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26rtpdec: Remove a useless ff_ prefix from a static symbolMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26rtpdec: Support depacketizing speexDmitry Samonenko
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-09rtp: Depacketization of JPEG (RFC 2435)Samuel Pitoiset
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-07Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov
2012-07-28Add missing libavutil/time.h includes.Anton Khirnov
2012-06-29rtpdec: Don't explicitly include unistd.h any longerRonald S. Bultje
unistd.h used to be required for gethostname. On windows, gethostname is provided by winsock2.h. Now network.h includes both unistd.h and winsock2.h if they exist. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18rtpdec: Add a depacketizer for iLBCMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08rtsp: Don't expose the MS-RTSP RTX data stream to the callerMartin Storsjö
This avoids exposing a dummy AVStream which won't get any data and which will make avformat_find_stream_info wait for info about this stream. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-04avcodec: add a Vorbis parser to get packet durationJustin Ruggles
This also allows for removing some of the Vorbis-related hacks.
2012-02-16rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö
The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14rtpdec: Support H263 in RFC 2190 formatMartin Storsjö
This is different from the "modern" RTP payload formats for H263 as defined by RFC 4629, 2429 and 3555. According to the newer RFCs, this old one is to be considered deprecated and only be used for interoperating with legacy systems. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-22rtpdec: Use our own SSRC in the SDES field when sending RRsMartin Storsjö
The s->ssrc field is the sender's SSRC, we use ssrc + 1 to get a collision free "unique" SSRC for ourselves in the RR part. The SDES block in the RTCP packet should describe ourselves, not the sender. This was fixed for the RR part in 952139a3226b, but wasn't fixed for the SDES part until now. This could cause some Axis cameras to send RTCP BYE packets to us due to the SSRC collision. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-30rtpdec: Add support for G726 audioMiroslav Slugeň
This requires using a separate init function, since there isn't necessarily any fmtp lines for this codec, so parse_sdp_a_line won't be called. Incorporating it with the alloc function wouldn't do either, since it is called before the full rtpmap line is parsed (where the sample rate is extracted). Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18rtpdec: only use RTCP for PTS when synchronizing multiple streamsJohn Brooks
RTCP timestamps are only necessary to synchronize time between multiple streams. For a single stream, the RTP packet timestamp provides more reliable timing. As a result, single-stream RTP sessions should now have accurate and monotonic PTS. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18rtpdec: unwrap RTP timestamps for PTS calculationJohn Brooks
The timestamp field in RTPDemuxContext was unused before this. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-11rtpdec: Simplify finalize_packetJohn Brooks
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06Replace all usage of strcasecmp/strncasecmpReimar Döffinger
All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12rtpdec: Add ff_ prefix to all nonstatic symbolsMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12rtpdec: Read the packet length for all RTCP packet typesJohn Brooks
This allows skipping past unsupported RTCP packet types, as RFC 3550 section 6.1 mandates. Currently this only has any practical effect if a sender puts an unrecognized type before RTCP_BYE in a compounded packet, or (incorrectly) does not put RTCP_SR first. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12rtpdec: Fix the minimum packet length for RTCP SR packetsJohn Brooks
We actually read 20 bytes of these packets. Signed-off-by: Martin Storsjö <martin@martin.st>
2011-07-22rtp: remove disabled codeDiego Biurrun
2011-07-04Do not include mathematics.h in avutil.hMans Rullgard
Signed-off-by: Mans Rullgard <mans@mansr.com>