diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-04 06:36:36 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:41:04 +0300 |
commit | 8716df2a41f6ff05f59577a0433401ea141226f3 (patch) | |
tree | 491d1c9e1cf862294283335ade557100c2181baf /libvo/old_vo_wrapper.c | |
parent | 2bcfe1e077fe043751d3f7c73c82be761629419f (diff) | |
download | mpv-8716df2a41f6ff05f59577a0433401ea141226f3.tar.bz2 mpv-8716df2a41f6ff05f59577a0433401ea141226f3.tar.xz |
Add context variable to vo_draw_text callback
Add a context variable and rename the function to osd_draw_text. Create
a new vo_draw_text that is a wrapper for VOs using old API.
Diffstat (limited to 'libvo/old_vo_wrapper.c')
-rw-r--r-- | libvo/old_vo_wrapper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvo/old_vo_wrapper.c b/libvo/old_vo_wrapper.c index b52622321a..d4af6fcc10 100644 --- a/libvo/old_vo_wrapper.c +++ b/libvo/old_vo_wrapper.c @@ -20,6 +20,7 @@ #include <stdint.h> #include "old_vo_wrapper.h" #include "video_out.h" +#include "sub.h" int old_vo_preinit(struct vo *vo, const char *arg) { @@ -78,3 +79,18 @@ void old_vo_uninit(struct vo *vo) vo->driver->old_functions->uninit(); } + +static void draw_alpha_wrapper(void *ctx, int x0, int y0, int w, int h, + unsigned char *src, unsigned char *srca, + int stride) +{ + void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) = ctx; + draw_alpha(x0, y0, w, h, src, srca, stride); +} + + +void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)) +{ + osd_draw_text(dxs, dys, draw_alpha_wrapper, draw_alpha); +} + |