[Mplayer-cvslog] CVS: 0_90/libvo vo_vesa.c,1.87,1.88
Alex Beregszaszi
alex at mplayerhq.hu
Mon Apr 21 23:15:08 CEST 2003
Update of /cvsroot/mplayer/0_90/libvo
In directory mail:/var/tmp.root/cvs-serv30102
Modified Files:
vo_vesa.c
Log Message:
backport: multiple init support
Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libvo/vo_vesa.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- vo_vesa.c 22 Mar 2003 16:30:36 -0000 1.87
+++ vo_vesa.c 21 Apr 2003 21:15:06 -0000 1.88
@@ -115,8 +115,10 @@
/* Linux Video Overlay */
static const char *lvo_name = NULL;
+static int lvo_opened = 0;
#ifdef CONFIG_VIDIX
static const char *vidix_name = NULL;
+static int vidix_opened = 0;
#endif
#define HAS_DGA() (win.idx == -1)
@@ -150,9 +152,9 @@
static void vesa_term( void )
{
int err;
- if(lvo_name) vlvo_term();
+ if(lvo_opened) { vlvo_term(); lvo_opened = 0; }
#ifdef CONFIG_VIDIX
- else if(vidix_name) vidix_term();
+ else if(vidix_opened) { vidix_term(); vidix_opened = 0; }
#endif
if(init_state) if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err);
init_state=NULL;
@@ -436,10 +438,6 @@
{
uint32_t flags;
flags = 0;
- lvo_name = NULL;
-#ifdef CONFIG_VIDIX
- vidix_name = NULL;
-#endif
if(strcmp(sd,"nodga") == 0) { flags |= SUBDEV_NODGA; flags &= ~(SUBDEV_FORCEDGA); }
else
if(strcmp(sd,"dga") == 0) { flags &= ~(SUBDEV_NODGA); flags |= SUBDEV_FORCEDGA; }
@@ -939,11 +937,11 @@
if(vlvo_init(width,height,x_offset,y_offset,dstW,dstH,format,dstBpp) != 0)
{
printf("vo_vesa: Can't initialize Linux Video Overlay\n");
- lvo_name = NULL;
vesa_term();
return -1;
}
else printf("vo_vesa: Using video overlay: %s\n",lvo_name);
+ lvo_opened = 1;
}
#ifdef CONFIG_VIDIX
else
@@ -954,12 +952,12 @@
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");
vidix_start();
+ vidix_opened = 1;
}
#endif
}
@@ -985,11 +983,12 @@
else
{
clear_screen(); /* Clear screen for stupid BIOSes */
- if(verbose>1) paintBkGnd();
+ if(verbose>1)
{
int x;
x = (video_mode_info.XResolution/video_mode_info.XCharSize)/2-strlen(title)/2;
if(x < 0) x = 0;
+ paintBkGnd();
vbeWriteString(x,0,7,title);
}
}
@@ -1021,6 +1020,10 @@
if(verbose > 2)
printf("vo_vesa: subdevice %s is being initialized\n",arg);
subdev_flags = 0;
+ lvo_name = NULL;
+#ifdef CONFIG_VIDIX
+ vidix_name = NULL;
+#endif
if(arg) subdev_flags = parseSubDevice(arg);
if(lvo_name) pre_init_err = vlvo_preinit(lvo_name);
#ifdef CONFIG_VIDIX
More information about the MPlayer-cvslog
mailing list