video: remove lowres support, cut "too slow" message
[mplayer.git] / libvo / old_vo_wrapper.c
blobb3053eb57f44feb2abd855b37c9cdae120745982
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include <stdint.h>
21 #include "old_vo_wrapper.h"
22 #include "video_out.h"
23 #include "sub/sub.h"
25 struct vo *global_vo;
26 struct osd_state *global_osd;
28 int old_vo_preinit(struct vo *vo, const char *arg)
30 global_vo = vo;
31 return vo->driver->old_functions->preinit(arg);
35 int old_vo_config(struct vo *vo, uint32_t width, uint32_t height,
36 uint32_t d_width, uint32_t d_height,
37 uint32_t flags, uint32_t format)
39 return vo->driver->old_functions->config(width, height, d_width,
40 d_height, flags, "MPlayer",
41 format);
45 int old_vo_control(struct vo *vo, uint32_t request, void *data)
47 return vo->driver->old_functions->control(request, data);
51 int old_vo_draw_frame(struct vo *vo, uint8_t *src[])
53 return vo->driver->old_functions->draw_frame(src);
57 int old_vo_draw_slice(struct vo *vo, uint8_t *src[], int stride[],
58 int w, int h, int x, int y)
60 return vo->driver->old_functions->draw_slice(src, stride, w, h, x, y);
64 void old_vo_draw_osd(struct vo *vo, struct osd_state *osd)
66 global_osd = osd;
67 vo->driver->old_functions->draw_osd();
71 void old_vo_flip_page(struct vo *vo)
73 vo->driver->old_functions->flip_page();
77 void old_vo_check_events(struct vo *vo)
79 vo->driver->old_functions->check_events();
83 void old_vo_uninit(struct vo *vo)
85 vo->driver->old_functions->uninit();
89 static void draw_alpha_wrapper(void *ctx, int x0, int y0, int w, int h,
90 unsigned char *src, unsigned char *srca,
91 int stride)
93 void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) = ctx;
94 draw_alpha(x0, y0, w, h, src, srca, stride);
98 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))
100 osd_draw_text(global_osd, dxs, dys, draw_alpha_wrapper, draw_alpha);
103 void vo_draw_text_ext(int dxs, int dys, int left_border, int top_border,
104 int right_border, int bottom_border, int orig_w, int orig_h,
105 void (*draw_alpha)(int x0, int y0, int w,int h,
106 unsigned char* src,
107 unsigned char *srca, int stride))
109 osd_draw_text_ext(global_osd, dxs, dys, left_border, top_border,
110 right_border, bottom_border, orig_w, orig_h,
111 draw_alpha_wrapper, draw_alpha);
114 int vo_update_osd(int dxs, int dys)
116 return osd_update(global_osd, dxs, dys);