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