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>
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>
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>
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>
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>
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>
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.
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.
(cherry picked from commit c6610a216e)
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
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
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
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
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
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