aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-02-04 19:12:36 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-05 20:28:04 -0500
commitfe174fc8fc4bbdb050014a945de7eb9b28ba358e (patch)
treee1beb16765b4059e7169a39d9458173e777ba990 /libavformat
parentf4a86bc981d6743778dd1037fea243d36229ede1 (diff)
downloadffmpeg-fe174fc8fc4bbdb050014a945de7eb9b28ba358e.tar.gz
Non-blocking protocols: flag and documentation
Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index a606f7cb97..d05cab1810 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -63,9 +63,32 @@ typedef struct URLPollEntry {
int revents;
} URLPollEntry;
-#define URL_RDONLY 0
-#define URL_WRONLY 1
-#define URL_RDWR 2
+/**
+ * @defgroup open_modes URL open modes
+ * The flags argument to url_open and cosins must be one of the following
+ * constants, optionally ORed with other flags.
+ * @{
+ */
+#define URL_RDONLY 0 /**< read-only */
+#define URL_WRONLY 1 /**< write-only */
+#define URL_RDWR 2 /**< read-write */
+/**
+ * @}
+ */
+
+/**
+ * Use non-blocking mode.
+ * If this flag is set, operations on the context will return
+ * AVERROR(EAGAIN) if they can not be performed immediately.
+ * If this flag is not set, operations on the context will never return
+ * AVERROR(EAGAIN).
+ * Note that this flag does not affect the opening/connecting of the
+ * context. Connecting a protocol will always block if necessary (e.g. on
+ * network protocols) but never hang (e.g. on busy devices).
+ * Warning: non-blocking protocols is work-in-progress; this flag may be
+ * silently ignored.
+ */
+#define URL_FLAG_NONBLOCK 4
typedef int URLInterruptCB(void);