summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
Commit message (Collapse)AuthorAgeFilesLines
* rtp: convert to new channel layout APIVittorio Giovara2022-03-151-2/+2
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: Fix negative missed packets in warning messageLimin Wang2022-01-301-2/+7
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec: Make ff_rtp_handler_iterate() staticAndreas Rheinhardt2021-09-081-3/+12
| | | | | | Possible since 61974537610d82bd35b6e3ac91ccd270c6bdc711. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rtpdec: Fix prft wallclock time.Alok Priyadarshi2021-03-301-2/+7
| | | | | | | | | Timestamp difference is available in media timebase (1/90K) where as rtcp time is in the default microseconds timebase. This patch fixes the calculated prft wallclock time by rescaling the timestamp delta to the microseconds timebase. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: attach producer reference time if availableAlok Priyadarshi2021-03-231-0/+19
| | | | | | | This produces true wallclock time at rtp source instead of the local wallclock time at rtp client. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: Avoid allocations of small dynamic buffersAndreas Rheinhardt2021-01-311-25/+13
| | | | | | | | Besides avoiding allocations this also fixes a design defect of ff_rtp_send_punch_packets: It did not return an error in case of these allocations failed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/rtpdec: Constify RTPDynamicProtocolHandlersAndreas Rheinhardt2021-01-241-11/+11
| | | | | | Also constify the list of pointers to said RTPDynamicProtocolHandlers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/rtpdec: export Opus extradata in ff_rtp_parse_open()Jonathan Baudanza2021-01-031-0/+51
|
* avformat: remove unneeded avio_flush() calls before calling avio_close_dyn_buf()Marton Balint2020-01-071-2/+0
| | | | | | avio_close_dyn_buf() also does avio_flush(). Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/rtpdec: Constify several pointers.Carl Eugen Hoyos2018-02-111-3/+3
| | | | | | Fixes two warnings: libavformat/rtpdec.c:155:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] libavformat/rtpdec.c:168:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
* lavf/rtp: replace linked list with arrayJosh de Kock2018-02-061-61/+77
|
* rtp: rfc4175: add handler for YCbCr-4:2:2Damien Riegel2017-04-051-0/+1
| | | | | | | | | | | This adds partial support for the RFC 4175 (raw video over RTP). The only supported formats are the YCbCr-4:2:2 8 bit because it's natively supported by FFmpeg with pixel format UYVY, and 10 bit which requires the vrawdepay codec to convert the payload in a format handled by FFmpeg. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avformat/rtpdec: Add support for 24 bit RTSP audio playbackTimur Aydin2016-11-051-0/+7
| | | | | | | | | When ffplay is used to play from the RTSP URL that serves 24 bit audio content, ffplay fails to recognize the audio codec format. The attached patch adds support for playing 24 bit audio content over RTSP by defining a dynamic payload handler for "L24". Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/rtpdec_g726: Map mime type G726 to g726le.Carl Eugen Hoyos2016-10-221-0/+4
| | | | | | | | | | Add new mime types AAL2-G726 for g726 as suggested in rfc 3551. This patch will break interaction with applications that incorrectly use big-endian G.726 with mime type G726 but we know of at least one device (DVTel camera) that correctly implements the rfc, so do the same. Fixes ticket #5890.
* Merge commit 'b7f98659f21dce438c33b512e25fd64b8d07c347'Clément Bœsch2016-06-291-1/+2
|\ | | | | | | | | | | | | * commit 'b7f98659f21dce438c33b512e25fd64b8d07c347': Remove unnecessary get_bits.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Remove unnecessary get_bits.h #includesDiego Biurrun2016-06-071-1/+2
| |
* | Merge commit '9ea78fd00a49f0691c1a5134eb59d4e5bb380a2a'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '9ea78fd00a49f0691c1a5134eb59d4e5bb380a2a': rtpdec: Always check if we have the next packet queued Merged-by: Clément Bœsch <u@pkh.me>
| * rtpdec: Always check if we have the next packet queuedMartin Storsjö2016-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | It doesn't matter what the actual reason for not returning an AVPacket was - if we didn't return any packet and we have the next one queued, parse it immediately. (rtp_parse_queued_packet always consumes a queued packet if one exists, so there's no risk for infinite loops.) Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avformat/rtpdec: Remove stray debug av_log()Michael Niedermayer2016-03-261-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | rtpdec: support for VC-2 HQ RTP payload format (draft v1)Thomas Volkert2016-03-221-0/+2
| |
* | Merge commit '8d918a98aa24134a043d578ef45bae363dbed9db'Derek Buitenhuis2016-02-241-10/+8
|\ \ | |/ | | | | | | | | | | * commit '8d918a98aa24134a043d578ef45bae363dbed9db': rtpdec: Use the right logging context Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * rtpdec: Use the right logging contextDiego Biurrun2016-02-191-10/+8
| |
* | Merge commit '22cc57da64bfd73f2206969486b0aa183ee76479'Hendrik Leppkes2015-09-171-3/+7
|\ \ | |/ | | | | | | | | | | * commit '22cc57da64bfd73f2206969486b0aa183ee76479': rtpdec: Forward the memory failure Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtpdec: Forward the memory failureLuca Barbato2015-09-161-3/+7
| | | | | | | | | | | | And avoid a memory leak. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * rtpdec: inform jitter buffer sizeEloi BAIL2015-09-161-0/+4
| | | | | | | | | | | | | | | | This commit print as AV_LOG_VERBOSE the jitter buffer size. It might be the default value or the value set by application. Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ff7f6ea9db2a77d74f7e68a716f53ba1f3f85017'Hendrik Leppkes2015-09-161-2/+2
|\ \ | |/ | | | | | | | | | | * commit 'ff7f6ea9db2a77d74f7e68a716f53ba1f3f85017': rtpdec: add a trace when jitter buffer is full Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtpdec: add a trace when jitter buffer is fullEloi BAIL2015-09-161-1/+4
| | | | | | | | | | | | | | | | This commit adds a warning trace when jitter buffer is full. It helps to understand leading decoding issues. Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtpdec: add a trace when jitter buffer is fullEloi BAIL2015-09-151-1/+4
| | | | | | | | | | | | | | This commit adds an error trace when jitter buffer is full. It helps to understand leading decoding issues. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | rtpdec: inform jitter buffer sizeEloi BAIL2015-09-151-0/+4
| | | | | | | | | | | | | | | | This commit print as AV_LOG_INFO the jitter buffer size. It might be the default value or the value set by application. Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-201-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-191-2/+2
| | | | | | | | This applies to every library where performance is not critical.
| * rtpdec: experimental VP9 depacketizer (draft 0)Thomas Volkert2015-03-051-0/+1
| | | | | | | | | | | | The code was tested with live555 server. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat: map T.140 RTP codec to textGilles Chanteperdrix2015-03-011-1/+1
| | | | | | | | | | | | | | | | This makes more sense than mapping to AV_CODEC_ID_SUBRIP. Nothing indicates that a T.140 track contains subrip sub-titles. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ec96a89c3e507cf0fb1f2b159b28a53f2bad9a74'Michael Niedermayer2015-02-241-1/+1
|\ \ | |/ | | | | | | | | | | * commit 'ec96a89c3e507cf0fb1f2b159b28a53f2bad9a74': rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Don't pass non-const pointers to fmtp attribute parsing functionsMartin Storsjö2015-02-241-1/+1
| | | | | | | | | | | | | | This makes it clear that the individual parsing functions can't touch the parsed out value. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '353b492d0f2a21ae8eb829db1ac01b54b2a4d202'Michael Niedermayer2015-02-241-1/+2
|\ \ | |/ | | | | | | | | | | * commit '353b492d0f2a21ae8eb829db1ac01b54b2a4d202': rtpdec: Change enc_name to a pointer instead of a fixed-size buffer Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Change enc_name to a pointer instead of a fixed-size bufferMartin Storsjö2015-02-241-1/+2
| | | | | | | | | | | | | | This avoids allocating space for a too large buffer for all the name strings. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '04a1be8e28e81f3967eace7705343c450616cc95'Michael Niedermayer2015-02-241-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '04a1be8e28e81f3967eace7705343c450616cc95': libavformat: add T.140 RTP depacketization (RFC 4103) Conflicts: libavformat/rtpdec.c libavformat/version.h See: af940e6cb1212d4338e55c03498ef5ae40e6e749 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: add T.140 RTP depacketization (RFC 4103)Gilles Chanteperdrix2015-02-241-0/+7
| | | | | | | | | | | | Map this to AV_CODEC_ID_TEXT. Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtpdec: DV depacketizer (RFC 6469)Thomas Volkert2015-02-221-0/+1
| | | | | | | | | | | | (tested with live555 RTSP server) Signed-off-by: Martin Storsjö <martin@martin.st>
| * libavformat: add robust MPEG audio depacketization (RFC 5219)Gilles Chanteperdrix2015-02-211-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * libavformat: add AC3 RTP depacketization (RFC 4184)Gilles Chanteperdrix2015-02-211-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtpdec: fix issue with conversion from unsigned to signedGilles Chanteperdrix2015-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When receiving an RTCP packet, the difference between the last RTCP timestamp and the base timestamp may be negative. As these timestamps are of the uint32_t type, the result becomes a large integer. Cast the difference to int32_t to avoid this issue. The result of this issue is very large start times for RTSP streams, and difficulty to restart correctly after a pause. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtp: Initial H.261 supportThomas Volkert2014-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The packetizer only supports splitting at GOB headers - if such aren't available frequently enough, it splits at any random byte offset (not at a macroblock boundary either, which would be allowed by the spec) and sends a payload header pretend that it starts with a GOB header. As long as a receiver doesn't try to handle such cases cleverly but just drops broken frames, this shouldn't matter too much in practice. Signed-off-by: Martin Storsjö <martin@martin.st>
* | libavformat/rtpdec: fix issue with conversion from unsigned to signedGilles Chanteperdrix2015-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When receiving an RTCP packet, the difference between the last RTCP timestamp and the base timestamp may be negative. As these timestamps are of the uint32_t type, the result becomes a large integer. Cast the difference to int32_t to avoid this issue. The result of this issue is very large start times for RTSP streams, and difficulty to restart correctly after a pause. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>