Browse code

avio: make URLContext internal.

Anton Khirnov authored on 2011/04/08 03:25:52
Showing 10 changed files
... ...
@@ -37,12 +37,14 @@
37 37
 
38 38
 /* unbuffered I/O */
39 39
 
40
+#if FF_API_OLD_AVIO
40 41
 /**
41 42
  * URL Context.
42 43
  * New fields can be added to the end with minor version bumps.
43 44
  * Removal, reordering and changes to existing fields require a major
44 45
  * version bump.
45 46
  * sizeof(URLContext) must not be used outside libav*.
47
+ * @deprecated This struct will be made private
46 48
  */
47 49
 typedef struct URLContext {
48 50
 #if FF_API_URL_CLASS
... ...
@@ -57,7 +59,6 @@ typedef struct URLContext {
57 57
     int is_connected;
58 58
 } URLContext;
59 59
 
60
-#if FF_API_OLD_AVIO
61 60
 typedef struct URLPollEntry {
62 61
     URLContext *handle;
63 62
     int events;
... ...
@@ -21,6 +21,7 @@
21 21
 #define AVFORMAT_AVIO_INTERNAL_H
22 22
 
23 23
 #include "avio.h"
24
+#include "url.h"
24 25
 
25 26
 int ffio_init_context(AVIOContext *s,
26 27
                   unsigned char *buffer,
... ...
@@ -29,6 +29,7 @@
29 29
 #include <sys/stat.h>
30 30
 #include <stdlib.h>
31 31
 #include "os_support.h"
32
+#include "url.h"
32 33
 
33 34
 
34 35
 /* standard file protocol */
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef AVFORMAT_HTTP_H
23 23
 #define AVFORMAT_HTTP_H
24 24
 
25
-#include "avio.h"
25
+#include "url.h"
26 26
 
27 27
 /**
28 28
  * Set custom HTTP headers.
... ...
@@ -25,6 +25,7 @@
25 25
  */
26 26
 
27 27
 #include "avformat.h"
28
+#include "url.h"
28 29
 
29 30
 #include <librtmp/rtmp.h>
30 31
 #include <librtmp/log.h>
... ...
@@ -21,7 +21,7 @@
21 21
 #ifndef AVFORMAT_MMS_H
22 22
 #define AVFORMAT_MMS_H
23 23
 
24
-#include "avformat.h"
24
+#include "url.h"
25 25
 
26 26
 typedef struct {
27 27
     int id;
... ...
@@ -23,6 +23,7 @@
23 23
 #define AVFORMAT_RTMPPKT_H
24 24
 
25 25
 #include "avformat.h"
26
+#include "url.h"
26 27
 
27 28
 /** maximum possible number of different RTMP channels */
28 29
 #define RTMP_CHANNELS 65599
... ...
@@ -25,6 +25,7 @@
25 25
 #include "libavcodec/avcodec.h"
26 26
 #include "avformat.h"
27 27
 #include "rtp.h"
28
+#include "url.h"
28 29
 
29 30
 typedef struct PayloadContext PayloadContext;
30 31
 typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler;
... ...
@@ -23,6 +23,7 @@
23 23
 #define AVFORMAT_RTPENC_CHAIN_H
24 24
 
25 25
 #include "avformat.h"
26
+#include "url.h"
26 27
 
27 28
 AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
28 29
                                        URLContext *handle, int packet_size);
... ...
@@ -32,6 +32,17 @@
32 32
 #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
33 33
 
34 34
 extern int (*url_interrupt_cb)(void);
35
+
36
+typedef struct URLContext {
37
+    const AVClass *av_class;    /**< information for av_log(). Set by url_open(). */
38
+    struct URLProtocol *prot;
39
+    void *priv_data;
40
+    char *filename;             /**< specified URL */
41
+    int flags;
42
+    int max_packet_size;        /**< if non zero, the stream is packetized with this max packet size */
43
+    int is_streamed;            /**< true if streamed (no seek possible), default = false */
44
+    int is_connected;
45
+} URLContext;
35 46
 #endif
36 47
 
37 48
 /**