Mercurial > libavformat.hg
diff avformat.h @ 346:e154eb1b7149 libavformat
caching of timestamps for mpeg-ps so seeking is faster
move (av_)find_stream_index() to utils.c as its usefull outside mpeg.c
assert checking enabled, to find bugs quicker, should obviously be disabled later
(av_)add_index_entry() inserts new entries so that the list stays ordered and updates entries if already in it
(av_)index_search_timestamp() cleanup (kill ugly goto) and shorter
author | michael |
---|---|
date | Tue, 13 Jan 2004 22:02:49 +0000 |
parents | 6f50cb0ead51 |
children | 6770ca07abe2 |
line wrap: on
line diff
--- a/avformat.h Mon Jan 12 22:14:45 2004 +0000 +++ b/avformat.h Tue Jan 13 22:02:49 2004 +0000 @@ -195,6 +195,9 @@ int64_t pos; int64_t timestamp; #define AVINDEX_KEYFRAME 0x0001 +/* the following 2 flags indicate that the next/prev keyframe is known, and scaning for it isnt needed */ +#define AVINDEX_NEXT_KNOWN 0x0002 +#define AVINDEX_PREV_KNOWN 0x0004 int flags; } AVIndexEntry; @@ -544,6 +547,11 @@ void av_set_pts_info(AVFormatContext *s, int pts_wrap_bits, int pts_num, int pts_den); +int av_find_default_stream_index(AVFormatContext *s); +int av_index_search_timestamp(AVStream *st, int timestamp); +void av_add_index_entry(AVStream *st, + int64_t pos, int64_t timestamp, int flags); + /* media file output */ int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); int av_write_header(AVFormatContext *s);