diff options
author | Martin Storsjö <martin@martin.st> | 2011-11-06 14:10:16 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-11-13 12:59:56 +0100 |
commit | 6aa0b98fb27ab22bd62a365de44d9f16cc07d03e (patch) | |
tree | 43e51d4cbeb1f1f74c4fa9903812005985794e3b /libavformat/avformat.h | |
parent | 58b68d6b36d4c88f9250fd4f57f87fea41cc5e10 (diff) | |
download | ffmpeg-6aa0b98fb27ab22bd62a365de44d9f16cc07d03e.tar.gz |
avio: Add AVIOInterruptCB
This is a better io interrupt callback function, which has an
opaque parameter, which is given to the interrupt callback.
This allows callers to precisely cancel IO for one single
AVFormatContext, without interrupt other ones in the same
process.
Note, it's not needed in AVIOContext, at the moment.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 82d245e688..33e820e4e1 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -994,6 +994,17 @@ typedef struct AVFormatContext { */ int error_recognition; + /** + * Custom interrupt callbacks for the I/O layer. + * + * decoding: set by the user before avformat_open_input(). + * encoding: set by the user before avformat_write_header() + * (mainly useful for AVFMT_NOFILE formats). The callback + * should also be passed to avio_open2() if it's used to + * open the file. + */ + AVIOInterruptCB interrupt_callback; + /***************************************************************** * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and |