diff avio.h @ 6160:1b4be334ef89 libavformat

Split url_open and url_open_protocol into url_alloc and url_connect
author mstorsjo
date Tue, 22 Jun 2010 14:03:37 +0000
parents 3fcaee5cf416
children f7090c70ed34
line wrap: on
line diff
--- a/avio.h	Tue Jun 22 13:58:48 2010 +0000
+++ b/avio.h	Tue Jun 22 14:03:37 2010 +0000
@@ -51,6 +51,7 @@
     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 @@
 
 /**
  * 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