summaryrefslogtreecommitdiff
path: root/libavformat/avio.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-25 11:58:55 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-04 20:39:33 +0200
commita45605a1ba3126c4d8314886d90326a7ffe746ff (patch)
treeb8c44dfb6aad79b9bc2bb249f3b7a605a74ef642 /libavformat/avio.h
parentfde63146d264f8de86b5cca442eaeed3d59a6681 (diff)
Add AVIO_FLAG_DIRECT.
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 <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r--libavformat/avio.h15
1 files changed, 15 insertions, 0 deletions
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 */
@@ -320,6 +327,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.
* @note When the resource indicated by url has been opened in