summaryrefslogtreecommitdiff
path: root/libavformat/rtp.c
Commit message (Collapse)AuthorAge
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* Use proper "" quotes for local header #includesDiego Biurrun2013-02-01
|
* rtp: Make sure the output format pointer is setMartin Storsjö2013-01-24
| | | | | | | | Not sure if this actually happens, but we do the same check when checking payload_type further above in the function, so it might be needed. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Make sure priv_data is set before reading itMartin Storsjö2013-01-23
| | | | | | | This fixes crashes with muxing H263 into RTSP. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Rename a static variable to normal naming conventionsMartin Storsjö2013-01-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Cosmetic cleanupMartin Storsjö2013-01-12
| | | | | | | Remove leftover debug comments, fix brace placement and add whitespace, remove unnecessary and weirdly placed braces. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Don't read priv_data unless it is allocatedMartin Storsjö2012-12-20
| | | | | | | This makes all users of rtpenc_chain (rtsp muxer, sapenc, mov rtp hinting) work again, broken since 8034130e0. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: set the payload type as stream idLuca Barbato2012-11-14
| | | | | | | Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* rtp: Only choose static payload types if the sample rate and channels are rightAdriano Pallavicino2012-07-24
| | | | | | | | | If using a different sample rate or number of channels, use a dynamic payload type instead, where the parameters are passed in the SDP. G722 is a special case where the normal rules don't apply. Signed-off-by: Martin Storsjö <martin@martin.st>
* G.723.1 demuxer and decoderMohamed Naufal Basheer2012-07-22
| | | | Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
* rtpenc: Allow packetizing H263 according to the old RFC 2190Martin Storsjö2012-02-23
| | | | | | | | | | | | | | | | | | According to newer RFCs, this packetization scheme should only be used for interfacing with legacy systems. Implementing this packetization mode properly requires parsing the full H263 bitstream to find macroblock boundaries (and knowing their macroblock and gob numbers and motion vector predictors). This implementation tries to look for GOB headers (which can be inserted by using -ps <small number>), but if the GOBs aren't small enough to fit into the MTU, the packetizer blindly splits packets at any offset and claims it to be a GOB boundary (by using Mode A from the RFC). While not correct, this seems to work with some receivers. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Fix ff_rtp_get_payload_typeMartin Storsjö2011-10-17
| | | | | | | | | | | | It was broken in 3b3ea34655db02d9cd9ea1a4122e920a7fdec602 "Remove all uses of deprecated AVOptions API", where any presence of a payload_type AVOption caused its value to be returned, even if it wasn't set (and thus had the default -1 value). This caused the RTP muxer to be broken. Signed-off-by: Martin Storsjö <martin@martin.st>
* Remove all uses of deprecated AVOptions API.Anton Khirnov2011-10-12
|
* rtp: Simplify ff_rtp_get_payload_typeRafaël Carré2011-09-26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Add a payload type private optionRafaël Carré2011-09-26
| | | | | | | | Specifying the payload type is useful when the type number has already been negotiated before creating the stream, for example in SIP protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: factorize dynamic payload type fallbackRafaël Carré2011-09-23
| | | | | | | Move the identical code in rtp_write_header() and ff_sdp_write_media() inside ff_rtp_get_payload_type() Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Handle G.722 in RTP, and all the exceptions mandated in RFC 3551Martin Storsjö2010-09-15
| | | | Originally committed as revision 25125 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove the inclusion of unneeded headersLuca Abeni2010-01-11
| | | | Originally committed as revision 21152 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not return payload type 34 for H.263 (it is deprecated)Luca Abeni2009-04-07
| | | | Originally committed as revision 18346 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remame rtp_get_codec_info() to ff_rtp_get_codec_info(), as it is notLuca Abeni2009-02-17
| | | | | | a static function Originally committed as revision 17390 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename rtp_get_payload_type() to ff_rtp_get_payload_type(), as it is notLuca Abeni2009-02-16
| | | | | | a static function Originally committed as revision 17364 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge rtp_internal.h in rtp.h, and remove rtp_internal.hLuca Abeni2009-01-27
| | | | Originally committed as revision 16817 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not set sample_rate = 90000 for mp2 and mp3 audio over RTPLuca Abeni2008-06-24
| | | | Originally committed as revision 13943 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full path for #includes from another directory.Diego Biurrun2008-05-09
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a comment about missing entriesLuca Abeni2008-03-31
| | | | Originally committed as revision 12646 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use the correct size for the enc_name field (removing the arbitrary "50" size)Luca Abeni2008-03-31
| | | | Originally committed as revision 12645 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless entries from AVRtpPayloadTypesLuca Abeni2008-03-31
| | | | Originally committed as revision 12644 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Support mp3 audio in the RTP muxerLuca Abeni2008-03-31
| | | | Originally committed as revision 12643 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make AVRtpPayloadTypes static and constantDiego Pettenò2008-01-06
| | | | | | Patch by Diego 'Flameeyes' Pettenò (flameeyes AT gmail DOT com) Originally committed as revision 11432 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split the RTP muxer out of rtp.c, to simplify the RTSP demuxer's dependenciesLuca Abeni2008-01-04
| | | | Originally committed as revision 11408 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split the RTP demuxing functions out of rtp.c, to simplify the RTP muxer's ↵Luca Abeni2008-01-04
| | | | | | dependencies Originally committed as revision 11406 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix some spelling mistakes.Diego Biurrun2007-12-02
| | | | Originally committed as revision 11125 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use dynamically allocated ByteIOContext in AVFormatContextBjörn Axelsson2007-11-21
| | | | | | | patch by: Björn Axelsson, bjorn d axelsson a intinor d se thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007 Originally committed as revision 11071 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add MPEG2 support to the RTP muxerLuca Abeni2007-11-16
| | | | Originally committed as revision 11047 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove the "AVRtpPayloadTypes[i].pt == i" assumption from RTP and RTSPLuca Abeni2007-11-16
| | | | | | code (this is needed for supporting MPEG2 video in the RTP muxer) Originally committed as revision 11046 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not send too many RTCP packets (according to RFC 3550, the minimumLuca Abeni2007-11-05
| | | | | | RTCP interval should be 5 seconds) Originally committed as revision 10930 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use a symbolic name for the payload size of an RTCP Sender Report packetLuca Abeni2007-11-05
| | | | Originally committed as revision 10929 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Allow to set the maximum number of frames per RTP packet (and add support forLuca Abeni2007-10-02
| | | | | | this in the AAC packetizer) Originally committed as revision 10647 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix a warning by removing an useless assignment (buf_ptr should be onlyLuca Abeni2007-09-24
| | | | | | used in the RTP muxer, and not in the demuxer) Originally committed as revision 10561 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Support for AAC streaming over RTP. Fragmentation is not implemented yetLuca Abeni2007-09-14
| | | | Originally committed as revision 10491 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix timestamps in RTP packets (now, MPEG1 video with B frames works correctly)Luca Abeni2007-09-10
| | | | Originally committed as revision 10469 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Properly set RTP and NTP timestamps in RTCP SR packetsLuca Abeni2007-09-10
| | | | Originally committed as revision 10468 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move the RTP packetization code for MPEG12 video in its own file (rtp_mpv.c)Luca Abeni2007-08-24
| | | | Originally committed as revision 10201 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace all occurrences of AVERROR_IO with AVERROR(EIO).Panagiotis Issaris2007-07-19
| | | | Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use AV_RB* macros where appropriate.Ronald S. Bultje2007-07-06
| | | | | | | | patch by Ronald S. Bultje, rsbultje gmail com thread: Re: [FFmpeg-devel] remove int readers date: Sat, 23 Jun 2007 09:32:12 -0400 Originally committed as revision 9499 to svn://svn.ffmpeg.org/ffmpeg/trunk