diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2003-12-16 11:17:06 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2003-12-16 11:17:06 +0000 |
commit | b84f2a35337abed36867d3c6f67c1763fe65db01 (patch) | |
tree | 8c8c4f9896cf7ad21fc7ade94ca277434bd8a5d6 /libavcodec/avcodec.h | |
parent | ac3d5cac7b6cbabf63bdbc588d9723d0f02b5c8d (diff) | |
download | ffmpeg-b84f2a35337abed36867d3c6f67c1763fe65db01.tar.gz |
pts and dts support in parser API
Originally committed as revision 2619 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index de4c3f03d8..39a71662fb 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -17,7 +17,7 @@ extern "C" { #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 @@ typedef struct AVCodecParserContext { /* 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 @@ AVCodecParserContext *av_parser_init(int codec_id); 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; |