diff options
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r-- | sub/dec_sub.h | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h index 0c4d59f395..b3f30520e3 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -3,16 +3,13 @@ #include <stdbool.h> #include <stdint.h> -#include <pthread.h> #include "osd.h" +struct demuxer; struct sh_stream; -struct ass_track; struct mpv_global; struct demux_packet; -struct ass_library; -struct ass_renderer; struct dec_sub; struct sd; @@ -22,31 +19,22 @@ enum sd_ctrl { SD_CTRL_SET_VIDEO_PARAMS, SD_CTRL_GET_RESOLUTION, SD_CTRL_SET_TOP, + SD_CTRL_SET_VIDEO_DEF_FPS, }; -struct dec_sub *sub_create(struct mpv_global *global); +struct dec_sub *sub_create(struct mpv_global *global, struct demuxer *demuxer, + struct sh_stream *sh); void sub_destroy(struct dec_sub *sub); void sub_lock(struct dec_sub *sub); void sub_unlock(struct dec_sub *sub); -void sub_set_video_res(struct dec_sub *sub, int w, int h); -void sub_set_video_fps(struct dec_sub *sub, double fps); -void sub_set_extradata(struct dec_sub *sub, void *data, int data_len); -void sub_set_ass_renderer(struct dec_sub *sub, struct ass_library *ass_library, - struct ass_renderer *ass_renderer, - pthread_mutex_t *ass_lock); -void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh); - -bool sub_is_initialized(struct dec_sub *sub); - -bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh); -bool sub_accepts_packet_in_advance(struct dec_sub *sub); -void sub_decode(struct dec_sub *sub, struct demux_packet *packet); +bool sub_read_all_packets(struct dec_sub *sub); +bool sub_read_packets(struct dec_sub *sub, double video_pts); void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts, struct sub_bitmaps *res); -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); +void sub_select(struct dec_sub *sub, bool selected); int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg); |