]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/url.h
flvenc: Write the right metadata entry count
[ffmpeg] / libavformat / url.h
index b6c110dfe98b93465f9534173102e3d0c50f44ef..d69d0bc5c54f080485c0451876e1cc021cd74c0f 100644 (file)
@@ -43,6 +43,24 @@ typedef struct URLContext {
     int is_streamed;            /**< true if streamed (no seek possible), default = false */
     int is_connected;
 } URLContext;
+
+typedef struct URLProtocol {
+    const char *name;
+    int     (*url_open)( URLContext *h, const char *url, int flags);
+    int     (*url_read)( URLContext *h, unsigned char *buf, int size);
+    int     (*url_write)(URLContext *h, const unsigned char *buf, int size);
+    int64_t (*url_seek)( URLContext *h, int64_t pos, int whence);
+    int     (*url_close)(URLContext *h);
+    struct URLProtocol *next;
+    int (*url_read_pause)(URLContext *h, int pause);
+    int64_t (*url_read_seek)(URLContext *h, int stream_index,
+                             int64_t timestamp, int flags);
+    int (*url_get_file_handle)(URLContext *h);
+    int priv_data_size;
+    const AVClass *priv_data_class;
+    int flags;
+    int (*url_check)(URLContext *h, int mask);
+} URLProtocol;
 #endif
 
 /**
@@ -56,12 +74,12 @@ typedef struct URLContext {
  * @return 0 in case of success, a negative value corresponding to an
  * AVERROR code in case of failure
  */
-int ffurl_alloc(URLContext **h, const char *url, int flags);
+int ffurl_alloc(URLContext **puc, const char *filename, int flags);
 
 /**
  * Connect an URLContext that has been allocated by ffurl_alloc
  */
-int ffurl_connect(URLContext *h);
+int ffurl_connect(URLContext *uc);
 
 /**
  * Create an URLContext for accessing to the resource indicated by
@@ -74,7 +92,7 @@ int ffurl_connect(URLContext *h);
  * @return 0 in case of success, a negative value corresponding to an
  * AVERROR code in case of failure
  */
-int ffurl_open(URLContext **h, const char *url, int flags);
+int ffurl_open(URLContext **puc, const char *filename, int flags);
 
 /**
  * Read up to size bytes from the resource accessed by h, and store
@@ -155,4 +173,4 @@ int ffurl_register_protocol(URLProtocol *protocol, int size);
 int ff_udp_set_remote_url(URLContext *h, const char *uri);
 int ff_udp_get_local_port(URLContext *h);
 
-#endif //AVFORMAT_URL_H
+#endif /* AVFORMAT_URL_H */