CVS: main/libvo Makefile,1.24,1.25 vo_vesa.c,1.52,1.53
Update of /cvsroot/mplayer/main/libvo In directory mplayer:/var/tmp.root/cvs-serv5737/main/libvo Modified Files: Makefile vo_vesa.c Log Message: Embedding vidix Index: Makefile =================================================================== RCS file: /cvsroot/mplayer/main/libvo/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Makefile 28 Nov 2001 17:52:25 -0000 1.24 +++ Makefile 7 Jan 2002 09:28:22 -0000 1.25 @@ -3,10 +3,10 @@ LIBNAME = libvo.a -SRCS=aspect.c aclib.c osd.c font_load.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c x11_common.c $(OPTIONAL_SRCS) img_format.c +SRCS=aspect.c aclib.c osd.c font_load.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c x11_common.c $(OPTIONAL_SRCS) img_format.c vosub_vidix.c OBJS=$(SRCS:.c=.o) -CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DVB_INC) -DMPG12PLAY #-Wall +CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DVB_INC) -DMPG12PLAY -DVIDIX_PATH='"$(prefix)/lib/mplayer/vidix/"' #-Wall # -I/usr/X11R6/include/ .SUFFIXES: .c .o Index: vo_vesa.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- vo_vesa.c 6 Jan 2002 10:58:04 -0000 1.52 +++ vo_vesa.c 7 Jan 2002 09:28:22 -0000 1.53 @@ -35,6 +35,7 @@ #include "bswap.h" #include "aspect.h" #include "vesa_lvo.h" +#include "vosub_vidix.h" #include "../postproc/swscale.h" #include "../postproc/rgb2rgb.h" @@ -99,6 +100,7 @@ /* Linux Video Overlay */ static const char *lvo_name = NULL; +static const char *vidix_name = NULL; static int pre_init_err = 0; #define HAS_DGA() (win.idx == -1) @@ -133,6 +135,7 @@ { int err; if(lvo_name) vlvo_term(); + else if(vidix_name) vidix_term(); if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err); if((err=vbeSetMode(init_mode,NULL)) != VBE_OK) PRINT_VBE_ERR("vbeSetMode",err); if(HAS_DGA()) vbeUnmapVideoBuffer((unsigned long)win.ptr,win.high); @@ -330,7 +333,7 @@ if(!HAS_DGA()) __vbeCopyData(dga_buffer); flip_trigger = 0; } - if(vo_doublebuffering && multi_size > 1 && !lvo_name) + if(vo_doublebuffering && multi_size > 1 && !lvo_name && !vidix_name) { int err; if((err=vbeSetDisplayStart(multi_buff[multi_idx],1)) != VBE_OK) @@ -388,7 +391,7 @@ if(verbose > 2) printf("vo_vesa: rgb2rgb_fnc was called\n"); } - if((!rgb2rgb_fnc || !HAS_DGA()) && !lvo_name) __vbeCopyData(data); + if((!rgb2rgb_fnc || !HAS_DGA()) && !lvo_name && !vidix_name) __vbeCopyData(data); return 0; } @@ -403,7 +406,9 @@ if(strcmp(sd,"dga") == 0) { flags &= ~(SUBDEV_NODGA); flags |= SUBDEV_FORCEDGA; } else if(memcmp(sd,"lvo:",4) == 0) lvo_name = &sd[4]; /* lvo_name will be valid within init() */ - else { printf("vo_vesa: Unknown subdevice: %s\n", sd); return -1; } + else + if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */ + else { printf("vo_vesa: Unknown subdevice: '%s'\n", sd); return -1; } return flags; } @@ -419,11 +424,16 @@ printf("vo_vesa: subdevice %s have been initialized\n",vo_subdevice); if(vo_subdevice) parseSubDevice(vo_subdevice); if(lvo_name) pre_init_err = vlvo_preinit(lvo_name); + else if(vidix_name) pre_init_err = vidix_preinit(vidix_name); if(verbose > 2) printf("vo_subdevice: initialization returns: %i\n",pre_init_err); first = 0; } - if(!pre_init_err && lvo_name) return vlvo_query_info(format); + if(!pre_init_err) + { + if(lvo_name) return vlvo_query_info(format); + else if(vidix_name) return vidix_query_fourcc(format); + } switch(format) { case IMGFMT_YV12: @@ -706,7 +716,7 @@ if(sd_flags & SUBDEV_NODGA) video_mode_info.PhysBasePtr = 0; if( vesa_zoom || fs_mode ) { - if( format==IMGFMT_YV12 || lvo_name ) + if(format==IMGFMT_YV12 || lvo_name || vidix_name) { /* software scale */ if(vesa_zoom > 1) @@ -725,7 +735,7 @@ } scale_srcW=width; scale_srcH=height; - if(!lvo_name) SwScale_Init(); + if(!lvo_name && !vidix_name) SwScale_Init(); if(verbose) printf("vo_vesa: Using SCALE\n"); } else @@ -734,7 +744,7 @@ return -1; } } - if(format != IMGFMT_YV12 && image_bpp != video_mode_info.BitsPerPixel && !lvo_name) + if(format != IMGFMT_YV12 && image_bpp != video_mode_info.BitsPerPixel && !lvo_name && !vidix_name) { if(image_bpp == 24 && video_mode_info.BitsPerPixel == 32) rgb2rgb_fnc = rgb24to32; else @@ -830,7 +840,7 @@ else { cpy_blk_fnc = __vbeCopyBlock; - if((yuv_fmt || rgb2rgb_fnc) && !lvo_name) + if((yuv_fmt || rgb2rgb_fnc) && !lvo_name && !vidix_name) { if(!(dga_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel))) { @@ -867,6 +877,20 @@ return -1; } else printf("vo_vesa: Using video overlay: %s\n",lvo_name); + } + else + if(vidix_name) + { + if(vidix_init(width,height,x_offset,y_offset,image_width, + image_height,format,video_mode_info.BitsPerPixel, + video_mode_info.XResolution,video_mode_info.YResolution) != 0) + { + printf("vo_vesa: Can't initialize VIDIX driver\n"); + vidix_name = NULL; + vesa_term(); + return -1; + } + else printf("vo_vesa: Using VIDIX\n",lvo_name); } } else
participants (1)
-
Nick Kurshev