summaryrefslogtreecommitdiffstats
path: root/libvo/vesa_lvo.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-03 06:25:41 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:04 +0300
commit2bcfe1e077fe043751d3f7c73c82be761629419f (patch)
treed66207e0fad0af6d50b1d8a047d34570730a3413 /libvo/vesa_lvo.c
parent3bb140d847eb214cf71256794170d72616edbaf4 (diff)
downloadmpv-2bcfe1e077fe043751d3f7c73c82be761629419f.tar.bz2
mpv-2bcfe1e077fe043751d3f7c73c82be761629419f.tar.xz
Add new video driver API
Create new video driver API that has a per-instance context structure and does not rely on keeping status in global or static variables. Existing drivers are not yet converted to this API; instead there is a wrapper which translates calls to them. In the new API, an old API call vo_functions->xyz(args) is generally replaced by vo_xyz(vo_instance, args). The changes to keep the vesa, dxr2 and xover drivers compiling have not been tested.
Diffstat (limited to 'libvo/vesa_lvo.c')
-rw-r--r--libvo/vesa_lvo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c
index cbb4e800dd..fc1573325b 100644
--- a/libvo/vesa_lvo.c
+++ b/libvo/vesa_lvo.c
@@ -43,13 +43,13 @@ static uint8_t *lvo_mem = NULL;
static uint8_t next_frame;
static mga_vid_config_t mga_vid_config;
static unsigned image_bpp,image_height,image_width,src_format;
-uint32_t vlvo_control(uint32_t request, void *data);
+int vlvo_control(uint32_t request, void *data);
#define PIXEL_SIZE() ((video_mode_info.BitsPerPixel+7)/8)
#define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) )
#define IMAGE_LINE_SIZE(pixel_size) (image_width*(pixel_size))
-extern vo_functions_t video_out_vesa;
+extern struct vo_old_functions video_out_vesa;
int vlvo_preinit(const char *drvname)
{
@@ -155,7 +155,7 @@ void vlvo_term( void )
if(lvo_handler != -1) close(lvo_handler);
}
-uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,int y)
+int vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,int y)
{
uint8_t *src;
uint8_t *dest;
@@ -195,7 +195,7 @@ uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,i
return 0;
}
-uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
+int vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
{
if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) {
mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_draw_slice() was called\n");}
@@ -213,7 +213,7 @@ uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y
return 0;
}
-uint32_t vlvo_draw_frame(uint8_t *image[])
+int vlvo_draw_frame(uint8_t *image[])
{
/* Note it's very strange but sometime for YUY2 draw_frame is called */
fast_memcpy(lvo_mem,image[0],mga_vid_config.frame_size);
@@ -303,7 +303,7 @@ uint32_t vlvo_query_info(uint32_t format)
return VFCAP_CSP_SUPPORTED;
}
-uint32_t vlvo_control(uint32_t request, void *data)
+int vlvo_control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT: