Mercurial > libavformat.hg
comparison avformat.h @ 462:b69898ffc92a libavformat
move time_base (pts_num/pts_den) from AVFormatContext -> AVStream
author | michael |
---|---|
date | Fri, 21 May 2004 20:43:21 +0000 |
parents | 50bae308f71e |
children | 696f41bc8784 |
comparison
equal
deleted
inserted
replaced
461:63540e5504f7 | 462:b69898ffc92a |
---|---|
212 /* internal data used in av_find_stream_info() */ | 212 /* internal data used in av_find_stream_info() */ |
213 int64_t codec_info_duration; | 213 int64_t codec_info_duration; |
214 int codec_info_nb_frames; | 214 int codec_info_nb_frames; |
215 /* encoding: PTS generation when outputing stream */ | 215 /* encoding: PTS generation when outputing stream */ |
216 AVFrac pts; | 216 AVFrac pts; |
217 AVRational time_base; | |
218 int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */ | |
217 /* ffmpeg.c private use */ | 219 /* ffmpeg.c private use */ |
218 int stream_copy; /* if TRUE, just copy stream */ | 220 int stream_copy; /* if TRUE, just copy stream */ |
219 /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame | 221 /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame |
220 * MN:dunno if thats the right place, for it */ | 222 * MN:dunno if thats the right place, for it */ |
221 float quality; | 223 float quality; |
224 int64_t start_time; | 226 int64_t start_time; |
225 /* decoding: duration of the stream, in AV_TIME_BASE fractional | 227 /* decoding: duration of the stream, in AV_TIME_BASE fractional |
226 seconds. */ | 228 seconds. */ |
227 int64_t duration; | 229 int64_t duration; |
228 | 230 |
231 /* the following are used for pts/dts unit conversion */ | |
232 int64_t last_pkt_stream_pts; | |
233 int64_t last_pkt_stream_dts; | |
234 int64_t last_pkt_pts; | |
235 int64_t last_pkt_dts; | |
236 int last_pkt_pts_frac; | |
237 int last_pkt_dts_frac; | |
238 | |
229 /* av_read_frame() support */ | 239 /* av_read_frame() support */ |
230 int need_parsing; | 240 int need_parsing; |
231 struct AVCodecParserContext *parser; | 241 struct AVCodecParserContext *parser; |
232 | 242 |
233 int64_t cur_dts; | 243 int64_t cur_dts; |
266 int track; /* track number, 0 if none */ | 276 int track; /* track number, 0 if none */ |
267 char genre[32]; /* ID3 genre */ | 277 char genre[32]; /* ID3 genre */ |
268 | 278 |
269 int ctx_flags; /* format specific flags, see AVFMTCTX_xx */ | 279 int ctx_flags; /* format specific flags, see AVFMTCTX_xx */ |
270 /* private data for pts handling (do not modify directly) */ | 280 /* private data for pts handling (do not modify directly) */ |
271 int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */ | |
272 int pts_num, pts_den; /* value to convert to seconds */ | |
273 /* This buffer is only needed when packets were already buffered but | 281 /* This buffer is only needed when packets were already buffered but |
274 not decoded, for example to get the codec parameters in mpeg | 282 not decoded, for example to get the codec parameters in mpeg |
275 streams */ | 283 streams */ |
276 struct AVPacketList *packet_buffer; | 284 struct AVPacketList *packet_buffer; |
277 | 285 |
293 /* av_read_frame() support */ | 301 /* av_read_frame() support */ |
294 AVStream *cur_st; | 302 AVStream *cur_st; |
295 const uint8_t *cur_ptr; | 303 const uint8_t *cur_ptr; |
296 int cur_len; | 304 int cur_len; |
297 AVPacket cur_pkt; | 305 AVPacket cur_pkt; |
298 | |
299 /* the following are used for pts/dts unit conversion */ | |
300 int64_t last_pkt_stream_pts; | |
301 int64_t last_pkt_stream_dts; | |
302 int64_t last_pkt_pts; | |
303 int64_t last_pkt_dts; | |
304 int last_pkt_pts_frac; | |
305 int last_pkt_dts_frac; | |
306 | 306 |
307 /* av_seek_frame() support */ | 307 /* av_seek_frame() support */ |
308 int64_t data_offset; /* offset of the first packet */ | 308 int64_t data_offset; /* offset of the first packet */ |
309 int index_built; | 309 int index_built; |
310 } AVFormatContext; | 310 } AVFormatContext; |
551 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp); | 551 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp); |
552 int av_read_play(AVFormatContext *s); | 552 int av_read_play(AVFormatContext *s); |
553 int av_read_pause(AVFormatContext *s); | 553 int av_read_pause(AVFormatContext *s); |
554 void av_close_input_file(AVFormatContext *s); | 554 void av_close_input_file(AVFormatContext *s); |
555 AVStream *av_new_stream(AVFormatContext *s, int id); | 555 AVStream *av_new_stream(AVFormatContext *s, int id); |
556 void av_set_pts_info(AVFormatContext *s, int pts_wrap_bits, | 556 void av_set_pts_info(AVStream *s, int pts_wrap_bits, |
557 int pts_num, int pts_den); | 557 int pts_num, int pts_den); |
558 | 558 |
559 int av_find_default_stream_index(AVFormatContext *s); | 559 int av_find_default_stream_index(AVFormatContext *s); |
560 int av_index_search_timestamp(AVStream *st, int timestamp); | 560 int av_index_search_timestamp(AVStream *st, int timestamp); |
561 int av_add_index_entry(AVStream *st, | 561 int av_add_index_entry(AVStream *st, |