aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avio.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-06-22 14:03:37 +0000
committerMartin Storsjö <martin@martin.st>2010-06-22 14:03:37 +0000
commitffbb289a1dacf506b6e6b313a1b977f80da4e0dd (patch)
treeee6b45d19129fd34c04f7495664736b9c172134f /libavformat/avio.h
parent6c4cbc8d50a9d320a9fbef481e25a09115d75fb6 (diff)
downloadffmpeg-ffbb289a1dacf506b6e6b313a1b977f80da4e0dd.tar.gz
Split url_open and url_open_protocol into url_alloc and url_connect
Originally committed as revision 23704 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r--libavformat/avio.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 7aefe1a1c4..752f6e2cba 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -51,6 +51,7 @@ typedef struct URLContext {
int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */
void *priv_data;
char *filename; /**< specified URL */
+ int is_connected;
} URLContext;
typedef struct URLPollEntry {
@@ -81,6 +82,24 @@ int url_open_protocol (URLContext **puc, struct URLProtocol *up,
/**
* Creates an URLContext for accessing to the resource indicated by
+ * url, but doesn't initiate the connection yet.
+ *
+ * @param puc pointer to the location where, in case of success, the
+ * function puts the pointer to the created URLContext
+ * @param flags flags which control how the resource indicated by url
+ * is to be opened
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code in case of failure
+ */
+int url_alloc(URLContext **h, const char *url, int flags);
+
+/**
+ * Connect an URLContext that has been allocated by url_alloc
+ */
+int url_connect(URLContext *h);
+
+/**
+ * Creates an URLContext for accessing to the resource indicated by
* url, and opens it.
*
* @param puc pointer to the location where, in case of success, the