summaryrefslogtreecommitdiff
path: root/libavformat/file.c
Commit message (Collapse)AuthorAge
* 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>
* 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.
* 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>
* libavformat: use avpriv_open()Rémi Denis-Courmont2013-08-07
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* 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: return proper error on seek failuresLuca Barbato2012-09-16
|
* file: Add an avoption for disabling truncating existing files on openMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* Remove some stray unnecessary ffmpeg references.Diego Biurrun2011-11-02
|
* Fix standalone compilation of pipe protocol.Diego Biurrun2011-05-04
| | | | file_check() is not only used by the file protocol, adjust #ifdef accordingly.
* avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-19
| | | | | | | | Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
* file: implement url_check() callback in the file and pipe protocolsStefano Sabatini2011-04-13
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avio: make URLContext internal.Anton Khirnov2011-04-08
|
* lavf: use designated initializers for all protocolsAnton Khirnov2011-04-08
| | | | | This is more readable and makes it easier to reorder URLProtocol members.
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-07
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* Add #ifdefs around code specific to file and pipe protocolsMåns Rullgård2010-07-06
| | | | Originally committed as revision 24076 to svn://svn.ffmpeg.org/ffmpeg/trunk
* file_protocol: remove redundant #include sys/time.hMåns Rullgård2010-07-06
| | | | Originally committed as revision 24070 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Declare the url_write buffer parameter as constMartin Storsjö2010-06-01
| | | | Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make file_open() return the error code set in errno if open() fails,Stefano Sabatini2010-04-26
| | | | | | rather than always ENOENT. Originally committed as revision 22972 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement support to the AVSEEK_SIZE operation in file_seek().Stefano Sabatini2010-04-04
| | | | | | | | | | | Avoid the need to use seeking for getting the file size, use fstat instead, which is significantly faster. See thread: Subject: [FFmpeg-devel] [PATCH] Add support to AVSEEK_SIZE to the file protocol seek callback Date: Fri, 2 Apr 2010 13:13:27 +0200 Originally committed as revision 22799 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not call lseek() with invalid whence valueMåns Rullgård2010-02-13
| | | | Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Only consider -1 as an error return value for open().Martin Storsjö2009-07-27
| | | | | | | | | | This is: - what Posix says (-1 on error, >=0 on success) - fixing a bug on winCE (<0 sometimes) Patch by Martin Storsjö: martin martin st Originally committed as revision 19513 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use intptr_t when casting pointers to int.Ramiro Polla2009-03-26
| | | | Originally committed as revision 18192 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add url_get_file_handle(), which is used to get the file descriptorRonald S. Bultje2009-03-03
| | | | | | | | | | | associated with the I/O handle (e.g. the fd returned by open()). See "[RFC] rtsp.c EOF support" thread. There were previously some URI-specific implementations of the same idea, e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are deprecated by this patch and will be removed at the next major API bump. Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove size_t cast in setting s->priv_data directly to the (integer) fileRonald S. Bultje2009-03-03
| | | | | | | | | descriptor returned by open(). This removes some dubious doublecasts such as priv_data = (void *) (size_t) some_integer, and is always safe on systems we care about because sizeof(int)<=sizeof(void*). See comments from Mans and Michael in "[RFC] rtsp.c EOF support" thread. Originally committed as revision 17768 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use setmode() if it exists in <io.h>, and not based on O_BINARY.Ramiro Polla2009-01-11
| | | | Originally committed as revision 16553 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove offset_t typedef and use int64_t directly instead.Diego Biurrun2008-10-03
| | | | | | | The name offset_t is easily confused with the standard off_t type and *_t is POSIX reserved namespace if any POSIX header is included. Originally committed as revision 15533 to svn://svn.ffmpeg.org/ffmpeg/trunk
* remove const qualifier, removes warning:Baptiste Coudurier2008-05-27
| | | | | | libavformat/file.c:99: warning: passing argument 2 of 'strtol' from incompatible pointer type Originally committed as revision 13454 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full path for #includes from another directory.Diego Biurrun2008-05-09
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* os_support.h is also needed for usleep and lseek on MinGW.Ramiro Polla2007-11-22
| | | | Originally committed as revision 11075 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove empty pipe_closeAlex Beregszaszi2007-11-16
| | | | Originally committed as revision 11045 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Allow pipe: URL to take fd number as inputVincent Fourmond2007-08-17
| | | | | | Patch by Vincent Fourmond [vincent dot fourmond at 9online dot fr] Originally committed as revision 10134 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Indent for next commitVincent Fourmond2007-08-17
| | | | | | Patch by Vincent Fourmond [vincent dot fourmond at 9online dot fr] Originally committed as revision 10133 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l: removed pipe_close instead of pipe_readRamiro Polla2007-08-10
| | | | Originally committed as revision 10047 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make the pipe URLProtocol share read and write functions with the file ↵Ramiro Polla2007-08-09
| | | | | | URLProtocol Originally committed as revision 10041 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check for O_BINARY instead of a list of systems that need itRamiro Polla2007-06-25
| | | | Originally committed as revision 9427 to svn://svn.ffmpeg.org/ffmpeg/trunk
* replace the uses of old string functions that Reimar missedMåns Rullgård2007-06-24
| | | | Originally committed as revision 9406 to svn://svn.ffmpeg.org/ffmpeg/trunk
* This fixes error handling for BeOS, removing the need for some ifdefs.François Revol2007-02-13
| | | | | | | | | AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h. Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed. Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code. This also removes the need for berrno.h. Originally committed as revision 7965 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless #include.Diego Biurrun2006-12-21
| | | | Originally committed as revision 7339 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless MinGW #ifdefs.Ramiro Polla2006-12-21
| | | | | | patch by Ramiro Polla, ramiro lisha.ufsc br Originally committed as revision 7338 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-07
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* CONFIG_WIN32 implies MinGW and Cygwin and possibly more, so use justDiego Biurrun2006-07-11
| | | | | | CONFIG_MINGW or __MINGW32__ instead. Originally committed as revision 5718 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Update licensing information: The FSF changed postal address.Diego Biurrun2006-01-12
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-17
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fixing pipe seek bugMichael Niedermayer2004-12-06
| | | | Originally committed as revision 3730 to svn://svn.ffmpeg.org/ffmpeg/trunk
* nut files in cygwin patch by ("Sascha Sommer" <saschasommer at freenet dot de>)Sascha Sommer2004-04-24
| | | | Originally committed as revision 3054 to svn://svn.ffmpeg.org/ffmpeg/trunk