summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
Commit message (Collapse)AuthorAge
* libavformat/avformat.h: Move docs inside of #ifMax Weber2017-06-30
| | | | | | | Otherwise AVTimebaseSource gets av_apply_bitstream_filters' documentation in doxygen. Signed-off-by: Max Weber <mii7303@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec, avformat: deprecate anything related to side data mergingwm42017-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch deprecates anything that has to do with merging/splitting side data. Automatic side data merging (and splitting), as well as all API symbols involved in it, are removed completely. Two FF_API_ defines are dedicated to deprecating API symbols related to this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates AVFMT_FLAG_KEEP_SIDE_DATA in libavformat. Since it was claimed that changing the default from merging side data to not doing it is an ABI change, there are two additional FF_API_ defines, which stop using the side data merging/splitting by default (and remove any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec, and FF_API_LAVF_MERGE_SD in libavformat. It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD are quickly defined to 0 in the next ABI bump, while the API symbols are retained for a longer time for the sake of compatibility. AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for most of the time it will still be defined. Keep in mind that no code exists that actually tries to unset this flag for any reason, nor does such code need to exist. Code setting this flag explicitly will work as before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once side data merging has been removed from libavformat. In order to avoid that anyone in the future does this incorrectly, here is a small guide how to update the internal code on bumps: - next ABI bump (probably soon): - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it - define FF_API_MERGE_SD to 0, and remove all code covered by it - next API bump (typically two years in the future or so): - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered by it - define FF_API_MERGE_SD_API to 0, and remove all code covered by it This forces anyone who actually wants packet side data to temporarily use deprecated API to get it all. If you ask me, this is batshit fucked up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be set by default was rejected as an ABI change, so I'm going all the way to get rid of this once and for all. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: fix AVStream private fields markerwm42017-03-02
| | | | | | | | | | | | Public fields were added after the private fields (negating the entire point of this). New private fields go into AVStreamInternal anyway. The new marker was set by guessing which fields are supposed to be private and wshich not. recommended_encoder_configuration is accessed by ffserver_config.c directly, and is supposed to use the public API. ffmpeg.c accesses AVStream.cur_dts, even though it's a private field, but that seems to be an older error.
* avcodec, avutil, avformat: remove AVOption requirement for some fieldswm42017-03-02
| | | | | | | | | | Allow all struct fields to be accessed directly, as long as they're public. Before this change, many fields were "public", but could be accessed via AVOption only. This meant they were effectively not public, but were present for documentation purposes, which was incredibly confusing at best.
* ffmpeg: pass output stream duration as a hint to the muxerTobias Rapp2017-01-19
| | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Add max_streams optionMichael Niedermayer2016-12-08
| | | | | | This allows user apps to stop OOM due to excessive number of streams Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: fix the wrong warning msg and comments about av_find_stream_infoJun Zhao2016-12-05
| | | | | | | | | av_find_stream_info() was deprecated by avformat_find_stream_info(), correct the warning message in the avformat_find_stream_info() and comments in the avformat.h Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: add av_stream_add_side_data()James Almer2016-11-18
| | | | | | | | Functionally similar to av_packet_add_side_data(). Allows the use of an already allocated buffer as stream side data. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "img2 encoder: allow %t in filename, based on patch from Yuval Adam"Michael Niedermayer2016-11-01
| | | | | | | breaks API Found-by: jamrial This reverts commit 1a956c64c8eff5edecb004fc7aafd21207e6485c.
* img2 encoder: allow %t in filename, based on patch from Yuval Adamrogerdpack2016-11-01
| | | | | Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: add AV_DISPOSITION_TIMED_THUMBNAILSRodger Combs2016-10-24
| | | | Reviewed-By: Michael Niedermayer <michael@niedermayer.cc>
* lavf/mux: add avformat_init_outputRodger Combs2016-10-24
| | | | | | This allows a consumer to run the muxer's init function without actually writing the header, which is useful in chained muxers that support automatic bitstream filtering.
* avformat: add av_stream_get_codec_timebase()James Almer2016-09-27
| | | | | | This will allow ffmpeg.c to stop using AVStream.codec in some cases Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avframe.h: Add a flag in AVIndexEntry to discard frame after decoding.Sasi Inguva2016-09-19
| | | | | Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: add avformat_transfer_internal_stream_timing_info() and use it in ffmpegClément Bœsch2016-09-14
| | | | | In lavf we have access to st->internal->avctx so it's a better place than in ffmpeg*.c and will allow moving to codecpar.
* lavf: add a flag to enable/disable automatic bitstream filteringRodger Combs2016-09-12
| | | | | | | This is mostly useful for muxers that wrap other muxers, such as dashenc and segment. The actual duplicated bitstream filtering is largely harmless, but delaying the header can cause problems when the muxer intended the header to be written to a separate file.
* avformat/mux: implement AVFMT_FLAG_SHORTESTMichael Niedermayer2016-09-11
| | | | | | This will allow fixing several bugs with the -shortest option Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: mark stream as const pointer in av_stream_get_side_data() for next bumpClément Bœsch2016-08-17
|
* avformat: Add av_get_frame_filename2() and AV_FRAME_FILENAME_FLAGS_MULTIPLEMichael Niedermayer2016-08-04
| | | | | | | This will be used to allow writing file sequences using the tee output onto multiple places in parallel Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doxygen: Standardize root-level modulesTimothy Gu2016-08-02
|
* avformat/avformat: Move new field to the end of AVStreamMichael Niedermayer2016-06-30
| | | | | | | | | | | | | This fixes part of Ticket5676 This fixes kodi, mpv, chromium and ffplay build against 3.0 and linked to 3.1 This is a similar ABI fix to 1eb43af1a0e542ad83dcbf327197785d815fc42d Approved-by: BBB Approved-by: jamrial Approved-by: BtbN Approved-by: nevcairiel Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '14634429b915333f3612eaf41db3954222dc4aaf'Hendrik Leppkes2016-06-26
|\ | | | | | | | | | | | | * commit '14634429b915333f3612eaf41db3954222dc4aaf': lavf: update muxing doxy Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavf: update muxing doxyAnton Khirnov2016-05-23
| | | | | | | | Describe the new AVCodecParameters API.
* | lavf: deprecate av_apply_bitstream_filtersRodger Combs2016-06-25
| |
* | Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed'Matthieu Bouron2016-06-23
|\| | | | | | | | | | | | | * commit 'e1eb0fc960163402bbb4e630185790488f7d28ed': movenc: Use packets in interleaving queues for the duration at the end of fragments Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
| * movenc: Use packets in interleaving queues for the duration at the end of ↵Martin Storsjö2016-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fragments As long as caller only writes packets using av_interleaved_write_frame with no manual flushing, this should allow us to always have accurate durations at the end of fragments, since there should be at least one queued packet in each stream (except for the stream where the current packet is being written, but if the muxer itself does the cutting of fragments, it also has info about the next packet for that stream). Signed-off-by: Martin Storsjö <martin@martin.st>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat: Document where the AVOption names can be found for the fields of ↵Michael Niedermayer2016-06-01
| | | | | | | | | | | | | | | | | | | | AVFormatContext Missing docs found by: nevcairiel RFC: should we add support so that the C field names always work as av option names/keys ? Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '75b90ef722b7cdfc70118ab987e298d087aae693'Derek Buitenhuis2016-05-12
|\| | | | | | | | | | | | | * commit '75b90ef722b7cdfc70118ab987e298d087aae693': libavformat: Update the comment about AVOutputFormat flags Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * libavformat: Update the comment about AVOutputFormat flagsMartin Storsjö2016-04-21
| | | | | | | | | | | | Add a flag which applies here, which had been missed. Signed-off-by: Martin Storsjö <martin@martin.st>
| * lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. From Libav commit 05f66706d182eb0c36af54d72614bf4c33e957a9. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-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.
| * lavf: add a protocol whitelist/blacklist for file opened internallyAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | Should make the default behaviour safer for careless callers that open random untrusted files. Bug-Id: CVE-2016-1897 Bug-Id: CVE-2016-1898
* | fix some a/an typosLou Logan2016-03-28
| | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* | lavf: allow BSFs to drop packets.Ronald S. Bultje2016-03-11
| | | | | | | | | | If pkt->size == 0 && pkt->side_data_elems == 0 after bsf->filter() returns, the packet is considered dropped.
* | avformat: Fix member name 10LDerek Buitenhuis2016-03-04
| | | | | | | | | | | | | | | | The wrong member was remove/moved after review of the blacklist API. 10L cola. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-04
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a'Derek Buitenhuis2016-02-29
|\| | | | | | | | | | | | | * commit '7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a': lavf: use the io_open callbacks for files opened from open_input() as well Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: use the io_open callbacks for files opened from open_input() as wellAnton Khirnov2016-02-22
| | | | | | | | There is no real reason to treat them differently.
* | Merge commit '29c2d06d67724e994980045afa055c6c34611b30'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
| |
* | Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'Derek Buitenhuis2016-02-10
|\| | | | | | | | | | | | | | | | | This also deprecates our old duplicated callbacks. * commit '9f61abc8111c7c43f49ca012e957a108b9cc7610': lavf: allow custom IO for all files Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: allow custom IO for all filesAnton Khirnov2016-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
* | avformat: add protocol_whitelistMichael Niedermayer2016-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Note to maintainers: update tools Note to maintainers: set a default whitelist for your protocol If that makes no sense then consider to set "none" and thus require the user to specify a white-list for sub-protocols to be opened Note, testing and checking for missing changes is needed Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Document urls a bitMichael Niedermayer2016-01-24
| | | | | | | | | | Spell-checked-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avformat: Replace some references to filenames by urlsMichael Niedermayer2016-01-21
| | | | | | | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Add integer fps from 31 to 60 to get_std_framerate()Michael Niedermayer2016-01-09
| | | | | | | | | | | | Fixes Ticket 5106 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf: add automatic bitstream filtering; bump versionRodger Combs2015-12-28
| | | | | | | | | | | | | | | | | | This solves the problem discussed in https://ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179238.html by allowing AVCodec::write_header to be delayed until after packets have been run through required bitstream filters in order to generate global extradata. It also provides a mechanism by which a muxer can add a bitstream filter to a stream automatically, rather than prompting the user to do so.