avio: Add an URLProtocol flag for indicating that a protocol uses network
authorMartin Storsjö <martin@martin.st>
Fri, 30 Dec 2011 09:38:05 +0000 (11:38 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 5 Jan 2012 21:56:52 +0000 (23:56 +0200)
This definition is in two files, since the definitions will move
to the private header at the next bump.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 files changed:
libavformat/avio.h
libavformat/gopher.c
libavformat/http.c
libavformat/librtmp.c
libavformat/mmsh.c
libavformat/mmst.c
libavformat/rtmpproto.c
libavformat/rtpproto.c
libavformat/tcp.c
libavformat/tls.c
libavformat/udp.c
libavformat/url.h

index dec2a5e..e73264f 100644 (file)
@@ -146,6 +146,7 @@ typedef struct URLContext {
 } URLContext;
 
 #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
+#define URL_PROTOCOL_FLAG_NETWORK       2 /*< The protocol uses network */
 
 /**
  * @deprecated This struct is to be made private. Use the higher-level
index c033861..a149f7f 100644 (file)
@@ -121,4 +121,5 @@ URLProtocol ff_gopher_protocol = {
     .url_write      = gopher_write,
     .url_close      = gopher_close,
     .priv_data_size = sizeof(GopherContext),
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
 };
index 7badf72..eea8ded 100644 (file)
@@ -565,6 +565,7 @@ URLProtocol ff_http_protocol = {
     .url_get_file_handle = http_get_file_handle,
     .priv_data_size      = sizeof(HTTPContext),
     .priv_data_class     = &http_context_class,
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 #endif
 #if CONFIG_HTTPS_PROTOCOL
@@ -578,6 +579,7 @@ URLProtocol ff_https_protocol = {
     .url_get_file_handle = http_get_file_handle,
     .priv_data_size      = sizeof(HTTPContext),
     .priv_data_class     = &https_context_class,
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 #endif
 
@@ -693,5 +695,6 @@ URLProtocol ff_httpproxy_protocol = {
     .url_close           = http_proxy_close,
     .url_get_file_handle = http_get_file_handle,
     .priv_data_size      = sizeof(HTTPContext),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 #endif
index c04c833..2d028b0 100644 (file)
@@ -162,6 +162,7 @@ URLProtocol ff_rtmp_protocol = {
     .url_read_seek       = rtmp_read_seek,
     .url_get_file_handle = rtmp_get_file_handle,
     .priv_data_size      = sizeof(RTMP),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
 URLProtocol ff_rtmpt_protocol = {
@@ -174,6 +175,7 @@ URLProtocol ff_rtmpt_protocol = {
     .url_read_seek       = rtmp_read_seek,
     .url_get_file_handle = rtmp_get_file_handle,
     .priv_data_size      = sizeof(RTMP),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
 URLProtocol ff_rtmpe_protocol = {
@@ -186,6 +188,7 @@ URLProtocol ff_rtmpe_protocol = {
     .url_read_seek       = rtmp_read_seek,
     .url_get_file_handle = rtmp_get_file_handle,
     .priv_data_size      = sizeof(RTMP),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
 URLProtocol ff_rtmpte_protocol = {
@@ -198,6 +201,7 @@ URLProtocol ff_rtmpte_protocol = {
     .url_read_seek       = rtmp_read_seek,
     .url_get_file_handle = rtmp_get_file_handle,
     .priv_data_size      = sizeof(RTMP),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
 URLProtocol ff_rtmps_protocol = {
@@ -210,4 +214,5 @@ URLProtocol ff_rtmps_protocol = {
     .url_read_seek       = rtmp_read_seek,
     .url_get_file_handle = rtmp_get_file_handle,
     .priv_data_size      = sizeof(RTMP),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
index fa1a467..5e9d0bc 100644 (file)
@@ -364,4 +364,5 @@ URLProtocol ff_mmsh_protocol = {
     .url_read       = mmsh_read,
     .url_close      = mmsh_close,
     .priv_data_size = sizeof(MMSHContext),
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
 };
index fe21a32..93ad073 100644 (file)
@@ -625,4 +625,5 @@ URLProtocol ff_mmst_protocol = {
     .url_read       = mms_read,
     .url_close      = mms_close,
     .priv_data_size = sizeof(MMSTContext),
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
 };
index 53d912e..867969a 100644 (file)
@@ -1000,4 +1000,5 @@ URLProtocol ff_rtmp_protocol = {
     .url_write      = rtmp_write,
     .url_close      = rtmp_close,
     .priv_data_size = sizeof(RTMPContext),
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
 };
index 93cad3c..03794ae 100644 (file)
@@ -330,4 +330,5 @@ URLProtocol ff_rtp_protocol = {
     .url_close           = rtp_close,
     .url_get_file_handle = rtp_get_file_handle,
     .priv_data_size      = sizeof(RTPContext),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
index 0d3aeaf..fdb457e 100644 (file)
@@ -204,4 +204,5 @@ URLProtocol ff_tcp_protocol = {
     .url_close           = tcp_close,
     .url_get_file_handle = tcp_get_file_handle,
     .priv_data_size      = sizeof(TCPContext),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
index 26f5ee5..fb84fa8 100644 (file)
@@ -248,4 +248,5 @@ URLProtocol ff_tls_protocol = {
     .url_write      = tls_write,
     .url_close      = tls_close,
     .priv_data_size = sizeof(TLSContext),
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
 };
index 2bdd3dc..8bb63c6 100644 (file)
@@ -491,4 +491,5 @@ URLProtocol ff_udp_protocol = {
     .url_close           = udp_close,
     .url_get_file_handle = udp_get_file_handle,
     .priv_data_size      = sizeof(UDPContext),
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
index ea8c7ab..14832af 100644 (file)
@@ -33,6 +33,7 @@
 
 #if !FF_API_OLD_AVIO
 #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
+#define URL_PROTOCOL_FLAG_NETWORK       2 /*< The protocol uses network */
 
 extern int (*url_interrupt_cb)(void);