From 3720b3f17d4951ab839418b5cbfd1a85eb74adba Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 24 Dec 2013 17:46:14 +0100 Subject: player: add --secondary-sid for displaying a second subtitle stream This is relatively hacky, but it's Christmas, so it's ok. This does two things: 1. allow selecting two subtitle tracks, and 2. include a hack that renders the second subtitle always as toptitle. See manpage additions how to use this. --- player/core.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index cad18a6b36..c016dcf4f7 100644 --- a/player/core.h +++ b/player/core.h @@ -35,6 +35,7 @@ #define INITIALIZED_ACODEC 1024 #define INITIALIZED_VCODEC 2048 #define INITIALIZED_SUB 4096 +#define INITIALIZED_SUB2 8192 #define INITIALIZED_ALL 0xFFFF @@ -208,7 +209,7 @@ typedef struct MPContext { struct dec_video *d_video; struct dec_audio *d_audio; - struct dec_sub *d_sub; + struct dec_sub *d_sub[2]; // Uses: accessing metadata (consider ordered chapters case, where the main // demuxer defines metadata), or special purpose demuxers like TV. @@ -439,9 +440,9 @@ void handle_force_window(struct MPContext *mpctx, bool reconfig); void add_frame_pts(struct MPContext *mpctx, double pts); // sub.c -void reset_subtitles(struct MPContext *mpctx); +void reset_subtitles(struct MPContext *mpctx, int order); void uninit_subs(struct demuxer *demuxer); -void reinit_subs(struct MPContext *mpctx); +void reinit_subs(struct MPContext *mpctx, int order); void update_osd_msg(struct MPContext *mpctx); void update_subtitles(struct MPContext *mpctx); -- cgit v1.2.3