History

Non-blocking protocols: flag and documentation

Nicolas George committed 15 years ago

Commit fe174fc1 parent f4a86bc2 files · +29 −3Browse files

Unified · Split

2 files
  1. doc/APIchanges +3 −0
  2. libavformat/avio.h +26 −3
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2011-02-XX - XXXXXXX - lavf 52.XX.0 - avio.h
17+ Add flag for non-blocking protocols: URL_FLAG_NONBLOCK
18+
1619 2011-02-04 - f124b08 - lavf 52.96.0 - avformat_free_context()
1720 Add avformat_free_context() in avformat.h.
1821
libavformat/avio.h+26−3
@@ -63,9 +63,32 @@ typedef struct URLPollEntry { · 62 unmodified lines
6363 int revents;
6464 } URLPollEntry;
6565
66−#define URL_RDONLY 0
67−#define URL_WRONLY 1
68−#define URL_RDWR 2
66+/**
67+ * @defgroup open_modes URL open modes
68+ * The flags argument to url_open and cosins must be one of the following
69+ * constants, optionally ORed with other flags.
70+ * @{
71+ */
72+#define URL_RDONLY 0 /**< read-only */
73+#define URL_WRONLY 1 /**< write-only */
74+#define URL_RDWR 2 /**< read-write */
75+/**
76+ * @}
77+ */
78+
79+/**
80+ * Use non-blocking mode.
81+ * If this flag is set, operations on the context will return
82+ * AVERROR(EAGAIN) if they can not be performed immediately.
83+ * If this flag is not set, operations on the context will never return
84+ * AVERROR(EAGAIN).
85+ * Note that this flag does not affect the opening/connecting of the
86+ * context. Connecting a protocol will always block if necessary (e.g. on
87+ * network protocols) but never hang (e.g. on busy devices).
88+ * Warning: non-blocking protocols is work-in-progress; this flag may be
89+ * silently ignored.
90+ */
91+#define URL_FLAG_NONBLOCK 4
6992
7093 typedef int URLInterruptCB(void);
7194

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t