[FFmpeg-devel] [PATCH 0/5] Interruptibility enhancements
Andrey Utkin
andrey.krieger.utkin at gmail.com
Wed Jul 10 23:19:03 CEST 2013
This patchset is inspired by issue of slow reaction of libavformat to user
interrupt request, when operating on a file situated on a slow storage (e.g.
network share) - for example, when user wants to quit current file
playback, or seek to another position.
Order of actions in retry_transfer_wrapper() changed, so it checks for
interrupt before going for (potentially blocking) I/O operation.
retry_transfer_wrapper() is used when regular files are read.
ff_network_wait_fd_timeout() has been changed the same way, just because they
do merely the same thing and are similar internally. But
ff_network_wait_fd_timeout() is used for network data transmission.
Feature was added to 'file' protocol to limit maximum block size transmitted at
once. I.e. if you set blocksize=4096, and demuxer requests 32768 bytes from
input file, demuxer gets maximum of 4096 bytes. It will get more data on next
data request calls (from retry_transfer_wrapper()). This is done to be able to
check for interrupt more frequently. By default, block size limitation is
disabled and behaviour is the same as before.
Commit 1/5 "Special case for ff_check_interrupt" is not essential, and is
questionable. I formed a patch just to not loose the idea proposed by Michael.
Andrey Utkin (5):
Special case for ff_check_interrupt
retry_transfer_wrapper(): check for interrupt before operation
ff_network_wait_fd_timeout(): check for interrupt before operation
file: Add 'blocksize' option
Document file protocol options
doc/protocols.texi | 10 ++++++++++
libavformat/avio.c | 12 +++++++-----
libavformat/avio.h | 5 +++++
libavformat/file.c | 12 ++++++++++--
libavformat/network.c | 4 ++--
5 files changed, 34 insertions(+), 9 deletions(-)
--
1.8.1.5
More information about the ffmpeg-devel
mailing list