comparison avformat.h @ 555:0a997108f384 libavformat

use native timebase for seeking direction flag for seeking
author michael
date Sun, 10 Oct 2004 22:05:43 +0000
parents e1f17fcfb92c
children 89bd76208427
comparison
equal deleted inserted replaced
554:e1f17fcfb92c 555:0a997108f384
3 3
4 #ifdef __cplusplus 4 #ifdef __cplusplus
5 extern "C" { 5 extern "C" {
6 #endif 6 #endif
7 7
8 #define LIBAVFORMAT_BUILD 4618 8 #define LIBAVFORMAT_BUILD 4619
9 9
10 #define LIBAVFORMAT_VERSION_INT FFMPEG_VERSION_INT 10 #define LIBAVFORMAT_VERSION_INT FFMPEG_VERSION_INT
11 #define LIBAVFORMAT_VERSION FFMPEG_VERSION 11 #define LIBAVFORMAT_VERSION FFMPEG_VERSION
12 #define LIBAVFORMAT_IDENT "FFmpeg" FFMPEG_VERSION "b" AV_STRINGIFY(LIBAVFORMAT_BUILD) 12 #define LIBAVFORMAT_IDENT "FFmpeg" FFMPEG_VERSION "b" AV_STRINGIFY(LIBAVFORMAT_BUILD)
13 13
163 AVFMTCTX_NOHEADER is used. */ 163 AVFMTCTX_NOHEADER is used. */
164 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt); 164 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
165 /* close the stream. The AVFormatContext and AVStreams are not 165 /* close the stream. The AVFormatContext and AVStreams are not
166 freed by this function */ 166 freed by this function */
167 int (*read_close)(struct AVFormatContext *); 167 int (*read_close)(struct AVFormatContext *);
168 /* seek at or before a given timestamp (given in AV_TIME_BASE 168 /**
169 units) relative to the frames in stream component stream_index */ 169 * seek to a given timestamp relative to the frames in
170 * stream component stream_index
171 * @param stream_index must not be -1
172 * @param flags selects which direction should be preferred if no exact
173 * match is available
174 */
170 int (*read_seek)(struct AVFormatContext *, 175 int (*read_seek)(struct AVFormatContext *,
171 int stream_index, int64_t timestamp); 176 int stream_index, int64_t timestamp, int flags);
172 /** 177 /**
173 * gets the next timestamp in AV_TIME_BASE units. 178 * gets the next timestamp in AV_TIME_BASE units.
174 */ 179 */
175 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, 180 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
176 int64_t *pos, int64_t pos_limit); 181 int64_t *pos, int64_t pos_limit);
551 #define AVERROR_NOTSUPP (-7) /* operation not supported */ 556 #define AVERROR_NOTSUPP (-7) /* operation not supported */
552 557
553 int av_find_stream_info(AVFormatContext *ic); 558 int av_find_stream_info(AVFormatContext *ic);
554 int av_read_packet(AVFormatContext *s, AVPacket *pkt); 559 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
555 int av_read_frame(AVFormatContext *s, AVPacket *pkt); 560 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
556 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp); 561 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
557 int av_read_play(AVFormatContext *s); 562 int av_read_play(AVFormatContext *s);
558 int av_read_pause(AVFormatContext *s); 563 int av_read_pause(AVFormatContext *s);
559 void av_close_input_file(AVFormatContext *s); 564 void av_close_input_file(AVFormatContext *s);
560 AVStream *av_new_stream(AVFormatContext *s, int id); 565 AVStream *av_new_stream(AVFormatContext *s, int id);
561 void av_set_pts_info(AVStream *s, int pts_wrap_bits, 566 void av_set_pts_info(AVStream *s, int pts_wrap_bits,
562 int pts_num, int pts_den); 567 int pts_num, int pts_den);
563 568
569 #define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
570 #define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes
571
564 int av_find_default_stream_index(AVFormatContext *s); 572 int av_find_default_stream_index(AVFormatContext *s);
565 int av_index_search_timestamp(AVStream *st, int timestamp); 573 int av_index_search_timestamp(AVStream *st, int timestamp, int flags);
566 int av_add_index_entry(AVStream *st, 574 int av_add_index_entry(AVStream *st,
567 int64_t pos, int64_t timestamp, int distance, int flags); 575 int64_t pos, int64_t timestamp, int distance, int flags);
568 int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts); 576 int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags);
569 577
570 /* media file output */ 578 /* media file output */
571 int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); 579 int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
572 int av_write_header(AVFormatContext *s); 580 int av_write_header(AVFormatContext *s);
573 int av_write_frame(AVFormatContext *s, AVPacket *pkt); 581 int av_write_frame(AVFormatContext *s, AVPacket *pkt);