summaryrefslogtreecommitdiff
path: root/libavformat/file.c
Commit message (Collapse)AuthorAge
* avformat/hls: support data protocol in uri for EXT-X-MAPSteven Liu2020-01-18
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/file: add seekable option to disallow seekingMarton Balint2019-04-11
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/file: Fix file delete for WindowsKarthick Jeyapal2019-01-07
| | | | Fixes bug id : 7638
* avformat/file: increase min/max packet size to 256k for written filesMarton Balint2017-06-24
| | | | | | | | Buffering more than one packet can be a huge performance improvement for encoding files with small packets (e.g. wav) over SMB/CIFS. Acked-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* libavformat/file: return AVERROR_EOF on EOFDaniel Kucera2017-06-17
| | | | | | Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/os_support.h: Fix for unicode filenames on windows.Matt Oliver2016-06-13
| | | | | | Fixes #819 #5256 #5281 Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* Merge commit '933dec0e29ec4d2cb83474279a6c52d62fdb7310'Derek Buitenhuis2016-04-19
|\ | | | | | | | | | | | | * commit '933dec0e29ec4d2cb83474279a6c52d62fdb7310': file: Add an option for following a file that is being written Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * file: Add an option for following a file that is being writtenMartin Storsjö2016-03-24
| | | | | | | | | | | | | | | | Using this requires setting the rw_timeout option to make it terminate, alternatively using the interrupt callback (if used via the API). Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/file: Add crypto to default whitelistMichael Niedermayer2016-03-19
| | | | | | | | | | | | Fixes Ticket5287 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d'Derek Buitenhuis2016-02-29
|\| | | | | | | | | | | | | | | | | | | | | This commit also disables the async fate test, because it used internal APIs in a non-kosher way, which no longer exists. * commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d': lavf: reorganize URLProtocols Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: reorganize URLProtocolsAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | | | | | Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits.
* | avformat/file: enable file_move() without unistd.hRaymond Hilseth2016-02-28
| | | | | | | | | | | | it only requires the rename function from os_support.h. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Update demuxers and protocols for protocol whitelist supportMichael Niedermayer2016-02-02
| | | | | | | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | Merge commit 'e05f7ed5436207f4a55f1978b223c7f8bc82af42'Hendrik Leppkes2015-09-07
|\| | | | | | | | | | | | | * commit 'e05f7ed5436207f4a55f1978b223c7f8bc82af42': file: properly forward errors from file_read() and file_write() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * file: properly forward errors from file_read() and file_write()Sean McGovern2015-09-03
| | | | | | | | | | | | | | | | Bug-Id: 881 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/file: Fix copy and paste errorMichael Niedermayer2015-09-03
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/file: Check for lstat() instead of dirent.hMichael Niedermayer2015-08-25
| | | | | | | | | | | | Fixes build on mingw Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/file: check for dirent.h supportMariusz Szczepańczyk2015-08-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/file: implement directory listing callbacksLukasz Marek2015-08-25
| | | | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/file: implement move and delete callbacksMariusz Szczepańczyk2015-06-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/file: fix help message first character casing for trunc optionStefano Sabatini2014-01-05
| |
* | lavf/file: file_check: Handle file URLs that start with "file:"Alexander Strasser2014-01-04
| | | | | | | | | | | | | | | | | | | | Handle the URL analog to file_open, it may contain a "file:" prefix. Skip it. Make access checks to file URLs starting with "file:" work. Fix part of ticket #3249. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
* | Merge commit '51eb213d00154b8e7856c7667ea62db8b0f663d4'Michael Niedermayer2013-08-08
|\| | | | | | | | | | | | | * commit '51eb213d00154b8e7856c7667ea62db8b0f663d4': libavformat: use avpriv_open() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: use avpriv_open()Rémi Denis-Courmont2013-08-07
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | file: Add 'blocksize' optionAndrey Utkin2013-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | Interruptibility of file operations is strongly desirable in case of slow storage access, e.g. mounted network share. This commit introduces possibility to limit data quantity transferred by 'file' protocol at once. By default, old behaviour is preserved and data is still tried to be transferred without block size limitation. Note that file I/O operation still may block (or even freeze) inside of single read(2) or write(2) operation. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | file: fix 10l error in access() checkMichael Niedermayer2012-11-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | file: Fallback to stat() based file_check() when access() or its named flags ↵Michael Niedermayer2012-11-27
| | | | | | | | | | | | | | | | | | | | are unavailable. Should fix compilation on native windows We could also use _access() and literal numbers as flags but i cant test it and the compilation failure should be fixed ASAP Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | file: fix file_check()Michael Niedermayer2012-11-27
| | | | | | | | | | | | | | | | | | | | | | Fixes Ticket1904 This should work on windows, but if not please contact me ASAP i have another idea on how to solve this without access() if that really doesnt work on windows. Strongly based on patch by divVerent Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mingw/cygwin: Stop adding -fno-common to gcc CFLAGS Restructure av_log_missing_feature message rtp: Support packetization/depacketization of opus file: Set the return value type for lseek to int64_t. ppc: fix Altivec build with old compilers build: add LTO support for PGI compiler build: add -Mdse to PGI optimisation flags rtpenc_vp8: Update the packetizer to the latest spec version rtpdec_vp8: Make the depacketizer implement the latest spec draft doc: allow building with old texi2html versions avutil: skip old_pix_fmts.h since it is just a list Conflicts: libavcodec/aacdec.c libavcodec/h264.c libavcodec/ppc/fmtconvert_altivec.c libavcodec/utils.c libavformat/file.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * file: Set the return value type for lseek to int64_t.Yusuke Nakamura2012-10-09
| | | | | | | | | | | | This fixes a regression in 4ed5ac5. Signed-off-by: Martin Storsjö <martin@martin.st>
* | file: set the return value type for lseek to off_tJean First2012-09-27
| | | | | | | | | | | | | | fixes a bug introduced with 4ed5ac50d3e4f921003ecf60985f78337400f354 Signed-off-by: Jean First <jeanfirst@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: flush filtered frames before reconfiguring filters mov: stsd entries must be at least 16 byte mov: detect EOF in mov_read_dref() file: return proper error on seek failures Conflicts: libavformat/file.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * file: return proper error on seek failuresLuca Barbato2012-09-16
| |
* | Merge commit '07584eaf4a95db3f11d3bc411f9786932829e82b'Michael Niedermayer2012-09-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '07584eaf4a95db3f11d3bc411f9786932829e82b': mpegts: check substreams before discarding Add a smooth streaming segmenter muxer file: Add an avoption for disabling truncating existing files on open img2dec: always close AVIOContexts rtpdec_jpeg: Error out on other unsupported type values as well rtpdec_jpeg: Disallow using the reserved q values rtpdec_jpeg: Fold the default qtables case into an existing if statement rtpdec_jpeg: Store and reuse old qtables for q values 128-254 rtpdec_jpeg: Simplify the calculation of the number of qtables rtpdec_jpeg: Add more comments about the fields in the SOF0 section rtpdec_jpeg: Clarify where the subsampling magic numbers come from rtpdec_jpeg: Don't use a bitstream writer for the EOI marker rtpdec_jpeg: Don't needlessly use a bitstream writer for the header rtpdec_jpeg: Simplify writing of the jpeg header rtpdec_jpeg: Merge two if statements rtpdec_jpeg: Write the DHT section properly Conflicts: libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * file: Add an avoption for disabling truncating existing files on openMartin Storsjö2012-09-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec_jpeg: Add support for default quantizers x86: dsputil: Move specific optimization settings out of global init function avplay: get rid of ugly casts in the options table avplay: fix prototypes for option callbacks. flvdec: always set AVFMTCTX_NOHEADER. file: Use a normal private context for storing the file descriptor configure: Adjust the xgetbv instrinsic check configure: Add --disable-inline-asm command line option configure: Don't try to enable the log2 function on msvcrt Conflicts: configure ffplay.c libavcodec/x86/dsputil_mmx.c libavformat/file.c libavformat/flvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * file: Use a normal private context for storing the file descriptorMartin Storsjö2012-09-10
| | | | | | | | | | | | Previously the file descriptor was stored in the priv_data pointer. Signed-off-by: Martin Storsjö <martin@martin.st>
| * file: Only include unistd.h if it existsRonald S. Bultje2012-06-29
| | | | | | | | | | | | | | | | | | | | | | | | It is included for the open/read/write/close functions. On MSVC, where this header does not exist, the same functions are provided by io.h, which is already included. On windows, these functions are provided by io.h. Make sure io.h is included if it exists, regardless of the setmode function. Signed-off-by: Martin Storsjö <martin@martin.st>
* | file: Add S_ISFIFO compatability macroDerek Buitenhuis2012-09-09
| | | | | | | | | | | | | | Not all systems have S_ISFIFO. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | file: Only include unistd.h if it existsRonald S. Bultje2012-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is included for the open/read/write/close functions. On MSVC, where this header does not exist, the same functions are provided by io.h, which is already included. On windows, these functions are provided by io.h. Make sure io.h is included if it exists, regardless of the setmode function. Signed-off-by: Martin Storsjö <martin@martin.st> Conflicts: configure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/file: cosmetic: Use "not" instead of "equals zero"Alexander Strasser2012-07-05
| | | | | | | | This is more similar to the "overall" FFmpeg coding style.
* | lavf/file: cosmetic: Remove superfluous ternary operatorAlexander Strasser2012-07-05
| |
* | avformat: disable seeking on FIFOs/named pipesMartin Sliwka2012-06-29
| | | | | | | | | | | | | | | | | | | | | | Patch is addition to my previous patch (https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2012-June/051590.html) and disables seeking on FIFOs/named pipes by setting URLContext::is_streamed (same as pipe: protocol does for stdin/stdout pipes) Fixes Ticket986 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | file: Fix handling of windows named pipesMartin Sliwka2012-06-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (44 commits) replacement Indeo 3 decoder gsm demuxer: do not allocate packet twice. flvenc: use first packet delay as global delay. ac3enc: doxygen update. imc: return error codes instead of 0 for error conditions. imc: return meaningful error codes instead of -1 imc: do not set channel layout for stereo imc: validate channel count imc: check for ff_fft_init() failure imc: check output buffer size before decoding imc: use DSPContext.bswap16_buf() to byte-swap packet data rtsp: add allowed_media_types option libgsm: add flush function to reset the decoder state when seeking libgsm: simplify decoding by using a loop gsm: log error message when packet is too small libgsmdec: do not needlessly set *data_size to 0 gsmdec: do not needlessly set *data_size to 0 gsmdec: add flush function to reset the decoder state when seeking libgsmdec: check output buffer size before decoding gsmdec: log error message when output buffer is too small. ... Conflicts: Changelog ffplay.c libavcodec/indeo3.c libavcodec/mjpeg_parser.c libavcodec/vp3.c libavformat/cutils.c libavformat/id3v2.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove some stray unnecessary ffmpeg references.Diego Biurrun2011-11-02
| |
* | return error code if error happensMaksym Veremeyenko2011-10-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) doc: Check standalone compilation before submitting new components. Fix standalone compilation of pipe protocol. Fix standalone compilation of ac3_fixed encoder. Fix standalone compilation of binkaudio_dct / binkaudio_rdft decoders. Fix standalone compilation of IMC decoder. Fix standalone compilation of WTV demuxer. Fix standalone compilation of MXPEG decoder. flashsv: K&R cosmetics matroskaenc: fix memory leak vc1: make overlap filter for I-frames bit-exact. vc1dec: use s->start/end_mb_y instead of passing them as function args. Revert "VC1: merge idct8x8, coeff adjustments and put_pixels." Replace strncpy() with av_strlcpy(). indeo3: Eliminate use of long. get_bits: make cache unsigned to eliminate undefined signed overflow. asfdec: fix assert failure on invalid files avfilter: check malloc return values. Not pulled as reason for reindent is not pulled: mpegvideo: reindent. nutenc: check malloc return values. Not pulled due to much simpler solution in ffmpeg *: don't av_malloc(0). ... Conflicts: doc/developer.texi libavcodec/Makefile libavcodec/get_bits.h libavcodec/mpegvideo.c libavformat/Makefile libavutil/log.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix standalone compilation of pipe protocol.Diego Biurrun2011-05-04
| | | | | | | | file_check() is not only used by the file protocol, adjust #ifdef accordingly.