summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
Commit message (Collapse)AuthorAge
* avcodec: add a Vorbis parser to get packet durationJustin Ruggles2012-03-03
| | | | This also allows for removing some of the Vorbis-related hacks.
* rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö2012-02-16
| | | | | | The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Support H263 in RFC 2190 formatMartin Storsjö2012-02-14
| | | | | | | | | 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>
* rtpdec: Use our own SSRC in the SDES field when sending RRsMartin Storsjö2012-01-21
| | | | | | | | | | | | | | | 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>
* rtpdec: Add support for G726 audioMiroslav Slugeň2011-11-30
| | | | | | | | | | | 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>
* rtpdec: only use RTCP for PTS when synchronizing multiple streamsJohn Brooks2011-11-18
| | | | | | | | | 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>
* rtpdec: unwrap RTP timestamps for PTS calculationJohn Brooks2011-11-18
| | | | | | The timestamp field in RTPDemuxContext was unused before this. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Simplify finalize_packetJohn Brooks2011-11-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | 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>
* rtpdec: Add ff_ prefix to all nonstatic symbolsMartin Storsjö2011-10-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Read the packet length for all RTCP packet typesJohn Brooks2011-10-12
| | | | | | | | | | | 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>
* rtpdec: Fix the minimum packet length for RTCP SR packetsJohn Brooks2011-10-12
| | | | | | We actually read 20 bytes of these packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: remove disabled codeDiego Biurrun2011-07-21
|
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Mark some variables with av_unusedMans Rullgard2011-06-03
| | | | | | | Most of these variables are only used in av_dlog statements, some are required but not used by other macros. Signed-off-by: Mans Rullgard <mans@mansr.com>
* configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* avio: make url_write() internal.Anton Khirnov2011-04-04
|
* avio: make url_open_dyn_packet_buf internal.Anton Khirnov2011-04-03
| | | | | | | It doesn't look fit to be a part of the public API. Adding a temporary hack to ffserver to be able to use it, should be cleaned up when somebody is up for it.
* avio: avio_ prefix for url_close_dyn_bufAnton Khirnov2011-04-03
|
* avio: avio_ prefix for url_open_dyn_bufAnton Khirnov2011-04-03
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: rename put_flush_packet -> avio_flushAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio: avio_ prefixes for put_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace dprintf with av_dlogLuca Barbato2011-01-29
| | | | dprintf clashes with POSIX.1-2008
* Make RTPFirstDynamicPayloadHandler static to rtpdec.cDiego Elio Pettenò2011-01-25
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Make ff_realmedia_mp3_dynamic_handler static.Diego Elio Pettenò2011-01-25
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtpdec: Don't set RTP timestamps if they already are set by the depacketizerMartin Storsjö2011-01-06
| | | | | | | | | | | | | | For MS-RTSP, we don't always get RTCP packets (never?), so the earlier timestamping code never wrote anything into pkt->pts. The rtpdec_asf depacketizer just sets the dts of the packet, so if the generic RTP timestamping is used, too, we get inconsistent timestamps. Therefore, skip the generic RTP timestamp algorithm if the depacketizer already has set something. This fixes "Invalid timestamps" warnings, present since SVN rev 26187. Originally committed as revision 26241 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Emit timestamps for packets before the first RTCP packet, tooMartin Storsjö2011-01-01
| | | | | | | | Emitted timestamps in each stream start from 0, for the first received RTP packet. Once an RTCP packet is received, that one is used for sync, emitting timestamps that fit seamlessly into the earlier ones. Originally committed as revision 26187 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Don't set the RTP time base from the sample rate if no sample rate is setMartin Storsjö2010-12-15
| | | | | | | | | This also reverts SVN rev 26016, which incorrectly overwrote the time base with 90 kHz for all streams, regardless of what was set by the SDP parsing. The stream that triggered the fix in 26016 still works after this commit. Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reinstate default time_base for rtp streamsLuca Barbato2010-12-15
| | | | | | The generic default is 0/0 and that obviously triggers once the value is used. Originally committed as revision 26016 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp/rtpdec: Set the AVStream time_base directly in rtsp when it is knownMartin Storsjö2010-12-07
| | | | | | | | | | | | This fixes cases where the RTP time base and the sample rate of the stream differ. Previously, the AVStream time_base was unconditionally set to the sample rate (which initially was set to one value when parsing the rtpmap field in the SDP, but later overridden by an a=SampleRate field). Additionally, this makes the code actually use the stream time base set in rtpmap for video codecs, instead of hardcoding it to always be 90 kHz. Originally committed as revision 25908 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Handle MP3 in RealRTSPMartin Storsjö2010-12-07
| | | | | | | This fixes playback of a RealRTSP/MP3 URL from the RTSP samples on MultimediaWiki. Originally committed as revision 25906 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Skip padding bytes at the end of packetsMartin Storsjö2010-12-06
| | | | Originally committed as revision 25896 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Add functions for finding depacketizers by name or payload idMartin Storsjö2010-12-05
| | | | Originally committed as revision 25891 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Add a dynamic payload handler for the x-Purevoice format, RFC 2658Martin Storsjö2010-12-05
| | | | | | This fixes roundup issue 2390. Originally committed as revision 25889 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Return AVERROR(EAGAIN) for mpegts parsing errorsMartin Storsjö2010-10-15
| | | | | | | | | | This indicates that there was no error that needs to be reported to the caller, so we can move on to parse the next packet immediately, if available. The only error code that ff_mpegts_parse_packet can return indicates that there was no packet to return from the provided data, for which it returns -1. Originally committed as revision 25496 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Don't use the no reordering codepath if there already is a queueMartin Storsjö2010-10-13
| | | | Originally committed as revision 25462 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Handle wrapping seq numbers in has_next_packet properlyMartin Storsjö2010-10-13
| | | | Originally committed as revision 25461 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Parse the next packet in the sequence if it is available, if the ↵Martin Storsjö2010-10-13
| | | | | | previous packet didn't return any data Originally committed as revision 25460 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Return AVERROR(EAGAIN) if out of data for mpegts, pass returned ↵Martin Storsjö2010-10-13
| | | | | | error codes through Originally committed as revision 25459 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Don't call the depacketizer to return more data unless it actually ↵Martin Storsjö2010-10-13
| | | | | | | | | said it has more data It may have returned a negative number for an error (e.g. AVERROR(EAGAIN), if more data is required for it to be able to return a complete packet). Originally committed as revision 25458 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Split out storing of the depacketization return value to a separate ↵Martin Storsjö2010-10-13
| | | | | | | | function This makes the code less fragile and easier to understand. Originally committed as revision 25457 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Set prev_ret properly when parsing more data from mpegts RTP packetsMartin Storsjö2010-10-08
| | | | Originally committed as revision 25404 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Store the previous return value for mpegts when it was -1, tooMartin Storsjö2010-10-08
| | | | Originally committed as revision 25403 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Keep track of the previous return value from ↵Robert Schlabbach2010-10-08
| | | | | | | | rtp_parse_packet_internal for mpegts packets Patch by Robert Schlabbach, robert_s at gmx dot net Originally committed as revision 25402 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Handle RTP header extensionRobert Schlabbach2010-10-06
| | | | | | | | This fixes roundup issue 2270. Patch by Robert Schlabbach, robert_s at gmx dot net Originally committed as revision 25372 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add RTP depacketization of the X-QT QuickTime formatMartin Storsjö2010-10-06
| | | | Originally committed as revision 25371 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Reorder received RTP packets according to the seq numberMartin Storsjö2010-10-01
| | | | | | Reordering is enabled only when receiving over UDP. Originally committed as revision 25294 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Split out the part of rtp_parse_packet that does the parsing of new ↵Martin Storsjö2010-10-01
| | | | | | packets Originally committed as revision 25293 to svn://svn.ffmpeg.org/ffmpeg/trunk