From 51de1d8436100f725f3576aefa24a2bd2057bc28 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:36:56 +0200 Subject: Adding upstream version 0.37.0. Signed-off-by: Daniel Baumann --- sub/dec_sub.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sub/dec_sub.h (limited to 'sub/dec_sub.h') diff --git a/sub/dec_sub.h b/sub/dec_sub.h new file mode 100644 index 0000000..9de6760 --- /dev/null +++ b/sub/dec_sub.h @@ -0,0 +1,62 @@ +#ifndef MPLAYER_DEC_SUB_H +#define MPLAYER_DEC_SUB_H + +#include +#include + +#include "player/core.h" +#include "osd.h" + +struct sh_stream; +struct mpv_global; +struct demux_packet; +struct mp_recorder_sink; +struct dec_sub; +struct sd; + +enum sd_ctrl { + SD_CTRL_SUB_STEP, + SD_CTRL_SET_VIDEO_PARAMS, + SD_CTRL_SET_TOP, + SD_CTRL_SET_VIDEO_DEF_FPS, + SD_CTRL_UPDATE_OPTS, +}; + +enum sd_text_type { + SD_TEXT_TYPE_PLAIN, + SD_TEXT_TYPE_ASS, +}; + +struct sd_times { + double start; + double end; +}; + +struct attachment_list { + struct demux_attachment *entries; + int num_entries; +}; + +struct dec_sub *sub_create(struct mpv_global *global, struct track *track, + struct attachment_list *attachments, int order); +void sub_destroy(struct dec_sub *sub); + +bool sub_can_preload(struct dec_sub *sub); +void sub_preload(struct dec_sub *sub); +void sub_redecode_cached_packets(struct dec_sub *sub); +bool sub_read_packets(struct dec_sub *sub, double video_pts, bool force); +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, enum sd_text_type type); +char *sub_ass_get_extradata(struct dec_sub *sub); +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_set_recorder_sink(struct dec_sub *sub, struct mp_recorder_sink *sink); +void sub_set_play_dir(struct dec_sub *sub, int dir); +bool sub_is_primary_visible(struct dec_sub *sub); +bool sub_is_secondary_visible(struct dec_sub *sub); + +int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg); + +#endif -- cgit v1.2.3