summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-14 22:14:49 +0200
committerwm4 <wm4@nowhere>2020-05-14 22:14:49 +0200
commitc6369933f1d9cd204b09be95ef7d4ed1351610e2 (patch)
treed7b45307780aef2dafde89795f49d564c7aed313 /sub/dec_sub.h
parent0049ea38be72884fabeee3ce52e2d6796c3abd53 (diff)
downloadmpv-c6369933f1d9cd204b09be95ef7d4ed1351610e2.tar.bz2
mpv-c6369933f1d9cd204b09be95ef7d4ed1351610e2.tar.xz
command: add property to return text subtitles in ASS
See manpage additions. This was requested, sort of. Although what has been requested might be something completely different. So this is speculative. This also changes sub_get_text() to return an allocated copy, because the buffer shit was too damn messy.
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r--sub/dec_sub.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h
index 8d0c76cd14..f998b59f6b 100644
--- a/sub/dec_sub.h
+++ b/sub/dec_sub.h
@@ -22,6 +22,11 @@ enum sd_ctrl {
SD_CTRL_UPDATE_OPTS,
};
+enum sd_text_type {
+ SD_TEXT_TYPE_PLAIN,
+ SD_TEXT_TYPE_ASS,
+};
+
struct sd_times {
double start;
double end;
@@ -41,7 +46,7 @@ void sub_preload(struct dec_sub *sub);
bool sub_read_packets(struct dec_sub *sub, double video_pts);
struct sub_bitmaps *sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim,
int format, double pts);
-char *sub_get_text(struct dec_sub *sub, double pts);
+char *sub_get_text(struct dec_sub *sub, double pts, enum sd_text_type type);
struct sd_times sub_get_times(struct dec_sub *sub, double pts);
void sub_reset(struct dec_sub *sub);
void sub_select(struct dec_sub *sub, bool selected);