Mercurial > libavformat.hg
comparison avformat.h @ 65:a58a8a53eb46 libavformat
* UINTX -> uintx_t INTX -> intx_t
author | kabi |
---|---|
date | Tue, 11 Feb 2003 16:35:48 +0000 |
parents | b0e0eb595e29 |
children | a803af1b10be |
comparison
equal
deleted
inserted
replaced
64:b0e0eb595e29 | 65:a58a8a53eb46 |
---|---|
16 /* packet functions */ | 16 /* packet functions */ |
17 | 17 |
18 #define AV_NOPTS_VALUE 0 | 18 #define AV_NOPTS_VALUE 0 |
19 | 19 |
20 typedef struct AVPacket { | 20 typedef struct AVPacket { |
21 INT64 pts; /* presentation time stamp in stream units (set av_set_pts_info) */ | 21 int64_t pts; /* presentation time stamp in stream units (set av_set_pts_info) */ |
22 UINT8 *data; | 22 uint8_t *data; |
23 int size; | 23 int size; |
24 int stream_index; | 24 int stream_index; |
25 int flags; | 25 int flags; |
26 int duration; | 26 int duration; |
27 void (*destruct)(struct AVPacket *); | 27 void (*destruct)(struct AVPacket *); |
52 /* fractional numbers for exact pts handling */ | 52 /* fractional numbers for exact pts handling */ |
53 | 53 |
54 /* the exact value of the fractional number is: 'val + num / den'. num | 54 /* the exact value of the fractional number is: 'val + num / den'. num |
55 is assumed to be such as 0 <= num < den */ | 55 is assumed to be such as 0 <= num < den */ |
56 typedef struct AVFrac { | 56 typedef struct AVFrac { |
57 INT64 val, num, den; | 57 int64_t val, num, den; |
58 } AVFrac; | 58 } AVFrac; |
59 | 59 |
60 void av_frac_init(AVFrac *f, INT64 val, INT64 num, INT64 den); | 60 void av_frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den); |
61 void av_frac_add(AVFrac *f, INT64 incr); | 61 void av_frac_add(AVFrac *f, int64_t incr); |
62 void av_frac_set(AVFrac *f, INT64 val); | 62 void av_frac_set(AVFrac *f, int64_t val); |
63 | 63 |
64 /*************************************************/ | 64 /*************************************************/ |
65 /* input/output formats */ | 65 /* input/output formats */ |
66 | 66 |
67 struct AVFormatContext; | 67 struct AVFormatContext; |
139 /* close the stream. The AVFormatContext and AVStreams are not | 139 /* close the stream. The AVFormatContext and AVStreams are not |
140 freed by this function */ | 140 freed by this function */ |
141 int (*read_close)(struct AVFormatContext *); | 141 int (*read_close)(struct AVFormatContext *); |
142 /* seek at or before a given pts (given in microsecond). The pts | 142 /* seek at or before a given pts (given in microsecond). The pts |
143 origin is defined by the stream */ | 143 origin is defined by the stream */ |
144 int (*read_seek)(struct AVFormatContext *, INT64 pts); | 144 int (*read_seek)(struct AVFormatContext *, int64_t pts); |
145 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_NOHEADER */ | 145 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_NOHEADER */ |
146 int flags; | 146 int flags; |
147 /* if extensions are defined, then no probe is done. You should | 147 /* if extensions are defined, then no probe is done. You should |
148 usually not use extension format guessing because it is not | 148 usually not use extension format guessing because it is not |
149 reliable enough */ | 149 reliable enough */ |
335 AVOutputFormat *guess_stream_format(const char *short_name, | 335 AVOutputFormat *guess_stream_format(const char *short_name, |
336 const char *filename, const char *mime_type); | 336 const char *filename, const char *mime_type); |
337 AVOutputFormat *guess_format(const char *short_name, | 337 AVOutputFormat *guess_format(const char *short_name, |
338 const char *filename, const char *mime_type); | 338 const char *filename, const char *mime_type); |
339 | 339 |
340 void av_hex_dump(UINT8 *buf, int size); | 340 void av_hex_dump(uint8_t *buf, int size); |
341 | 341 |
342 void av_register_all(void); | 342 void av_register_all(void); |
343 | 343 |
344 typedef struct FifoBuffer { | 344 typedef struct FifoBuffer { |
345 UINT8 *buffer; | 345 uint8_t *buffer; |
346 UINT8 *rptr, *wptr, *end; | 346 uint8_t *rptr, *wptr, *end; |
347 } FifoBuffer; | 347 } FifoBuffer; |
348 | 348 |
349 int fifo_init(FifoBuffer *f, int size); | 349 int fifo_init(FifoBuffer *f, int size); |
350 void fifo_free(FifoBuffer *f); | 350 void fifo_free(FifoBuffer *f); |
351 int fifo_size(FifoBuffer *f, UINT8 *rptr); | 351 int fifo_size(FifoBuffer *f, uint8_t *rptr); |
352 int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr); | 352 int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr); |
353 void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr); | 353 void fifo_write(FifoBuffer *f, uint8_t *buf, int size, uint8_t **wptr_ptr); |
354 | 354 |
355 /* media file input */ | 355 /* media file input */ |
356 AVInputFormat *av_find_input_format(const char *short_name); | 356 AVInputFormat *av_find_input_format(const char *short_name); |
357 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); | 357 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); |
358 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, | 358 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, |
384 void dump_format(AVFormatContext *ic, | 384 void dump_format(AVFormatContext *ic, |
385 int index, | 385 int index, |
386 const char *url, | 386 const char *url, |
387 int is_output); | 387 int is_output); |
388 int parse_image_size(int *width_ptr, int *height_ptr, const char *str); | 388 int parse_image_size(int *width_ptr, int *height_ptr, const char *str); |
389 INT64 parse_date(const char *datestr, int duration); | 389 int64_t parse_date(const char *datestr, int duration); |
390 | 390 |
391 INT64 av_gettime(void); | 391 int64_t av_gettime(void); |
392 | 392 |
393 /* ffm specific for ffserver */ | 393 /* ffm specific for ffserver */ |
394 #define FFM_PACKET_SIZE 4096 | 394 #define FFM_PACKET_SIZE 4096 |
395 offset_t ffm_read_write_index(int fd); | 395 offset_t ffm_read_write_index(int fd); |
396 void ffm_write_write_index(int fd, offset_t pos); | 396 void ffm_write_write_index(int fd, offset_t pos); |