summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-10-23 04:51:44 +0200
committerUoti Urpala <uau@mplayer2.org>2011-10-25 22:09:33 +0300
commite3f5043233336d8b4b0731c6a8b42a8fda5535ac (patch)
tree2a1c05f2b117da2276f57ddf8b0409504c536689 /mp_core.h
parentc0b7851f23b561aa708a78f00961652603a18013 (diff)
downloadmpv-e3f5043233336d8b4b0731c6a8b42a8fda5535ac.tar.bz2
mpv-e3f5043233336d8b4b0731c6a8b42a8fda5535ac.tar.xz
core, demux: fix --identify chapter output with ordered chapters
Information about individual chapters was printed during demuxer opening phase, and total chapter count (ID_CHAPTERS) was printed according to mpctx->demuxer->num_chapters. When playing a file with ordered chapters, this meant that chapter information about every source file was printed individually (even though only the chapters from the first file would be used for playback) and the total chapter count could be wrong. Remove the printing of chapter information from the demuxer layer and print the chapter information and count actually used for playback in core print_file_properties(). Also somewhat simplify the internal chapters API and remove possible inconsistencies.
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/mp_core.h b/mp_core.h
index d965e6dc2a..e467ce9c08 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -242,13 +242,15 @@ void unpause_player(struct MPContext *mpctx);
void add_step_frame(struct MPContext *mpctx);
void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
int exact);
-int seek_chapter(struct MPContext *mpctx, int chapter, double *seek_pts,
- char **chapter_name);
+int seek_chapter(struct MPContext *mpctx, int chapter, double *seek_pts);
double get_time_length(struct MPContext *mpctx);
double get_current_time(struct MPContext *mpctx);
int get_percent_pos(struct MPContext *mpctx);
int get_current_chapter(struct MPContext *mpctx);
char *chapter_display_name(struct MPContext *mpctx, int chapter);
+char *chapter_name(struct MPContext *mpctx, int chapter);
+double chapter_start_time(struct MPContext *mpctx, int chapter);
+int get_chapter_count(struct MPContext *mpctx);
void update_subtitles(struct MPContext *mpctx, double refpts,
double sub_offset, bool reset);