summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.h
diff options
context:
space:
mode:
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r--sub/dec_sub.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h
index 6257e74c65..a40aa9bbfd 100644
--- a/sub/dec_sub.h
+++ b/sub/dec_sub.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stdint.h>
+#include "player/core.h"
#include "osd.h"
struct sh_stream;
@@ -16,7 +17,6 @@ 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,
};
@@ -24,6 +24,7 @@ enum sd_ctrl {
enum sd_text_type {
SD_TEXT_TYPE_PLAIN,
SD_TEXT_TYPE_ASS,
+ SD_TEXT_TYPE_ASS_FULL,
};
struct sd_times {
@@ -36,21 +37,25 @@ struct attachment_list {
int num_entries;
};
-struct dec_sub *sub_create(struct mpv_global *global, struct sh_stream *sh,
+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);
-bool sub_read_packets(struct dec_sub *sub, double video_pts);
+void sub_redecode_cached_packets(struct dec_sub *sub);
+void sub_read_packets(struct dec_sub *sub, double video_pts, bool force,
+ bool *packets_read, bool *sub_updated);
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);