annotate avformat.h @ 11:932b59c66c60 libavformat

mingw patch by (Bill Eldridge <bill at rfa dot org>)
author michaelni
date Fri, 20 Dec 2002 19:25:10 +0000
parents 39c4c4336486
children e1200dd82537
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
1 #ifndef AVFORMAT_H
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
2 #define AVFORMAT_H
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
3
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
4 #define LIBAVFORMAT_VERSION_INT 0x000406
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
5 #define LIBAVFORMAT_VERSION "0.4.6"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
6 #define LIBAVFORMAT_BUILD 4602
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
7
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
8 #include "avcodec.h"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
9
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
10 #include "avio.h"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
11
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
12 /* packet functions */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
13
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
14 #define AV_NOPTS_VALUE 0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
15
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
16 typedef struct AVPacket {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
17 INT64 pts; /* presentation time stamp in stream units (set av_set_pts_info) */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
18 UINT8 *data;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
19 int size;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
20 int stream_index;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
21 int flags;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
22 int duration;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
23 #define PKT_FLAG_KEY 0x0001
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
24 } AVPacket;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
25
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
26 int av_new_packet(AVPacket *pkt, int size);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
27 void av_free_packet(AVPacket *pkt);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
28
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
29 /*************************************************/
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
30 /* fractional numbers for exact pts handling */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
31
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
32 /* the exact value of the fractional number is: 'val + num / den'. num
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
33 is assumed to be such as 0 <= num < den */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
34 typedef struct AVFrac {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
35 INT64 val, num, den;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
36 } AVFrac;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
37
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
38 void av_frac_init(AVFrac *f, INT64 val, INT64 num, INT64 den);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
39 void av_frac_add(AVFrac *f, INT64 incr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
40 void av_frac_set(AVFrac *f, INT64 val);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
41
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
42 /*************************************************/
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
43 /* input/output formats */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
44
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
45 struct AVFormatContext;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
46
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
47 /* this structure contains the data a format has to probe a file */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
48 typedef struct AVProbeData {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
49 char *filename;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
50 unsigned char *buf;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
51 int buf_size;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
52 } AVProbeData;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
53
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
54 #define AVPROBE_SCORE_MAX 100
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
55
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
56 typedef struct AVFormatParameters {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
57 int frame_rate;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
58 int sample_rate;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
59 int channels;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
60 int width;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
61 int height;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
62 enum PixelFormat pix_fmt;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
63 } AVFormatParameters;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
64
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
65 #define AVFMT_NOFILE 0x0001 /* no file should be opened */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
66 #define AVFMT_NEEDNUMBER 0x0002 /* needs '%d' in filename */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
67 #define AVFMT_NOHEADER 0x0004 /* signal that no header is present
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
68 (streams are added dynamically) */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
69 #define AVFMT_SHOW_IDS 0x0008 /* show format stream IDs numbers */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
70 #define AVFMT_RGB24 0x0010 /* force RGB24 output for ppm (hack
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
71 - need better api) */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
72 #define AVFMT_RAWPICTURE 0x0020 /* format wants AVPicture structure for
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
73 raw picture data */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
74
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
75 typedef struct AVOutputFormat {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
76 const char *name;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
77 const char *long_name;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
78 const char *mime_type;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
79 const char *extensions; /* comma separated extensions */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
80 /* size of private data so that it can be allocated in the wrapper */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
81 int priv_data_size;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
82 /* output support */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
83 enum CodecID audio_codec; /* default audio codec */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
84 enum CodecID video_codec; /* default video codec */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
85 int (*write_header)(struct AVFormatContext *);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
86 /* XXX: change prototype for 64 bit pts */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
87 int (*write_packet)(struct AVFormatContext *,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
88 int stream_index,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
89 unsigned char *buf, int size, int force_pts);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
90 int (*write_trailer)(struct AVFormatContext *);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
91 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
92 int flags;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
93 /* private fields */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
94 struct AVOutputFormat *next;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
95 } AVOutputFormat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
96
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
97 typedef struct AVInputFormat {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
98 const char *name;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
99 const char *long_name;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
100 /* size of private data so that it can be allocated in the wrapper */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
101 int priv_data_size;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
102 /* tell if a given file has a chance of being parsing by this format */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
103 int (*read_probe)(AVProbeData *);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
104 /* read the format header and initialize the AVFormatContext
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
105 structure. Return 0 if OK. 'ap' if non NULL contains
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
106 additionnal paramters. Only used in raw format right
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
107 now. 'av_new_stream' should be called to create new streams. */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
108 int (*read_header)(struct AVFormatContext *,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
109 AVFormatParameters *ap);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
110 /* read one packet and put it in 'pkt'. pts and flags are also
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
111 set. 'av_new_stream' can be called only if the flag
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
112 AVFMT_NOHEADER is used. */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
113 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
114 /* close the stream. The AVFormatContext and AVStreams are not
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
115 freed by this function */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
116 int (*read_close)(struct AVFormatContext *);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
117 /* seek at or before a given pts (given in microsecond). The pts
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
118 origin is defined by the stream */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
119 int (*read_seek)(struct AVFormatContext *, INT64 pts);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
120 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_NOHEADER */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
121 int flags;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
122 /* if extensions are defined, then no probe is done. You should
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
123 usually not use extension format guessing because it is not
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
124 reliable enough */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
125 const char *extensions;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
126 /* general purpose read only value that the format can use */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
127 int value;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
128 /* private fields */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
129 struct AVInputFormat *next;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
130 } AVInputFormat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
131
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
132 typedef struct AVStream {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
133 int index; /* stream index in AVFormatContext */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
134 int id; /* format specific stream id */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
135 AVCodecContext codec; /* codec context */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
136 int r_frame_rate; /* real frame rate of the stream */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
137 uint64_t time_length; /* real length of the stream in miliseconds */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
138 void *priv_data;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
139 /* internal data used in av_find_stream_info() */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
140 int codec_info_state;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
141 int codec_info_nb_repeat_frames;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
142 int codec_info_nb_real_frames;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
143 /* PTS generation when outputing stream */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
144 AVFrac pts;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
145 /* ffmpeg.c private use */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
146 int stream_copy; /* if TRUE, just copy stream */
5
39c4c4336486 cleanup
michaelni
parents: 0
diff changeset
147 /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame
39c4c4336486 cleanup
michaelni
parents: 0
diff changeset
148 * MN:dunno if thats the right place, for it */
39c4c4336486 cleanup
michaelni
parents: 0
diff changeset
149 float quality;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
150 } AVStream;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
151
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
152 #define MAX_STREAMS 20
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
153
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
154 /* format I/O context */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
155 typedef struct AVFormatContext {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
156 /* can only be iformat or oformat, not both at the same time */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
157 struct AVInputFormat *iformat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
158 struct AVOutputFormat *oformat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
159 void *priv_data;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
160 ByteIOContext pb;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
161 int nb_streams;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
162 AVStream *streams[MAX_STREAMS];
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
163 char filename[1024]; /* input or output filename */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
164 /* stream info */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
165 char title[512];
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
166 char author[512];
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
167 char copyright[512];
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
168 char comment[512];
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
169 int flags; /* format specific flags */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
170 /* private data for pts handling (do not modify directly) */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
171 int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
172 int pts_num, pts_den; /* value to convert to seconds */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
173 /* This buffer is only needed when packets were already buffered but
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
174 not decoded, for example to get the codec parameters in mpeg
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
175 streams */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
176 struct AVPacketList *packet_buffer;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
177 } AVFormatContext;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
178
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
179 typedef struct AVPacketList {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
180 AVPacket pkt;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
181 struct AVPacketList *next;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
182 } AVPacketList;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
183
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
184 extern AVInputFormat *first_iformat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
185 extern AVOutputFormat *first_oformat;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
186
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
187 /* XXX: use automatic init with either ELF sections or C file parser */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
188 /* modules */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
189
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
190 /* mpeg.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
191 int mpegps_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
192
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
193 /* mpegts.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
194 extern AVInputFormat mpegts_demux;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
195 int mpegts_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
196
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
197 /* rm.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
198 int rm_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
199
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
200 /* crc.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
201 int crc_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
202
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
203 /* img.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
204 int img_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
205
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
206 /* asf.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
207 int asf_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
208
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
209 /* avienc.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
210 int avienc_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
211
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
212 /* avidec.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
213 int avidec_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
214
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
215 /* swf.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
216 int swf_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
217
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
218 /* mov.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
219 int mov_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
220
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
221 /* jpeg.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
222 int jpeg_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
223
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
224 /* gif.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
225 int gif_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
226
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
227 /* au.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
228 int au_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
229
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
230 /* wav.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
231 int wav_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
232
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
233 /* raw.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
234 int raw_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
235
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
236 /* ogg.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
237 int ogg_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
238
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
239 /* dv.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
240 int dv_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
241
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
242 /* ffm.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
243 int ffm_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
244
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
245 /* rtsp.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
246 extern AVInputFormat redir_demux;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
247 int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
248
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
249 #include "rtp.h"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
250
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
251 #include "rtsp.h"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
252
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
253 /* utils.c */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
254 #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
255 #define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24))
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
256
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
257 void av_register_input_format(AVInputFormat *format);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
258 void av_register_output_format(AVOutputFormat *format);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
259 AVOutputFormat *guess_stream_format(const char *short_name,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
260 const char *filename, const char *mime_type);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
261 AVOutputFormat *guess_format(const char *short_name,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
262 const char *filename, const char *mime_type);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
263
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
264 void av_hex_dump(UINT8 *buf, int size);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
265
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
266 void av_register_all(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
267
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
268 typedef struct FifoBuffer {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
269 UINT8 *buffer;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
270 UINT8 *rptr, *wptr, *end;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
271 } FifoBuffer;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
272
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
273 int fifo_init(FifoBuffer *f, int size);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
274 void fifo_free(FifoBuffer *f);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
275 int fifo_size(FifoBuffer *f, UINT8 *rptr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
276 int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
277 void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
278
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
279 /* media file input */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
280 AVInputFormat *av_find_input_format(const char *short_name);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
281 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
282 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
283 AVInputFormat *fmt,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
284 int buf_size,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
285 AVFormatParameters *ap);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
286
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
287 #define AVERROR_UNKNOWN (-1) /* unknown error */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
288 #define AVERROR_IO (-2) /* i/o error */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
289 #define AVERROR_NUMEXPECTED (-3) /* number syntax expected in filename */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
290 #define AVERROR_INVALIDDATA (-4) /* invalid data found */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
291 #define AVERROR_NOMEM (-5) /* not enough memory */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
292 #define AVERROR_NOFMT (-6) /* unknown format */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
293
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
294 int av_find_stream_info(AVFormatContext *ic);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
295 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
296 void av_close_input_file(AVFormatContext *s);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
297 AVStream *av_new_stream(AVFormatContext *s, int id);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
298 void av_set_pts_info(AVFormatContext *s, int pts_wrap_bits,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
299 int pts_num, int pts_den);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
300
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
301 /* media file output */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
302 int av_write_header(AVFormatContext *s);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
303 int av_write_frame(AVFormatContext *s, int stream_index, const uint8_t *buf,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
304 int size);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
305 int av_write_trailer(AVFormatContext *s);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
306
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
307 void dump_format(AVFormatContext *ic,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
308 int index,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
309 const char *url,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
310 int is_output);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
311 int parse_image_size(int *width_ptr, int *height_ptr, const char *str);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
312 INT64 parse_date(const char *datestr, int duration);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
313
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
314 INT64 av_gettime(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
315
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
316 /* ffm specific for ffserver */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
317 #define FFM_PACKET_SIZE 4096
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
318 offset_t ffm_read_write_index(int fd);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
319 void ffm_write_write_index(int fd, offset_t pos);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
320 void ffm_set_write_index(AVFormatContext *s, offset_t pos, offset_t file_size);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
321
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
322 int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
323
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
324 int get_frame_filename(char *buf, int buf_size,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
325 const char *path, int number);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
326 int filename_number_test(const char *filename);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
327
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
328 /* grab specific */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
329 int video_grab_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
330 int audio_init(void);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
331
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
332 extern const char *v4l_device;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
333 extern const char *audio_device;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
334
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
335 #ifdef HAVE_AV_CONFIG_H
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
336 int strstart(const char *str, const char *val, const char **ptr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
337 int stristart(const char *str, const char *val, const char **ptr);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
338 void pstrcpy(char *buf, int buf_size, const char *str);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
339 char *pstrcat(char *buf, int buf_size, const char *s);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
340
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
341 struct in_addr;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
342 int resolve_host(struct in_addr *sin_addr, const char *hostname);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
343
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
344 void url_split(char *proto, int proto_size,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
345 char *hostname, int hostname_size,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
346 int *port_ptr,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
347 char *path, int path_size,
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
348 const char *url);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
349
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
350 int match_ext(const char *filename, const char *extensions);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
351
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
352 #endif /* HAVE_AV_CONFIG_H */
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
353
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
354 #endif /* AVFORMAT_H */