[FFmpeg-cvslog] avio: make URLContext 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 20:25:52 2011 +0200| [c486dade95ba529151391a7879538c9d4787752b] | committer: Anton Khirnov
avio: make URLContext internal.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c486dade95ba529151391a7879538c9d4787752b
---
libavformat/avio.h | 3 ++-
libavformat/avio_internal.h | 1 +
libavformat/file.c | 1 +
libavformat/http.h | 2 +-
libavformat/librtmp.c | 1 +
libavformat/mms.h | 2 +-
libavformat/rtmppkt.h | 1 +
libavformat/rtpdec.h | 1 +
libavformat/rtpenc_chain.h | 1 +
libavformat/url.h | 11 +++++++++++
10 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 701f3fe..a97d630 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -37,12 +37,14 @@
/* unbuffered I/O */
+#if FF_API_OLD_AVIO
/**
* URL Context.
* New fields can be added to the end with minor version bumps.
* Removal, reordering and changes to existing fields require a major
* version bump.
* sizeof(URLContext) must not be used outside libav*.
+ * @deprecated This struct will be made private
*/
typedef struct URLContext {
#if FF_API_URL_CLASS
@@ -57,7 +59,6 @@ typedef struct URLContext {
int is_connected;
} URLContext;
-#if FF_API_OLD_AVIO
typedef struct URLPollEntry {
URLContext *handle;
int events;
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 2879ee1..721a3c4 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -21,6 +21,7 @@
#define AVFORMAT_AVIO_INTERNAL_H
#include "avio.h"
+#include "url.h"
int ffio_init_context(AVIOContext *s,
unsigned char *buffer,
diff --git a/libavformat/file.c b/libavformat/file.c
index 3293a53..31067ed 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -29,6 +29,7 @@
#include <sys/stat.h>
#include <stdlib.h>
#include "os_support.h"
+#include "url.h"
/* standard file protocol */
diff --git a/libavformat/http.h b/libavformat/http.h
index 97f54cc..c5ff5e1 100644
--- a/libavformat/http.h
+++ b/libavformat/http.h
@@ -22,7 +22,7 @@
#ifndef AVFORMAT_HTTP_H
#define AVFORMAT_HTTP_H
-#include "avio.h"
+#include "url.h"
/**
* Set custom HTTP headers.
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 5770e59..db5cc98 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -25,6 +25,7 @@
*/
#include "avformat.h"
+#include "url.h"
#include <librtmp/rtmp.h>
#include <librtmp/log.h>
diff --git a/libavformat/mms.h b/libavformat/mms.h
index e85d59a..12e9ef0 100644
--- a/libavformat/mms.h
+++ b/libavformat/mms.h
@@ -21,7 +21,7 @@
#ifndef AVFORMAT_MMS_H
#define AVFORMAT_MMS_H
-#include "avformat.h"
+#include "url.h"
typedef struct {
int id;
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h
index 8ad2924..bb34758 100644
--- a/libavformat/rtmppkt.h
+++ b/libavformat/rtmppkt.h
@@ -23,6 +23,7 @@
#define AVFORMAT_RTMPPKT_H
#include "avformat.h"
+#include "url.h"
/** maximum possible number of different RTMP channels */
#define RTMP_CHANNELS 65599
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index 1d4a9b6..da53efc 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -25,6 +25,7 @@
#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "rtp.h"
+#include "url.h"
typedef struct PayloadContext PayloadContext;
typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler;
diff --git a/libavformat/rtpenc_chain.h b/libavformat/rtpenc_chain.h
index 678b49e..6bdddcf 100644
--- a/libavformat/rtpenc_chain.h
+++ b/libavformat/rtpenc_chain.h
@@ -23,6 +23,7 @@
#define AVFORMAT_RTPENC_CHAIN_H
#include "avformat.h"
+#include "url.h"
AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
URLContext *handle, int packet_size);
diff --git a/libavformat/url.h b/libavformat/url.h
index b8ea6ad..b6c110d 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -32,6 +32,17 @@
#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
extern int (*url_interrupt_cb)(void);
+
+typedef struct URLContext {
+ const AVClass *av_class; /**< information for av_log(). Set by url_open(). */
+ struct URLProtocol *prot;
+ void *priv_data;
+ char *filename; /**< specified URL */
+ int flags;
+ int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */
+ int is_streamed; /**< true if streamed (no seek possible), default = false */
+ int is_connected;
+} URLContext;
#endif
/**
More information about the ffmpeg-cvslog
mailing list