diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2019-09-21 20:11:18 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2019-09-22 09:19:45 +0200 |
commit | cb32ad68f31de784a13ca5a2847143c4c37738ce (patch) | |
tree | 9d9d5497c9a58d54ae5ef7cb226e81dd5fb14cb7 /sub/dec_sub.h | |
parent | 0f938b197a79c09b01a9dcf39f02e95d9d7fb4a2 (diff) | |
download | mpv-cb32ad68f31de784a13ca5a2847143c4c37738ce.tar.bz2 mpv-cb32ad68f31de784a13ca5a2847143c4c37738ce.tar.xz |
command: add sub-start & sub-end properties
These properties contain the current subtitle's start and end times.
Can be useful to cut sample audio through the scripting interface.
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r-- | sub/dec_sub.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h index 06d4a6127e..5449b97ad0 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -21,6 +21,11 @@ enum sd_ctrl { SD_CTRL_SET_VIDEO_DEF_FPS, }; +struct sd_times { + double start; + double end; +}; + struct attachment_list { struct demux_attachment *entries; int num_entries; @@ -38,6 +43,7 @@ bool sub_read_packets(struct dec_sub *sub, double video_pts); void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, int format, double pts, struct sub_bitmaps *res); char *sub_get_text(struct dec_sub *sub, double pts); +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); void sub_update_opts(struct dec_sub *sub); |