summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-26 20:42:15 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-26 20:42:15 +0200
commitf50f34245efa1012855a693558680bcfb7c348e5 (patch)
tree76e8fc186a96fdc1106b5c634d5937e514a06037 /mp_core.h
parentec55a188e4d0232acd50fcabc0a3db3be2b9538e (diff)
parentc9026cb3210205b07e2e068467a18ee40f9259a3 (diff)
downloadmpv-f50f34245efa1012855a693558680bcfb7c348e5.tar.bz2
mpv-f50f34245efa1012855a693558680bcfb7c348e5.tar.xz
Merge branch 'sub'
* sub: sub/OSD: move some related files to sub/ subtitles: options: enable -ass by default subtitles: change default libass rendering style demux_mkv, chapters: change millisecond arithmetic to ns cleanup: rename ass_* functions to mp_ass_* subs: use correct font aspect ratio for libass + converted subs cleanup: some random minor code simplification and cleanup vf_vo: fix EOSD change detection bug sd_ass: remove subreader use, support plaintext markup subtitles: style support for common SubRip tags and MicroDVD core: ordered chapters: fix bad subtitle parameter subs/demux: don't try to enable sub track when creating it subtitles/demux: store duration instead of endpts in demux packets subtitles: add framework for subtitle decoders options: add special -leak-report option subtitles: remove code trying to handle text subs with libavcodec cleanup: move MP_NOPTS_VALUE definition to mpcommon.h subtitles: move global ass_track to struct osd_state core: move most mpcommon.c contents to mplayer.c core: move global "subdata" and "vo_sub_last" to mpctx subtitles: remove sub_last_pts hack options: move -noconfig to option struct, simplify
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mp_core.h b/mp_core.h
index 00b8fa91ef..825718f161 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -23,7 +23,7 @@
#include "options.h"
#include "mixer.h"
-#include "subreader.h"
+#include "sub/subreader.h"
// definitions used internally by the core player code
@@ -37,6 +37,7 @@
#define INITIALIZED_DEMUXER 512
#define INITIALIZED_ACODEC 1024
#define INITIALIZED_VCODEC 2048
+#define INITIALIZED_SUB 4096
#define INITIALIZED_ALL 0xFFFF
@@ -88,6 +89,9 @@ typedef struct MPContext {
struct mp_fifo *key_fifo;
struct input_ctx *input;
struct osd_state *osd;
+ struct sub_data *subdata; // current sub_data style subtitles if any
+ // last sub_data style sub line if any, used by log_sub() only
+ struct subtitle *vo_sub_last;
bool add_osd_seek_info;
// if nonzero, hide current OSD contents when GetTimerMS() reaches this
@@ -194,6 +198,7 @@ typedef struct MPContext {
// parsed by libass or NULL if format unsupported
struct ass_track *set_of_ass_tracks[MAX_SUBTITLE_FILES];
sub_data* set_of_subtitles[MAX_SUBTITLE_FILES];
+ bool track_was_native_ass[MAX_SUBTITLE_FILES];
int file_format;
@@ -243,5 +248,7 @@ 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);
+void update_subtitles(struct MPContext *mpctx, double refpts,
+ double sub_offset, bool reset);
#endif /* MPLAYER_MP_CORE_H */