From a45605a1ba3126c4d8314886d90326a7ffe746ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 25 Mar 2012 11:58:55 +0200 Subject: Add AVIO_FLAG_DIRECT. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows avoiding the buffer when using avio read, write and seek functions. When using the ffmpeg executable -avioflags direct can be used to enable this mode for input files, but has no effect on output files. Signed-off-by: Reimar Döffinger --- libavformat/avio.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libavformat/avio.h') diff --git a/libavformat/avio.h b/libavformat/avio.h index 95f9558c87..0e923fe443 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -121,6 +121,13 @@ typedef struct { * This field is internal to libavformat and access from outside is not allowed. */ int64_t maxsize; + + /** + * avio_read and avio_write should if possible be satisfied directly + * instead of going through a buffer, and avio_seek will always + * call the underlying seek function directly. + */ + int direct; } AVIOContext; /* unbuffered I/O */ @@ -319,6 +326,14 @@ int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); */ #define AVIO_FLAG_NONBLOCK 8 +/** + * Use direct mode. + * avio_read and avio_write should if possible be satisfied directly + * instead of going through a buffer, and avio_seek will always + * call the underlying seek function directly. + */ +#define AVIO_FLAG_DIRECT 0x8000 + /** * Create and initialize a AVIOContext for accessing the * resource indicated by url. -- cgit v1.2.3