# HG changeset patch # User nick # Date 1012118756 0 # Node ID 9b6430df4de5aeb34fc2a3420f6364baf0ce7d10 # Parent 2330366f9255219216e9c0d28db672a260473139 improvements diff -r 2330366f9255 -r 9b6430df4de5 libvo/vesa_lvo.c --- a/libvo/vesa_lvo.c Sun Jan 27 02:48:39 2002 +0000 +++ b/libvo/vesa_lvo.c Sun Jan 27 08:05:56 2002 +0000 @@ -61,6 +61,7 @@ video_out_vesa.draw_frame=vlvo_draw_frame; video_out_vesa.flip_page=vlvo_flip_page; video_out_vesa.draw_osd=vlvo_draw_osd; + video_out_vesa.query_format=vlvo_query_info; return 0; } diff -r 2330366f9255 -r 9b6430df4de5 libvo/vosub_vidix.c --- a/libvo/vosub_vidix.c Sun Jan 27 02:48:39 2002 +0000 +++ b/libvo/vosub_vidix.c Sun Jan 27 08:05:56 2002 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include #include "config.h" @@ -37,11 +38,20 @@ static uint8_t next_frame; static unsigned image_bpp,image_height,image_width,src_format; extern int verbose; +static int video_on=0; static vidix_capability_t vidix_cap; static vidix_playback_t vidix_play; static vidix_fourcc_t vidix_fourcc; +static int vidix_get_bes_da(bes_da_t *); + +static void vidix_query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); + vaa->query_bes_da=vidix_get_bes_da; +} + int vidix_preinit(const char *drvname,void *server) { int err; @@ -72,6 +82,7 @@ ((vo_functions_t *)server)->flip_page=vidix_flip_page; ((vo_functions_t *)server)->draw_osd=vidix_draw_osd; ((vo_functions_t *)server)->query_format=vidix_query_fourcc; + ((vo_functions_t *)server)->query_vaa=vidix_query_vaa; return 0; } @@ -215,6 +226,7 @@ vdlPlaybackSetEq(vidix_handler,&vid_eq); } } + video_on=1; return 0; } @@ -226,6 +238,7 @@ printf("vosub_vidix: Can't stop playback: %s\n",strerror(err)); return -1; } + video_on=0; return 0; } @@ -398,8 +411,7 @@ if(verbose > 1) printf("vosub_vidix: query_format was called: %x (%s)\n",format,vo_format_name(format)); vidix_fourcc.fourcc = format; vdlQueryFourcc(vidix_handler,&vidix_fourcc); - if (vidix_fourcc.depth == VID_DEPTH_NONE) - return(0); + if (vidix_fourcc.depth == VID_DEPTH_NONE) return(0); return(0x2); /* hw support without conversion */ } @@ -417,3 +429,22 @@ { return(vdlSetGrKeys(vidix_handler, gr_key)); } + +static int vidix_get_bes_da(bes_da_t *info) +{ + if(!video_on) return EPERM; + info->dest.x = vidix_play.src.x; + info->dest.y = vidix_play.src.y; + info->dest.w = vidix_play.src.w; + info->dest.h = vidix_play.src.h; + info->dest.pitch.y = vidix_play.dest.pitch.y; + info->dest.pitch.u = vidix_play.dest.pitch.u; + info->dest.pitch.v = vidix_play.dest.pitch.v; + info->flags = vidix_play.flags; + info->frame_size = vidix_play.frame_size; + info->num_frames = vidix_play.num_frames; + memcpy(info->offsets,vidix_play.offsets,sizeof(unsigned)*vidix_play.num_frames); + memcpy(&info->offset,&vidix_play.offset,sizeof(vidix_yuv_t)); + info->dga_addr = vidix_play.dga_addr; + return 0; +}