summaryrefslogtreecommitdiffstats
path: root/core/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-15 20:26:52 +0100
committerwm4 <wm4@nowhere>2012-11-16 21:21:15 +0100
commitb7052b431c92c2babd032885701fb56dfd3ec452 (patch)
treecf4e45be7d61387cf831d28a19306a0cb4cbf194 /core/mp_core.h
parentdd7dc2ee3d060d77dbafb3182127eb1a59c2d79f (diff)
downloadmpv-b7052b431c92c2babd032885701fb56dfd3ec452.tar.bz2
mpv-b7052b431c92c2babd032885701fb56dfd3ec452.tar.xz
command: add sub_reload and sub_remove commands
sub_remove remove an external subtitle track, for whatever this may be needed. sub_reload removes and re-adds an external subtitle track. Also rename sub_load to sub_add, because that seems to be more in line with sub_remove.
Diffstat (limited to 'core/mp_core.h')
-rw-r--r--core/mp_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/mp_core.h b/core/mp_core.h
index 910bfb82a4..6da6365ab6 100644
--- a/core/mp_core.h
+++ b/core/mp_core.h
@@ -100,6 +100,7 @@ struct track {
// If this track is from an external file (e.g. subtitle file).
bool is_external;
+ char *external_filename;
// If the track's stream changes with the timeline (ordered chapters).
bool under_timeline;
@@ -274,7 +275,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask);
void reinit_audio_chain(struct MPContext *mpctx);
void init_vo_spudec(struct MPContext *mpctx);
double playing_audio_pts(struct MPContext *mpctx);
-void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr);
+struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename,
+ float fps, int noerr);
int reinit_video_chain(struct MPContext *mpctx);
void pause_player(struct MPContext *mpctx);
void unpause_player(struct MPContext *mpctx);
@@ -294,6 +296,7 @@ void mp_switch_track(struct MPContext *mpctx, enum stream_type type,
struct track *track);
struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type,
int tid);
+bool mp_remove_track(struct MPContext *mpctx, struct track *track);
// timeline/tl_matroska.c
void build_ordered_chapter_timeline(struct MPContext *mpctx);