diff options
author | wm4 <wm4@nowhere> | 2012-09-28 21:33:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-16 07:26:30 +0200 |
commit | 2a5fcd2801ccaff48ad360613cef2d0edf80543c (patch) | |
tree | d6f8dc1d57e85788067d671b6875f6d62158b0f5 /sub/sub.h | |
parent | 3c9c1790fee177cc9c9661475746a92ab6ce9bea (diff) | |
download | mpv-2a5fcd2801ccaff48ad360613cef2d0edf80543c.tar.bz2 mpv-2a5fcd2801ccaff48ad360613cef2d0edf80543c.tar.xz |
sub: add preliminary emulation layer to draw OSD with EOSD
This basically pushes the old OSD bitmaps via VOCTRL_DRAW_EOSD to the
VO, instead of using the old callback-based interface.
Future commits will change the code such that sub.c pushes images
rendered by libass directly, rather than converting them to the old
OSD format first.
Diffstat (limited to 'sub/sub.h')
-rw-r--r-- | sub/sub.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -24,10 +24,13 @@ #include "subreader.h" #include "dec_sub.h" +struct vo; + typedef struct mp_osd_bbox_s { int x1,y1,x2,y2; } mp_osd_bbox_t; +#define OSDTYPE_ASS 0 #define OSDTYPE_OSD 1 #define OSDTYPE_SUBTITLE 2 #define OSDTYPE_PROGBAR 3 @@ -78,6 +81,10 @@ struct osd_state { char *osd_text; int w, h; + struct sub_bitmaps eosd[MAX_OSD_PARTS]; + + void *scratch; + struct MPOpts *opts; }; @@ -153,6 +160,8 @@ void osd_draw_text_ext(struct osd_state *osd, int dxs, int dys, int stride), void *ctx); +void emulate_draw_osd(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); int osd_update(struct osd_state *osd, int dxs, int dys); |