diff options
Diffstat (limited to 'sub/sub.h')
-rw-r--r-- | sub/sub.h | 26 |
1 files changed, 10 insertions, 16 deletions
@@ -72,14 +72,11 @@ struct sub_bitmaps { struct sub_bitmap *parts; int num_parts; - // Provided for VOs with old code - struct ass_image *imgs; - // Incremented on each change int bitmap_id, bitmap_pos_id; }; -struct mp_eosd_res { +struct mp_osd_res { int w, h; // screen dimensions, including black borders int mt, mb, ml, mr; // borders (top, bottom, left, right) double display_par; @@ -111,6 +108,7 @@ struct osd_object { // VO cache state int vo_bitmap_id; int vo_bitmap_pos_id; + struct mp_osd_res vo_res; // Internally used by osd_libass.c struct ass_track *osd_track; @@ -124,12 +122,10 @@ struct osd_state { struct ass_renderer *ass_renderer; struct sh_sub *sh_sub; double sub_offset; - double vo_sub_pts; + double vo_pts; bool render_subs_in_filter; - struct mp_eosd_res res; - char *osd_text; // OSDTYPE_OSD int progbar_type, progbar_value; // OSDTYPE_PROGBAR @@ -204,14 +200,11 @@ extern float sub_fps; extern int sub_justify; -void draw_osd_with_eosd(struct vo *vo, struct osd_state *osd); - struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib); void osd_set_text(struct osd_state *osd, const char *text); -void osd_update(struct osd_state *osd, int dxs, int dys); void vo_osd_changed(int new_value); -void vo_osd_reset_changed(void); -bool vo_osd_has_changed(struct osd_state *osd); +void osd_reset_changed(struct osd_state *osd); +bool osd_has_changed(struct osd_state *osd); void osd_free(struct osd_state *osd); enum mp_osd_draw_flags { @@ -219,14 +212,15 @@ enum mp_osd_draw_flags { OSD_DRAW_SUB_ONLY = (1 << 1), }; -void osd_draw(struct osd_state *osd, struct sub_render_params *params, - int draw_flags, const bool formats[SUBBITMAP_COUNT], +void osd_draw(struct osd_state *osd, struct mp_osd_res res, + double video_pts, int draw_flags, + const bool formats[SUBBITMAP_COUNT], void (*cb)(void *ctx, struct sub_bitmaps *imgs), void *cb_ctx); struct mp_image; struct mp_csp_details; -bool osd_draw_on_image(struct osd_state *osd, struct sub_render_params *params, - int draw_flags, struct mp_image *dest, +bool osd_draw_on_image(struct osd_state *osd, struct mp_osd_res res, + double video_pts, int draw_flags, struct mp_image *dest, struct mp_csp_details *dest_csp); bool sub_bitmaps_bb(struct sub_bitmaps *imgs, int *x1, int *y1, |