summaryrefslogtreecommitdiffstats
path: root/sub/sub.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-28 21:33:26 +0200
committerwm4 <wm4@nowhere>2012-10-16 07:26:30 +0200
commit2a5fcd2801ccaff48ad360613cef2d0edf80543c (patch)
treed6f8dc1d57e85788067d671b6875f6d62158b0f5 /sub/sub.h
parent3c9c1790fee177cc9c9661475746a92ab6ce9bea (diff)
downloadmpv-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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sub/sub.h b/sub/sub.h
index fc0047bba6..74d2b5a37a 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -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);