From e5c094754157102a964364041d6fb0caf2188809 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 29 Jun 2013 01:34:11 +0200 Subject: dec_sub: introduce sub_control(), use it for sub_step This means the direct libass usage can be removed from command.c, and no weird hacks for retrieving the ASS_Track are needed. Also fix a bug when using this feature with ordered chapters. --- sub/dec_sub.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sub/dec_sub.h') diff --git a/sub/dec_sub.h b/sub/dec_sub.h index c285449f94..3fb35deace 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -16,6 +16,10 @@ struct ass_renderer; struct dec_sub; struct sd; +enum sd_ctrl { + SD_CTRL_SUB_STEP, +}; + struct dec_sub *sub_create(struct MPOpts *opts); void sub_destroy(struct dec_sub *sub); @@ -37,10 +41,6 @@ bool sub_has_get_text(struct dec_sub *sub); char *sub_get_text(struct dec_sub *sub, double pts); void sub_reset(struct dec_sub *sub); -struct sd *sub_get_last_sd(struct dec_sub *sub); - -#ifdef CONFIG_ASS -struct ass_track *sub_get_ass_track(struct dec_sub *sub); -#endif +int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg); #endif -- cgit v1.2.3