diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-01-13 22:02:49 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-01-13 22:02:49 +0000 |
commit | b754978a3b0aa17e7794f64c69bf4491762797fd (patch) | |
tree | 6ce15dcec2032989161883a4b08aab74777b7e92 /libavformat/avformat.h | |
parent | 6245598582f74240360113f1d58945c6093b7060 (diff) | |
download | ffmpeg-b754978a3b0aa17e7794f64c69bf4491762797fd.tar.gz |
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
Originally committed as revision 2697 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 64bea9c1cd..b098247ab3 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -195,6 +195,9 @@ typedef struct AVIndexEntry { 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 @@ AVStream *av_new_stream(AVFormatContext *s, int id); 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); |