diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-04-04 20:11:19 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-04-07 18:07:16 +0200 |
commit | f87b1b373a0df55080c1e6a5874f9a0a75c6fee8 (patch) | |
tree | 9b44dffc615a4832c3d67cc27a6eb13ca8960df1 /libavformat/avio.h | |
parent | 3d42d4937b029b604da7d53dce16c72e8edde29c (diff) | |
download | ffmpeg-f87b1b373a0df55080c1e6a5874f9a0a75c6fee8.tar.gz |
avio: AVIO_ prefixes for URL_ open flags.
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index 5a535f7973..4035e24571 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -63,7 +63,6 @@ typedef struct URLPollEntry { int events; int revents; } URLPollEntry; -#endif /** * @defgroup open_modes URL open modes @@ -91,6 +90,7 @@ typedef struct URLPollEntry { * silently ignored. */ #define URL_FLAG_NONBLOCK 4 +#endif typedef int URLInterruptCB(void); @@ -512,6 +512,33 @@ int url_resetbuf(AVIOContext *s, int flags); #endif /** + * @defgroup open_modes URL open modes + * The flags argument to avio_open must be one of the following + * constants, optionally ORed with other flags. + * @{ + */ +#define AVIO_RDONLY 0 /**< read-only */ +#define AVIO_WRONLY 1 /**< write-only */ +#define AVIO_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 AVIO_FLAG_NONBLOCK 4 + +/** * Create and initialize a AVIOContext for accessing the * resource indicated by url. * @note When the resource indicated by url has been opened in |