diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-08-04 08:38:39 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-08-04 08:38:39 +0300 |
commit | 0ece360eeaf95f2c33df2c0177cb98ffd5fc0338 (patch) | |
tree | 3717c71405b255342f75008b8d357f421f9f24f0 /libmpdemux/demuxer.h | |
parent | 1f3ad329601486e2e2e36ddef4d79f0f486ddc99 (diff) | |
download | mpv-0ece360eeaf95f2c33df2c0177cb98ffd5fc0338.tar.bz2 mpv-0ece360eeaf95f2c33df2c0177cb98ffd5fc0338.tar.xz |
demux_mkv: skip files faster in ordered chapter file search
Ordered chapter code tries opening files to find those matching the
SegmentUID values specified in the timeline. Previously this scan did
a full initialization of the Matroska demuxer for each file, then
checked whether the UID value in the demuxer was a match. Make the
scan code instead provide a list of searched-for UIDs to the demuxer
open code, and make that do a comparison against the list as soon as
it sees the UID in the file, aborting if there is no match.
Also fix units used in "Merging timeline part" verbose message.
Diffstat (limited to 'libmpdemux/demuxer.h')
-rw-r--r-- | libmpdemux/demuxer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index ee664d83e2..b3fef45ed7 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -239,6 +239,10 @@ typedef struct demux_attachment unsigned int data_size; } demux_attachment_t; +struct demuxer_params { + unsigned char (*matroska_wanted_uids)[16]; +}; + typedef struct demuxer { const demuxer_desc_t *desc; ///< Demuxer description structure const char *filetype; // format name when not identified by demuxer (libavformat) @@ -289,6 +293,7 @@ typedef struct demuxer { void *priv; // demuxer-specific internal data char **info; // metadata struct MPOpts *opts; + struct demuxer_params *params; } demuxer_t; typedef struct { @@ -370,6 +375,11 @@ static inline int avi_stream_id(unsigned int id) struct demuxer *demux_open(struct MPOpts *opts, struct stream *stream, int file_format, int aid, int vid, int sid, char *filename); + +struct demuxer *demux_open_withparams(struct MPOpts *opts, + struct stream *stream, int file_format, int aid, int vid, int sid, + char *filename, struct demuxer_params *params); + void demux_flush(struct demuxer *demuxer); int demux_seek(struct demuxer *demuxer, float rel_seek_secs, float audio_delay, int flags); |