[FFmpeg-cvslog] avio: make URLProtocol internal.
Anton Khirnov
git at videolan.org
Sat Apr 9 03:24:59 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Apr 7 21:01:17 2011 +0200| [5593f031489f54ad184dd2d2744e31006c8627a5] | committer: Anton Khirnov
avio: make URLProtocol internal.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5593f031489f54ad184dd2d2744e31006c8627a5
---
libavformat/avio.h | 6 +++++-
libavformat/url.h | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index a97d630..c39d2a0 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -139,8 +139,11 @@ attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout);
#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
-#endif
+/**
+ * @deprecated This struct is to be made private. Use the higher-level
+ * AVIOContext-based API instead.
+ */
typedef struct URLProtocol {
const char *name;
int (*url_open)(URLContext *h, const char *url, int flags);
@@ -157,6 +160,7 @@ typedef struct URLProtocol {
const AVClass *priv_data_class;
int flags;
} URLProtocol;
+#endif
#if FF_API_REGISTER_PROTOCOL
extern URLProtocol *first_protocol;
diff --git a/libavformat/url.h b/libavformat/url.h
index b6c110d..bde06d9 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -43,6 +43,23 @@ 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;
+} URLProtocol;
#endif
/**
More information about the ffmpeg-cvslog
mailing list