Mercurial > libavformat.hg
annotate avformat.h @ 47:45308962220f libavformat
added jpeg image encoder and decoder (new YUV handling routines and mjpeg codec fixes are necessary to go further)
| author | bellard |
|---|---|
| date | Sun, 02 Feb 2003 19:18:09 +0000 |
| parents | 7c5da7e7239a |
| children | 2a60f406fccc |
| 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; |
|
17
e1200dd82537
added simple still image format support to simplify image and imagepipe video formats
bellard
parents:
5
diff
changeset
|
240 |
| 0 | 241 /* XXX: use automatic init with either ELF sections or C file parser */ |
| 242 /* modules */ | |
| 243 | |
| 244 /* mpeg.c */ | |
| 245 int mpegps_init(void); | |
| 246 | |
| 247 /* mpegts.c */ | |
| 248 extern AVInputFormat mpegts_demux; | |
| 249 int mpegts_init(void); | |
| 250 | |
| 251 /* rm.c */ | |
| 252 int rm_init(void); | |
| 253 | |
| 254 /* crc.c */ | |
| 255 int crc_init(void); | |
| 256 | |
| 257 /* img.c */ | |
| 258 int img_init(void); | |
| 259 | |
| 260 /* asf.c */ | |
| 261 int asf_init(void); | |
| 262 | |
| 263 /* avienc.c */ | |
| 264 int avienc_init(void); | |
| 265 | |
| 266 /* avidec.c */ | |
| 267 int avidec_init(void); | |
| 268 | |
| 269 /* swf.c */ | |
| 270 int swf_init(void); | |
| 271 | |
| 272 /* mov.c */ | |
| 273 int mov_init(void); | |
| 274 | |
| 275 /* jpeg.c */ | |
| 276 int jpeg_init(void); | |
| 277 | |
| 278 /* gif.c */ | |
| 279 int gif_init(void); | |
| 280 | |
| 281 /* au.c */ | |
| 282 int au_init(void); | |
| 283 | |
| 284 /* wav.c */ | |
| 285 int wav_init(void); | |
| 286 | |
| 287 /* raw.c */ | |
| 288 int raw_init(void); | |
| 289 | |
| 290 /* ogg.c */ | |
| 291 int ogg_init(void); | |
| 292 | |
| 293 /* dv.c */ | |
| 294 int dv_init(void); | |
| 295 | |
| 296 /* ffm.c */ | |
| 297 int ffm_init(void); | |
| 298 | |
| 299 /* rtsp.c */ | |
| 300 extern AVInputFormat redir_demux; | |
| 301 int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f); | |
| 302 | |
| 303 #include "rtp.h" | |
| 304 | |
| 305 #include "rtsp.h" | |
| 306 | |
|
17
e1200dd82537
added simple still image format support to simplify image and imagepipe video formats
bellard
parents:
5
diff
changeset
|
307 /* yuv4mpeg.c */ |
|
e1200dd82537
added simple still image format support to simplify image and imagepipe video formats
bellard
parents:
5
diff
changeset
|
308 extern AVOutputFormat yuv4mpegpipe_oformat; |
|
e1200dd82537
added simple still image format support to simplify image and imagepipe video formats
bellard
parents:
5
diff
changeset
|
309 |
| 0 | 310 /* utils.c */ |
| 311 #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24)) | |
| 312 #define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24)) | |
| 313 | |
| 314 void av_register_input_format(AVInputFormat *format); | |
| 315 void av_register_output_format(AVOutputFormat *format); | |
| 316 AVOutputFormat *guess_stream_format(const char *short_name, | |
| 317 const char *filename, const char *mime_type); | |
| 318 AVOutputFormat *guess_format(const char *short_name, | |
| 319 const char *filename, const char *mime_type); | |
| 320 | |
| 321 void av_hex_dump(UINT8 *buf, int size); | |
| 322 | |
| 323 void av_register_all(void); | |
| 324 | |
| 325 typedef struct FifoBuffer { | |
| 326 UINT8 *buffer; | |
| 327 UINT8 *rptr, *wptr, *end; | |
| 328 } FifoBuffer; | |
| 329 | |
| 330 int fifo_init(FifoBuffer *f, int size); | |
| 331 void fifo_free(FifoBuffer *f); | |
| 332 int fifo_size(FifoBuffer *f, UINT8 *rptr); | |
| 333 int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr); | |
| 334 void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr); | |
| 335 | |
| 336 /* media file input */ | |
| 337 AVInputFormat *av_find_input_format(const char *short_name); | |
| 338 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); | |
| 339 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, | |
| 340 AVInputFormat *fmt, | |
| 341 int buf_size, | |
| 342 AVFormatParameters *ap); | |
| 343 | |
| 344 #define AVERROR_UNKNOWN (-1) /* unknown error */ | |
| 345 #define AVERROR_IO (-2) /* i/o error */ | |
| 346 #define AVERROR_NUMEXPECTED (-3) /* number syntax expected in filename */ | |
| 347 #define AVERROR_INVALIDDATA (-4) /* invalid data found */ | |
| 348 #define AVERROR_NOMEM (-5) /* not enough memory */ | |
| 349 #define AVERROR_NOFMT (-6) /* unknown format */ | |
| 350 | |
| 351 int av_find_stream_info(AVFormatContext *ic); | |
| 352 int av_read_packet(AVFormatContext *s, AVPacket *pkt); | |
| 353 void av_close_input_file(AVFormatContext *s); | |
| 354 AVStream *av_new_stream(AVFormatContext *s, int id); | |
| 355 void av_set_pts_info(AVFormatContext *s, int pts_wrap_bits, | |
| 356 int pts_num, int pts_den); | |
| 357 | |
| 358 /* media file output */ | |
|
17
e1200dd82537
added simple still image format support to simplify image and imagepipe video formats
bellard
parents:
5
diff
changeset
|
359 int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); |
| 0 | 360 int av_write_header(AVFormatContext *s); |
| 361 int av_write_frame(AVFormatContext *s, int stream_index, const uint8_t *buf, | |
| 362 int size); | |
| 363 int av_write_trailer(AVFormatContext *s); | |
| 364 | |
| 365 void dump_format(AVFormatContext *ic, | |
| 366 int index, | |
| 367 const char *url, | |
| 368 int is_output); | |
| 369 int parse_image_size(int *width_ptr, int *height_ptr, const char *str); | |
| 370 INT64 parse_date(const char *datestr, int duration); | |
| 371 | |
| 372 INT64 av_gettime(void); | |
| 373 | |
| 374 /* ffm specific for ffserver */ | |
| 375 #define FFM_PACKET_SIZE 4096 | |
| 376 offset_t ffm_read_write_index(int fd); | |
| 377 void ffm_write_write_index(int fd, offset_t pos); | |
| 378 void ffm_set_write_index(AVFormatContext *s, offset_t pos, offset_t file_size); | |
| 379 | |
| 380 int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info); | |
| 381 | |
| 382 int get_frame_filename(char *buf, int buf_size, | |
| 383 const char *path, int number); | |
| 384 int filename_number_test(const char *filename); | |
| 385 | |
| 386 /* grab specific */ | |
| 387 int video_grab_init(void); | |
| 388 int audio_init(void); | |
| 389 | |
| 29 | 390 /* DV1394 */ |
| 391 int dv1394_init(void); | |
| 0 | 392 |
| 393 #ifdef HAVE_AV_CONFIG_H | |
| 394 int strstart(const char *str, const char *val, const char **ptr); | |
| 395 int stristart(const char *str, const char *val, const char **ptr); | |
| 396 void pstrcpy(char *buf, int buf_size, const char *str); | |
| 397 char *pstrcat(char *buf, int buf_size, const char *s); | |
| 398 | |
| 399 struct in_addr; | |
| 400 int resolve_host(struct in_addr *sin_addr, const char *hostname); | |
| 401 | |
| 402 void url_split(char *proto, int proto_size, | |
| 403 char *hostname, int hostname_size, | |
| 404 int *port_ptr, | |
| 405 char *path, int path_size, | |
| 406 const char *url); | |
| 407 | |
| 408 int match_ext(const char *filename, const char *extensions); | |
| 409 | |
| 410 #endif /* HAVE_AV_CONFIG_H */ | |
| 411 | |
| 39 | 412 #ifdef __cplusplus |
| 413 } | |
| 414 #endif | |
| 415 | |
| 0 | 416 #endif /* AVFORMAT_H */ |
