[Mplayer-cvslog] CVS: main/libvo sub.c,1.29,1.30 vo_x11.c,1.28,1.29 vo_xmga.c,1.28,1.29 vo_xv.c,1.29,1.30

Zoltan Ponekker pontscho at mplayer.dev.hu
Tue Sep 4 17:21:02 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv12902/libvo

Modified Files:
	sub.c vo_x11.c vo_xmga.c vo_xv.c 
Log Message:
fix xshape, mixer, fullscreen, etc

Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- sub.c	1 Sep 2001 17:56:31 -0000	1.29
+++ sub.c	4 Sep 2001 15:21:00 -0000	1.30
@@ -163,7 +163,7 @@
 	  t=vo_sub->text[i++];	  
 	  len=strlen(t)-1;
 	  
-	  printf("sub(%d) '%s'\n",len,t);
+//	  printf("sub(%d) '%s'\n",len,t);
 //	  if(len<0) memy -=h; // according to max of vo_font->pic_a[font]->h 
 //	  else
 	  for (j=0;j<=len;j++){

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- vo_x11.c	29 Aug 2001 18:27:13 -0000	1.28
+++ vo_x11.c	4 Sep 2001 15:21:00 -0000	1.29
@@ -375,13 +375,11 @@
 #ifdef HAVE_NEW_GUI  
  if ( vo_window == None ) 
 #endif 
-  XSelectInput( mDisplay,mywindow,StructureNotifyMask | KeyPressMask );
-   
+  {
+   XSelectInput( mDisplay,mywindow,StructureNotifyMask | KeyPressMask );
+   saver_off(mDisplay);
+  }
  X_already_started++;
-
-// vo_initthread( mThread );
-
- saver_off(mDisplay);
  return 0;
 }
 
@@ -553,9 +551,16 @@
 static void
 uninit(void)
 {
-saver_on(mDisplay); // screen saver back on
+#ifdef HAVE_NEW_GUI
+ if ( vo_window == None )
+#endif
+ saver_on(mDisplay); // screen saver back on
 #ifdef HAVE_XF86VM
+ #ifdef HAVE_NEW_GUI
+        if ((vidmodes!=NULL)&&( vo_window == None ) )
+ #else
         if (vidmodes!=NULL)
+ #endif
         {
           int screen; screen=DefaultScreen( mDisplay );
           XF86VidModeSwitchToMode(mDisplay,screen,vidmodes[0]);
@@ -563,7 +568,7 @@
           free(vidmodes);
         }
 #endif
-
+ XClearWindow( mDisplay,mywindow );
 printf("vo: uninit!\n");
 }
 

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- vo_xmga.c	30 Aug 2001 20:13:14 -0000	1.28
+++ vo_xmga.c	4 Sep 2001 15:21:00 -0000	1.29
@@ -104,17 +104,12 @@
 
 static void set_window(){
 
-         XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
-         drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight;
-         XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
-         fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
-
          #ifdef HAVE_NEW_GUI
           if ( vo_window != None )
            {
             mFullscreen=0;
             dwidth=mdwidth; dheight=mdheight;
-            if ( ( drwWidth == vo_screenwidth )&&( drwHeight == vo_screenheight ) )
+            if ( ( vo_dwidth == vo_screenwidth )&&( vo_dheight == vo_screenheight ) )
              {
               mFullscreen=1;
               dwidth=vo_screenwidth;
@@ -123,6 +118,11 @@
            }
          #endif
 
+         XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
+         drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight;
+         XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
+         fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
+
          if ( mFullscreen )
           {
            drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
@@ -131,7 +131,7 @@
            drwcY+=drwY;
            drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
            drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
-           //fprintf( stderr,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
+           fprintf( stderr,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
           }
 
          mDrawColorKey();
@@ -235,7 +235,8 @@
  wndWidth=d_width; wndHeight=d_height;
  dwidth=d_width; dheight=d_height;
  #ifdef HAVE_NEW_GUI
-  mdwidth=d_width; mdheight=d_height;
+//  mdwidth=d_width; mdheight=d_height;
+  mdwidth=width; mdheight=height;
  #endif
  mFullscreen=fullscreen&1;
 
@@ -294,13 +295,13 @@
   else
     {
      mWindow=vo_window;
-     fprintf( stderr,"[xmga] width: %d height: %d d_width: %d d_height: %d\n",width,height,d_width,d_height );
-     if ( vo_screenwidth != d_width )
-      {
-       XMoveWindow( mDisplay,mWindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 );
-       XResizeWindow( mDisplay,mWindow,d_width,d_height );
-      }
-      else mFullscreen=1;
+//     fprintf( stderr,"[xmga] width: %d height: %d d_width: %d d_height: %d\n",width,height,d_width,d_height );
+//     if ( vo_screenwidth != d_width )
+//      {
+//       XMoveWindow( mDisplay,mWindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 );
+//       XResizeWindow( mDisplay,mWindow,d_width,d_height );
+//      }
+//      else mFullscreen=1;
       mGC=vo_gc; //XCreateGC( mDisplay,mWindow,GCForeground,&wGCV );
     }
 #endif
@@ -316,6 +317,8 @@
  mga_vid_config.colkey_blue=255;
 
  if(mga_init()) return -1;
+ 
+ set_window();
 
 #ifdef HAVE_NEW_GUI
  if ( vo_window == None )
@@ -324,7 +327,11 @@
    XFlush( mDisplay );
    XSync( mDisplay,False );
  }
- saver_off(mDisplay);
+ 
+#ifdef HAVE_NEW_GUI
+ if ( vo_window == None )
+#endif
+  saver_off(mDisplay);
 
  return 0;
 }
@@ -336,7 +343,11 @@
 static void
 uninit(void)
 {
- saver_on(mDisplay);
+#ifdef HAVE_NEW_GUI
+ if ( vo_window == None )
+#endif
+  saver_on(mDisplay);
  mga_uninit();
+ XClearWindow( mDisplay,mWindow );
  printf("vo: uninit!\n");
 }

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- vo_xv.c	1 Sep 2001 08:54:37 -0000	1.29
+++ vo_xv.c	4 Sep 2001 15:21:00 -0000	1.30
@@ -475,14 +475,15 @@
 */
 }
 
-static void uninit(void) {
-int i;
+static void uninit(void) 
+{
+ int i;
 #ifdef HAVE_NEW_GUI
-     if ( vo_window == None )
+ if ( vo_window == None )
 #endif
-      saver_on(mDisplay); // screen saver back on
-for( i=0;i<num_buffers;i++ )
- deallocate_xvimage( i );
+  saver_on(mDisplay); // screen saver back on
+ for( i=0;i<num_buffers;i++ ) deallocate_xvimage( i );
+ XClearWindow( mDisplay,mywindow );
 }
 
 




More information about the MPlayer-cvslog mailing list