aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/sdp.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/sdp: add framerate entryMarvin Scholz2025-06-111-0/+3
| | | | | This also updates fate-lavf-mov_rtphint as there the SDP is included in the muxed file.
* avformat: add AV1 RTP depacketizer and packetizerChris Hodges2025-02-261-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Add RTP packetizer and depacketizer according to (most) of the official AV1 RTP specification. This enables streaming via RTSP between ffmpeg and ffmpeg and has also been tested to work with AV1 RTSP streams via GStreamer. It also adds the required SDP attributes for AV1. AV1 RTP encoding is marked as experimental due to draft specification status, debug amount reduced and other changes suggested by Tristan. Added optional code for searching the sequence header to determine the first packet for broken AV1 encoders / parsers. Stops depacketizing on corruption until next keyframe, no longer prematurely issues packet on decoding if temporal unit was not complete yet. Change-Id: I90f5c5b9d577908a0d713606706b5654fde5f910 Signed-off-by: Chris Hodges <chrishod@axis.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avformat/hevc: add a log context to ff_isom_write_{hvcc,lhvc}James Almer2024-12-081-3/+4
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: split off generic NAL function helpers into their own fileJames Almer2024-06-201-2/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/sdp: Check before appending ","Michael Niedermayer2024-06-071-0/+3
| | | | | | | Found by reviewing code related to CID1500301 String not null terminated Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/sdp: Add missing version.h includeCarl Eugen Hoyos2022-08-311-0/+1
| | | | Fixes lavf version output in SDP, regression since 4eb9232c
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-161-0/+2
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* sdp: convert to new channel layout APIVittorio Giovara2022-03-151-16/+16
| | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpenc_rfc4175: support for interlace formatLimin Wang2022-01-121-1/+4
| | | | | | | | | | | | | | | | | Below are steps how to test on your local host: wget --no-check-certificate https://samples.ffmpeg.org/MPEG2/interlaced/burosch1.mpg 1. interlace format: ffmpeg -re -i ./burosch1.mpg -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000 copy and create sdp file test.sdp ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp 2. progressive format: ffmpeg -re -i ./burosch1.mpg -vf yadif -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000 copy and create sdp file test.sdp ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_ratesAndreas Rheinhardt2022-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | avpriv_mpeg4audio_sample_rates has a size of 64B and it is currently avpriv; a clone of it exists in aacenctab.h and from there it is inlined in aacenc.c (which also uses the avpriv version) and in the FLV muxer. This means that despite it being avpriv both libavformat as well as libavcodec have copies already. This situation is clearly suboptimal. Given the overhead of exporting symbols (for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn, 8B .got, 4B hash + twice the size of the name (here 31B)) the object is unavprived, i.e. duplicated into libavformat when creating a shared build; but the duplicates in the AAC encoder and FLV muxer are removed. This involves splitting of the sample rate table into a file of its own; this allowed to break some spurious dependencies (e.g. both the AAC encoder as well as the Matroska demuxer actually don't need the mpeg4audio_get_config stuff). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/sdp: Fix use of uninitialised valueAndreas Rheinhardt2021-12-201-1/+1
| | | | | | | Fixes Coverity ticket #1495831. Regression since fe31708eaa10af42507b8db773d5af5a56e1aff4. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/sdp: add more thorough error handlingAnton Khirnov2021-12-171-73/+117
| | | | | | Return error codes when constructing a stream config fails, rather than just disregarding the failure and continuing. Propagate the error codes from av_sdp_create().
* lavf/sdp: reindent switch() according to our conventionsAnton Khirnov2021-12-171-252/+252
|
* lavf/sdp: add const qualifiers where appropriateAnton Khirnov2021-12-171-11/+12
| | | | Declares that these structs are read-only for this code.
* avformat/utils: Make ff_data_to_hex() zero-terminate the stringAndreas Rheinhardt2021-12-081-3/+0
| | | | | | Most callers want it that way anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rtp: support RGB/BGR for rfc4175Limin Wang2021-11-251-0/+6
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: suppport YUV 4:2:2 10-bit for rfc4175Limin Wang2021-11-251-0/+5
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpenc: adds partial support for the RFC 4175Limin Wang2021-11-251-0/+25
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: remove deprecated AVStream.codecJames Almer2021-04-271-18/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/sdp: add missing FF_API_LAVF_AVCTX checkJames Almer2020-10-011-0/+4
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/sdp: Fix potential write beyond end of bufferAndreas Rheinhardt2020-07-101-1/+1
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/sdp: Change pointer to configuration from char* to uint8_t*.Carl Eugen Hoyos2019-03-201-1/+2
| | | | | | | | This is also what av_base64_encode() expects. Fixes the following warnings with clang: libavformat/sdp.c:394:40: warning: implicit conversion from 'int' to 'char' changes value from 254 to -2 libavformat/sdp.c:395:40: warning: implicit conversion from 'int' to 'char' changes value from 205 to -51 libavformat/sdp.c:396:40: warning: implicit conversion from 'int' to 'char' changes value from 186 to -70
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-281-2/+2
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/rtpenc: Add support for 24 bit pcm encoding as defined by RFC 3190.Carl Eugen Hoyos2017-10-291-0/+6
| | | | Fixes ticket #6770.
* lavf/rtpenc: Add support for little-endian G.726.Carl Eugen Hoyos2017-10-071-0/+8
|
* lavf/sdp: Fix MIME-type for big-endian G.726.Carl Eugen Hoyos2017-10-071-1/+1
| | | | | RFC 3551 defines "G726" for little-endian ("right-justified") G.726 and announces "AAL2-G726" for big-endian ("left-justified") G.726.
* Remove some unneeded casts of bit_rate.Carl Eugen Hoyos2017-09-221-1/+1
|
* cosmetics: fix some misspelled wordsJames Almer2016-07-171-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* 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>
| * sdp: fix opus sprop-stereo fmtp syntaxMark Harris2016-03-011-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtpenc: packetizer for VP9 RTP payload format (draft v2)Thomas Volkert2016-06-131-0/+4
| |
* | rtpenc: packetizer for VC-2 HQ RTP payload format (draft v1)Thomas Volkert2016-05-031-0/+3
| |
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-90/+91
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-87/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | sdp: fix opus sprop-stereo fmtp syntaxMark Harris2016-03-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: Switch bitrate to 64bit unless compatibility with avconv was requested.Michael Niedermayer2015-09-151-1/+1
| |
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-271-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'Michael Niedermayer2014-12-191-2/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f': rtp: Initial H.261 support Conflicts: Changelog libavformat/rtpdec_h261.c libavformat/rtpenc_h261.c libavformat/sdp.c libavformat/version.h See: 50a4d5cfc6749932347ee38c25b5040aea4b13a0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: Initial H.261 supportThomas Volkert2014-12-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avcodec/xiph: mark returned header pointers const from ↵Michael Niedermayer2014-12-141-1/+1
| | | | | | | | | | | | | | avpriv_split_xiph_headers() Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e5cfc8fdad901c9487fe896421972852f38bcf5'Michael Niedermayer2014-10-151-2/+106
|\| | | | | | | | | | | | | * commit 'e5cfc8fdad901c9487fe896421972852f38bcf5': sdp: Provide out of bound parameter sets for HEVC if extradata is set Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * sdp: Provide out of bound parameter sets for HEVC if extradata is setMartin Storsjö2014-10-151-2/+106
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7'Michael Niedermayer2014-10-071-30/+12
|\| | | | | | | | | | | | | * commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7': sdp: Simplify parsing/conversion of H264 extradata Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * sdp: Simplify parsing/conversion of H264 extradataMartin Storsjö2014-10-061-30/+12
| | | | | | | | | | | | | | | | | | | | | | | | By using ff_avc_write_annexb_extradata instead of the h264_mp4toannexb BSF, the code for doing the conversion itself is kept much shorter, there's less state to restore at the end, we don't risk leaving the AVCodecContext in an inconsistent state if returning early due to errors, etc. Also add a missing free if the base64 encoding fails. Signed-off-by: Martin Storsjö <martin@martin.st>
* | sdp: add support for H.261Thomas Volkert2014-10-041-0/+13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a05f5052fef3b3743fab7846da12861d8a8098ec'Michael Niedermayer2014-09-291-1/+11
|\| | | | | | | | | | | | | * commit 'a05f5052fef3b3743fab7846da12861d8a8098ec': sdp: Make opus declaration conform to the spec Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * sdp: Make opus declaration conform to the specTimothy B. Terriberry2014-09-291-1/+11
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc'Michael Niedermayer2014-09-251-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc': rtpenc: HEVC/H.265 support Conflicts: Changelog libavformat/rtpenc.c libavformat/rtpenc_hevc.c libavformat/version.h See: 6821a5a4adcb40c458356e8bb90416dd8f5dd6b2 Merged-by: Michael Niedermayer <michaelni@gmx.at>