Mercurial > libavcodec.hg
diff avcodec.h @ 1696:f5af91b8be17 libavcodec
pts and dts support in parser API
author | bellard |
---|---|
date | Tue, 16 Dec 2003 11:17:06 +0000 |
parents | 04b759af8bd4 |
children | 3ba5c493db6f |
line wrap: on
line diff
--- a/avcodec.h Tue Dec 16 01:17:58 2003 +0000 +++ b/avcodec.h Tue Dec 16 11:17:06 2003 +0000 @@ -17,7 +17,7 @@ #define FFMPEG_VERSION_INT 0x000408 #define FFMPEG_VERSION "0.4.8" -#define LIBAVCODEC_BUILD 4696 +#define LIBAVCODEC_BUILD 4697 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION FFMPEG_VERSION @@ -1932,8 +1932,18 @@ /* video info */ int pict_type; /* XXX: put it back in AVCodecContext */ int repeat_pict; /* XXX: put it back in AVCodecContext */ - int64_t pts; /* in us, if given by the codec (used by raw mpeg4) */ - int64_t dts; /* in us, if given by the codec (used by raw mpeg4) */ + int64_t pts; /* pts of the current frame */ + int64_t dts; /* dts of the current frame */ + + /* private data */ + int64_t last_pts; + int64_t last_dts; + +#define AV_PARSER_PTS_NB 4 + int cur_frame_start_index; + int64_t cur_frame_offset[AV_PARSER_PTS_NB]; + int64_t cur_frame_pts[AV_PARSER_PTS_NB]; + int64_t cur_frame_dts[AV_PARSER_PTS_NB]; } AVCodecParserContext; typedef struct AVCodecParser { @@ -1955,7 +1965,8 @@ int av_parser_parse(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size); + const uint8_t *buf, int buf_size, + int64_t pts, int64_t dts); void av_parser_close(AVCodecParserContext *s); extern AVCodecParser mpegvideo_parser;