summaryrefslogtreecommitdiff
path: root/libavformat/avio_internal.h
Commit message (Collapse)AuthorAge
* avformat/aviobuf: discard part of the IO buffer in ffio_ensure_seekback if ↵Marton Balint2020-10-09
| | | | | | | | | | | | | | | | | | | | | | needed Previously ffio_ensure_seekback never flushed the buffer, so successive ffio_ensure_seekback calls were all respected. This could eventually cause unlimited memory and CPU usage if a demuxer called ffio_ensure_seekback on all it's read data. Most demuxers however only rely on being able to seek back till the position of the last ffio_ensure_seekback call, therefore we change the semantics of ffio_ensure_seekback so that a new call can invalidate seek guarantees of the old. In order to support some level of "nested" ffio_ensure_seekback calls, we document that the function only invalidates the old window (and potentially discards the already read data from the IO buffer), if the newly requested window does not fit into the old one. This way we limit the memory usage for ffio_ensure_seekback calls requesting consecutive data windows. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/aviobuf: Add function to reset dynamic bufferAndreas Rheinhardt2020-03-30
| | | | | | | | | Resetting a dynamic buffer means to keep the AVIOContext and the internal buffer used by the dynamic buffer. This is done in order to save (re)allocations when one has a workflow where one opens and closes dynamic buffers in sequence. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/avio: add a ffio_realloc_buf API for AVIO buffer realloctomajsjiang2019-08-15
| | | | | | Add new API ffio_realloc_buf for AVIO buffer realloc. Signed-off-by: Zhongxing Jiang <tomajsjiang@tencent.com>
* libavformat/avio: Utility function to return URLContextJeyapal, Karthick2017-11-29
|
* lavf: make avio_read_partial() publicwm42017-09-01
| | | | | | | | | Main use-case is proxying avio through a foreign I/O layer and a custom AVIO context, without losing latency and performance characteristics. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Merged from Libav commit 173b56218f39c64.
* avformat/avio: add a crc callback function for CRC-32 IEEE-LEJames Almer2016-08-04
| | | | | | Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* hls: read protocol options through the AVIOContextHendrik Leppkes2016-03-16
| | | | | | | | | | This reverts commit 9f9ed79d4cb40e5d9093899f8a79086ff23da844. The hlsopts member was never set anywhere and always NULL, furthermore the HLS demuxer needs to retrieve the proper options from the underlying http protocol (cookies, user-agent, etc), so a dummy context won't help. Instead, use the AVIOContext directly to access the options.
* avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-04
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* hls: Add and use a memebr of AVIOInternal rather than abuse opaqueDerek Buitenhuis2016-02-29
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* 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
| |
* | 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>
* | Merge commit 'bff0349d9da527084e1433167466d8afc9e25c7f'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | * commit 'bff0349d9da527084e1433167466d8afc9e25c7f': avio: Add avio_read wrapper to simplify error checking Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add avio_read wrapper to simplify error checkingVittorio Giovara2015-05-31
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/internal: Fix warning about struct declarationMichael Niedermayer2015-05-12
| | | | | | | | | | | | Moving ffio_open2_wrapper() to internal as it uses AVFormatContext Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add callback for opening further filesMichael Niedermayer2015-05-11
| | | | | | | | | | Previous version reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31'Michael Niedermayer2015-02-28
|\| | | | | | | | | | | | | * commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31': avio: Rename avclass symbols relating to avio Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Rename avclass symbols relating to avioMartin Storsjö2015-02-28
| | | | | | | | | | | | | | Don't prefix them ffio_url, which is misleading, sounding too much like the urlprotocol layer (like ffurl_*). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8a273a746061a112e5e35066a8fd8e146d821a62'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit '8a273a746061a112e5e35066a8fd8e146d821a62': avio: Add an internal utility function for freeing dynamic buffers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add an internal utility function for freeing dynamic buffersMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Add int64_t probesize2 instead of int probesize to AVFormatContext.Carl Eugen Hoyos2014-07-30
| | | | | | | | | | Allows to set a probesize >2G. Tested-by: Oliver Fromme
* | fix various typosLou Logan2014-06-03
| | | | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '32d05934abc7427bb90380a4c1ab20a15fd7d821'Michael Niedermayer2014-04-18
|\| | | | | | | | | | | | | | | | | | | * commit '32d05934abc7427bb90380a4c1ab20a15fd7d821': mp3dec: decode more data from Info header Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: decode more data from Info headerAlessandro Ghedini2014-04-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Do not leave positive values undefined when negative are defined as errorMichael Niedermayer2013-10-19
| | | | | | | | | | | | | | | | Define positive return values as non errors and leave further meaning undefined This allows future extensions to use these values Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | * commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847': aviobuf: Add functions for null buffers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aviobuf: Add functions for null buffersMartin Storsjö2013-09-19
| | | | | | | | | | | | | | Null buffers are useful for simulating writing to a real buffer for the sake of measuring how many bytes are written. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0'Michael Niedermayer2013-08-08
|\| | | | | | | | | | | | | | | | | | | * commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0': avio: Add const qualifiers to ffio_read_indirect Conflicts: libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add const qualifiers to ffio_read_indirectBen Avison2013-08-08
| | | | | | | | | | | | | | This provides at least some protection against potential accidental corruption of AVIO buffer workspace. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | * commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac': avio: Add an internal function for reading without copying Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add an internal function for reading without copyingBen Avison2013-08-05
| | | | | | | | | | | | | | | | As long as there is enough contiguous data in the avio buffer, just return a pointer to it instead of copying it to the caller provided buffer. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/aviobuf: Add ffio_ensure_seekback()Michael Niedermayer2013-07-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '523c7bd23c781aa0f3a85044896f5e18e8b52534'Michael Niedermayer2012-12-19
|\| | | | | | | | | | | | | | | | | | | | | * commit '523c7bd23c781aa0f3a85044896f5e18e8b52534': misc typo, style and wording fixes Conflicts: libavcodec/options_table.h libavutil/pixfmt.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * misc typo, style and wording fixesDiego Biurrun2012-12-18
| |
* | avio: redesign ffio_rewind_with_probe_data()Michael Niedermayer2012-10-13
| | | | | | | | | | | | | | This prevents a double free Fixes CID718285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: split out ffio_limit()Michael Niedermayer2011-12-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: add avio_open2, taking an interrupt callback and optionsMartin Storsjö2011-11-13
| | | | | | | | | | | | | | | | | | | | | | The interrupt callback has to be passed in during opening (setting it after opening isn't enough), since a blocking open couldn't be interrupted otherwise. Options are passed down to procotols and also need to be available during open() in most cases. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: get rid of the -vglobal option. dct32: Add AVX implementation of 32-point DCT dct32: Change pass 6 permutation to allow for AVX implementation dct32: port SSE 32-point DCT to YASM multiple inclusion guard cleanup avio: document buffer must created with av_malloc() and friends avio: check AVIOContext malloc failure swscale: point out an alternative to sws_getContext svq3: Do initialization after parsing the extradata add changelog entries for 0.7_beta2 mp3lame: add #include required for AV_RB32 macro. Conflicts: Changelog libavcodec/svq3.c libavcodec/x86/dct32_sse.c libavfilter/vsrc_buffer.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * multiple inclusion guard cleanupDiego Biurrun2011-05-21
| | | | | | | | | | Add missing multiple inclusion guards; clean up #endif comments; add missing library prefixes; keep guard names consistent.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Partially merged:flvdec: Allow parsing keyframes metadata without seeking in most cases Error out if vaapi is not found avio: undeprecate av_url_read_fseek/fpause under nicer names libvo-*: Don't use deprecated sample format names and enum names DUPLICATE flvdec: Fix support for flvtool2 "keyframes based" generated index DUPLICATE libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32. Convert some undefined 1<<31 shifts into 1U<<31. Conflicts: configure libavcodec/libvo-aacenc.c libavcodec/libvo-amrwbenc.c libavformat/flvdec.c Marged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: undeprecate av_url_read_fseek/fpause under nicer namesAnton Khirnov2011-04-12
| | | | | | | | It seems their replacements won't be ready anytime soon.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: bump minor and add an APIChanges entry for avformat cleanup lavf: get rid of ffm-specific stuff in avformat.h Not pulled: avio: deprecate av_protocol_next(). avio: add a function for iterating though protocol names. lavf: rename a parameter of av_sdp_create from buff->buf lavf: rename avf_sdp_create to av_sdp_create. lavf: make av_guess_image2_codec internal avio: make URLProtocol internal. avio: make URLContext internal. lavf: mark av_pkt_dump(_log) for remove on $next+1 bump. lavf: use designated initializers for all protocols applehttp: don't use deprecated url_ functions. avio: move two ff_udp_* functions from avio_internal to url.h asfdec: remove a forgotten declaration of nonexistent function avio: deprecate the typedef for URLInterruptCB Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: make URLContext internal.Anton Khirnov2011-04-08
| |
| * avio: move two ff_udp_* functions from avio_internal to url.hAnton Khirnov2011-04-08
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: psymodel: extend API to include PE and bit allocation. avio: always compile dyn_buf functions Remove unnecessary parameter from ff_thread_init() and fix behavior Revert "aac_latm_dec: use aac context and aac m4ac" configure: tell user if libva is enabled like the rest of external libs. Add silence support for AV_SAMPLE_FMT_U8. avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal avio: deprecate av_url_read_seek avio: deprecate av_url_read_pause ac3enc: NEON optimised extract_exponents Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: deprecate av_url_read_seekAnton Khirnov2011-04-05
| | | | | | | | | | | | It's not used anywhere internally. Salvage its documentation for ffio_read_seek.
| * avio: deprecate av_url_read_pauseAnton Khirnov2011-04-05
| | | | | | | | | | | | It's not used anywhere internally. Salvage its documentation for ffio_read_pause.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: fix partial run when no samples path is specified ARM: NEON fixed-point forward MDCT ARM: NEON fixed-point FFT lavf: bump minor version and add an APIChanges entry for avio changes avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() avio: make url_fdopen internal. avio: make url_open_dyn_packet_buf internal. avio: avio_ prefix for url_close_dyn_buf avio: avio_ prefix for url_open_dyn_buf avio: introduce an AVIOContext.seekable field ac3enc: use generic fixed-point mdct lavfi: add fade filter Change yadif to not use out of picture lines. lavc: deprecate AVCodecContext.antialias_algo lavc: mark mb_qmin/mb_qmax for removal on next major bump. Conflicts: doc/filters.texi libavcodec/ac3enc_fixed.h libavcodec/ac3enc_float.h libavfilter/Makefile libavfilter/allfilters.c libavfilter/vf_fade.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: make url_fdopen internal.Anton Khirnov2011-04-03
| | | | | | | | | | The unbuffered URLContext API will be made private, so there's no point in this function being public.