[Mplayer-cvslog] CVS: main/libvo mga_common.c,1.10,1.11 vo_mga.c,1.7,1.8 vo_sdl.c,1.15,1.16 vo_svga.c,1.14,1.15 vo_xmga.c,1.12,1.13 wskeys.h,1.2,1.3 x11_common.c,1.9,1.10

GEREOFFY arpi_esp at users.sourceforge.net
Sun Apr 15 22:32:00 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv31229/libvo

Modified Files:
	mga_common.c vo_mga.c vo_sdl.c vo_svga.c vo_xmga.c wskeys.h 
	x11_common.c 
Log Message:
qrva eletbe nem kene cvs-t elbaszni inkabb ne nyuljatok hozza baz+

Index: mga_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** mga_common.c	2001/04/14 19:29:28	1.10
--- mga_common.c	2001/04/15 20:31:57	1.11
***************
*** 151,157 ****
  draw_frame(uint8_t *src[])
  {
!         if (mga_vid_config.format==MGA_VID_FORMAT_YUY2)
!                 write_frame_yuy2(src[0]);
! 	return 0;
  }
  
--- 151,161 ----
  draw_frame(uint8_t *src[])
  {
!     switch(mga_vid_config.format){
!     case MGA_VID_FORMAT_YUY2:
!         write_frame_yuy2(src[0]);break;
!     case MGA_VID_FORMAT_UYVY:
!         write_frame_yuy2(src[0]);break;
!     }
!     return 0;
  }
  
***************
*** 162,165 ****
--- 166,170 ----
      case IMGFMT_YV12:
      case IMGFMT_YUY2:
+     case IMGFMT_UYVY:
  //    case IMGFMT_RGB|24:
  //    case IMGFMT_BGR|24:

Index: vo_mga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mga.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** vo_mga.c	2001/03/25 04:28:40	1.7
--- vo_mga.c	2001/04/15 20:31:57	1.8
***************
*** 71,74 ****
--- 71,77 ----
  	    mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
              mga_vid_config.format=MGA_VID_FORMAT_YUY2; break;
+         case IMGFMT_UYVY:
+ 	    mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
+             mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
          default: 
              fprintf(stderr,"mga: invalid output format %0X\n",format);

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** vo_sdl.c	2001/04/15 15:45:26	1.15
--- vo_sdl.c	2001/04/15 20:31:58	1.16
***************
*** 378,402 ****
          unsigned int sdl_format;
  
! 	sdl_format = format;
          switch(format){
! 		case IMGFMT_YV12:
! 			printf("\nSDL: Using 0x%X (YV12) image format\n", format); break;
! 		case IMGFMT_IYUV:
! 			printf("\nSDL: Using 0x%X (IYUV) image format\n", format); break;
! 		case IMGFMT_YUY2:
! 			printf("\nSDL: Using 0x%X (YUY2) image format\n", format); break;
! 		case IMGFMT_UYVY:
! 			printf("\nSDL: Using 0x%X (UYVY) image format\n", format); break;
! 		case IMGFMT_YVYU:
! 			printf("\nSDL: Using 0x%X (YVYU) image format\n", format); break;
! 		case IMGFMT_I420:
! 			printf("\nSDL: Using 0x%X (I420) image format\n", format);
! 			printf("SDL: Mapping I420 to IYUV (untested please report if it works)\n");
! 			sdl_format = SDL_IYUV_OVERLAY;
! 		break;	
! 		default:
! 			printf("\nSDL: Unsupported image format (0x%X)\n",format);
! 			return -1;
! 	}
  
  	sdl_open (NULL, NULL);
--- 378,399 ----
          unsigned int sdl_format;
  
! 
          switch(format){
!           case IMGFMT_YV12:
! 	  	sdl_format=SDL_YV12_OVERLAY;
! 		printf("SDL: Using YV12 image format\n");
! 	  break;
!           case IMGFMT_YUY2:
! 	  	sdl_format=SDL_YUY2_OVERLAY;
! 		printf("SDL: Using YUY2 image format\n");
! 	  break;
!           case IMGFMT_UYVY:
! 	  	sdl_format=SDL_UYVY_OVERLAY;
! 		printf("SDL: Using UYVY image format\n");
! 	  break;
!           default:
!             printf("SDL: Unsupported image format (0x%X)\n",format);
!             return -1;
!         }
  
  	sdl_open (NULL, NULL);

Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** vo_svga.c	2001/04/15 19:35:34	1.14
--- vo_svga.c	2001/04/15 20:31:58	1.15
***************
*** 42,115 ****
  static uint32_t x_pos, y_pos; // Position
  
! // SVGAlib - list of detected modes
! typedef struct vga_modelist_s {
!           uint16_t modenum;
!           vga_modeinfo modeinfo;
! 	  struct vga_modelist_s *next;
!         } vga_modelist_t;
! 
! vga_modelist_t *modelist = NULL;
! 
  static uint8_t bpp;
- static uint8_t bpp_conv = 0;
- static uint32_t pformat;
  
! #define BPP_15 1
! #define BPP_16 2
! #define BPP_24 4
! #define BPP_32 8
! static uint8_t bpp_avail = 0;
  
  static uint8_t checked = 0;
! 
! static int add_mode(uint16_t mode, vga_modeinfo minfo) {
!   vga_modelist_t *list;
! 
!   if (modelist == NULL) {
!     modelist = malloc(sizeof(vga_modelist_t));
!     modelist->modenum = mode;
!     modelist->modeinfo = minfo;
!     modelist->next = NULL;
!     if (modelist == NULL) {
!       printf("vo_svga: add_mode() failed. Not enough memory for modelist.");
!       return(1); // error
!     }
!   } else {
!       list = modelist;
!       while (list->next != NULL)
!         list = list->next;
!       list->next = malloc(sizeof(vga_modelist_t));
!       if (list->next == NULL) {
!         printf("vo_svga: add_mode() failed. Not enough memory for modelist.");
!         return(1); // error
!       }
!       list = list->next;
!       list->modenum = mode;
!       list->modeinfo = minfo;
!       list->next = NULL;
!     }  
! }
  
! static int checksupportedmodes() {
!   uint16_t i;
!   vga_modeinfo *minfo;
    
    checked = 1;
    vga_init();
    vga_disabledriverreport();
!   for (i = 1; i < vga_lastmodenumber(); i++)
!     if (vga_hasmode(i) > 0) {
!       minfo = vga_getmodeinfo(i);
!       switch (minfo->colors) {
!         case 32768: bpp_avail |= BPP_15; break;
!         case 65536: bpp_avail |= BPP_16; break;
!       }
!       switch (minfo->bytesperpixel) {
!         case 3: bpp_avail |= BPP_24; break;
!         case 4: bpp_avail |= BPP_32; break;
!       }
!       if (add_mode(i, *minfo))
!         return(1);
!     }
  }
  
--- 42,81 ----
  static uint32_t x_pos, y_pos; // Position
  
! // Order must not change!
! #define _640x480x32K 	 0   // 17
! #define _640x480x64K 	 1   // 18
! #define _640x480x16M 	 2   // 19
! #define _640x480x16M32   3   // 34
! #define _800x600x32K 	 4   // 20
! #define _800x600x64K 	 5   // 21
! #define _800x600x16M 	 6   // 22 
! #define _800x600x16M32   7   // 35
! #define _1024x768x32K 	 8   // 23
! #define _1024x768x64K 	 9   // 24
! #define _1024x768x16M 	 10  // 25
! #define _1024x768x16M32  11  // 36
! #define VID_MODE_NUM	 12
! 
! static uint8_t vid_modes[VID_MODE_NUM];
! static vid_mode_nums[VID_MODE_NUM] = {17,18,19,34,20,21,22,35,23,24,25,36};
! static uint8_t vid_mode;
  static uint8_t bpp;
  
! static uint32_t pformat;
  
  static uint8_t checked = 0;
! static uint8_t bpp_conv = 0;
  
! static void checksupportedmodes() {
!   int i;
    
    checked = 1;
    vga_init();
    vga_disabledriverreport();
!   for (i = 0; i < VID_MODE_NUM; i++) {
!     if (vga_hasmode(vid_mode_nums[i]) > 0)
!       vid_modes[i] = 1;
!     else vid_modes[i] = 0;
!   }
  }
  
***************
*** 117,235 ****
                       uint32_t d_height, uint32_t fullscreen, char *title, 
  		     uint32_t format) {
!   uint32_t req_w = (d_width > 0 ? d_width : width);
!   uint32_t req_h = (d_height > 0 ? d_height : height);
!   uint16_t vid_mode = 0;
!   uint8_t widescreen = (((req_w*1.0)/req_h) > (4.0/3)) ? 1 : 0;
!   vga_modelist_t *list = modelist;
    
    if (!checked) {
!     if (checksupportedmodes()) // Looking for available video modes
!       return(1);
    }
  
-   bpp_avail = 0;
-   while (list != NULL) {
-     if ((list->modeinfo.width >= req_w) && (list->modeinfo.height >= req_h)) {
-       switch (list->modeinfo.colors) {
-         case 32768: bpp_avail |= BPP_15; break;
-         case 65536: bpp_avail |= BPP_16; break;
-       }
-       switch (list->modeinfo.bytesperpixel) {
-         case 3: bpp_avail |= BPP_24; break;
-         case 4: bpp_avail |= BPP_32; break;
-       }
-     }
-     list = list->next;
-   }
-   
    pformat = format;
    
!   // bpp check
!   bpp_conv = 0;
    if (!vo_dbpp) {
      if (format == IMGFMT_YV12) bpp = 32;
      else bpp = format & 255;
-     switch (bpp) {
-       case 32: if (!(bpp_avail & BPP_32)) {
- 	         printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
- 		 printf("vo_svga: Maybe you should try -bpp\n");
- 		 return(1);
- 	       } 
-                break;
-       case 24: if (!(bpp_avail & BPP_24))
-                  if (!(bpp_avail & BPP_32)) {
- 	           printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
- 		   printf("vo_svga: Maybe you should try -bpp\n");
- 		   return(1);
- 		 } else {
- 		     bpp = 32;
- 		     bpp_conv = 1;
- 		   }     
-                break;
-       case 16: if (!(bpp_avail & BPP_16)) {
- 	         printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
- 		 printf("vo_svga: Maybe you should try -bpp\n");
- 		 return(1);
- 	       } 
-                break;
-       case 15: if (!(bpp_avail & BPP_15))
-                  if (!(bpp_avail & BPP_16)) {
- 	           printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
- 		   printf("vo_svga: Maybe you should try -bpp\n");
- 		   return(1);
- 		 } else {
- 		     bpp = 16;
- 		     bpp_conv = 1;
- 		   }
-                break;
-     }
    } else {
        bpp = vo_dbpp;
        switch (bpp) {
!         case 32: if (!(bpp_avail & BPP_32)) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
  		   return(1);
                   }
!         case 24: if (!(bpp_avail & BPP_24)) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
  		   return(1);
                   }
!         case 16: if (!(bpp_avail & BPP_16)) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
  		   return(1);
                   }
!         case 15: if (!(bpp_avail & BPP_15)) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
  		   return(1);
                   }
        }
      }
! 
!   list = modelist;
!   while ((list != NULL) && (!vid_mode)) {
!     if ((list->modeinfo.width >= req_w) && (list->modeinfo.height >= req_h)) {
        switch (bpp) {
!         case 32: if (list->modeinfo.bytesperpixel == 4)
! 	           vid_mode = list->modenum;
!         case 24: if (list->modeinfo.bytesperpixel == 3)
! 	           vid_mode = list->modenum;
!         case 16: if (list->modeinfo.colors == 65536)
! 	           vid_mode = list->modenum;
!         case 15: if (list->modeinfo.colors == 32768)
! 	           vid_mode = list->modenum;
        }
!     }
!     list = list->next;
    }
!   
    vga_setlinearaddressing();
    if (vga_setmode(vid_mode) == -1){
      printf("vo_svga: vga_setmode(%d) failed.\n",vid_mode);
-     uninit();
      return(1); // error
    }
    if (gl_setcontextvga(vid_mode)){
      printf("vo_svga: gl_setcontextvga(%d) failed.\n",vid_mode);
-     uninit();
      return(1); // error
    }
--- 83,157 ----
                       uint32_t d_height, uint32_t fullscreen, char *title, 
  		     uint32_t format) {
!   uint32_t wid = (d_width > 0 ? d_width : width);
    
    if (!checked) {
!     checksupportedmodes(); // Looking for available video modes
    }
  
    pformat = format;
    
!   // -bpp check
    if (!vo_dbpp) {
      if (format == IMGFMT_YV12) bpp = 32;
      else bpp = format & 255;
    } else {
        bpp = vo_dbpp;
        switch (bpp) {
!         case 32: if (!(vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32])) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
  		   return(1);
                   }
!         case 24: if (!(vid_modes[_640x480x16M] | vid_modes[_800x600x16M] | vid_modes[_1024x768x16M])) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
  		   return(1);
                   }
!         case 16: if (!(vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K])) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
  		   return(1);
                   }
!         case 15: if (!(vid_modes[_640x480x32K] | vid_modes[_800x600x32K] | vid_modes[_1024x768x32K])) {
! 	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
  		   return(1);
                   }
        }
      }
!   
!   if (wid > 800)
!     switch (bpp) {
!       case 32: vid_mode = 36; break;
!       case 24: vid_mode = bpp_conv ? 36 : 25; bpp = 32; break;
!       case 16: vid_mode = 24; break;
!       case 15: vid_mode = bpp_conv ? 24 : 23; bpp = 16; break;
!     }
!   else
!     if (wid > 640)
        switch (bpp) {
!         case 32: vid_mode = 35; break;
!         case 24: vid_mode = bpp_conv ? 35 : 22; bpp = 32; break;
!         case 16: vid_mode = 21; break;
!         case 15: vid_mode = bpp_conv ? 21 : 20; bpp = 16; break;
        }
!     else
!       switch (bpp) {
!         case 32: vid_mode = 34; break;
!         case 24: vid_mode = bpp_conv ? 34 : 19; bpp = 32; break;
!         case 16: vid_mode = 18; break;
!         case 15: vid_mode = bpp_conv ? 18 : 17; bpp = 16; break;
!       }
!   if (bpp_conv)
!     bppbuf = malloc(maxw * maxh * BYTESPERPIXEL);
!   if (!bppbuf) {
!     printf("vo_svga: Not enough memory for buffering!");
!     uninit();
!     return (1);
    }
! 
    vga_setlinearaddressing();
    if (vga_setmode(vid_mode) == -1){
      printf("vo_svga: vga_setmode(%d) failed.\n",vid_mode);
      return(1); // error
    }
    if (gl_setcontextvga(vid_mode)){
      printf("vo_svga: gl_setcontextvga(%d) failed.\n",vid_mode);
      return(1); // error
    }
***************
*** 238,242 ****
    if (gl_setcontextvgavirtual(vid_mode)){
      printf("vo_svga: gl_setcontextvgavirtual(%d) failed.\n",vid_mode);
-     uninit();
      return(1); // error
    }
--- 160,163 ----
***************
*** 246,267 ****
    gl_clearscreen(0);
    
-   if (bpp_conv)
-     bppbuf = malloc(maxw * maxh * BYTESPERPIXEL);
-   if (bppbuf == NULL) {
-     printf("vo_svga: Not enough memory for buffering!\n");
-     uninit();
-     return (1);
-   }
- 
    orig_w = width;
    orig_h = height;
    if ((fullscreen & 0x04) && (WIDTH != orig_w)) {
!     if (!widescreen) {
        maxh = HEIGHT;
        scaling = maxh / (orig_h * 1.0);
        maxw = (uint32_t) (orig_w * scaling);
        scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
!       if (scalebuf == NULL) {
!         printf("vo_svga: Not enough memory for buffering!\n");
  	uninit();
  	return (1);
--- 167,180 ----
    gl_clearscreen(0);
    
    orig_w = width;
    orig_h = height;
    if ((fullscreen & 0x04) && (WIDTH != orig_w)) {
!     if (((orig_w*1.0) / orig_h) < (4.0/3)) {
        maxh = HEIGHT;
        scaling = maxh / (orig_h * 1.0);
        maxw = (uint32_t) (orig_w * scaling);
        scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
!       if (!scalebuf) {
!         printf("vo_svga: Not enough memory for buffering!");
  	uninit();
  	return (1);
***************
*** 272,277 ****
          maxh = (uint32_t) (orig_h * scaling);
          scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
!         if (scalebuf == NULL) {
!           printf("vo_svga: Not enough memory for buffering!\n");
  	  uninit();
  	  return (1);
--- 185,190 ----
          maxh = (uint32_t) (orig_h * scaling);
          scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
!         if (!scalebuf) {
!           printf("vo_svga: Not enough memory for buffering!");
  	  uninit();
  	  return (1);
***************
*** 288,293 ****
      yuv2rgb_init(bpp, MODE_RGB);
      yuvbuf = malloc(maxw * maxh * BYTESPERPIXEL);
!     if (yuvbuf == NULL) {
!       printf("vo_svga: Not enough memory for buffering!\n");
        uninit();
        return (1);
--- 201,206 ----
      yuv2rgb_init(bpp, MODE_RGB);
      yuvbuf = malloc(maxw * maxh * BYTESPERPIXEL);
!     if (!yuvbuf) {
!       printf("vo_svga: Not enough memory for buffering!");
        uninit();
        return (1);
***************
*** 305,322 ****
    uint8_t res = 0;
  
!   if (!checked) {
!     if (checksupportedmodes()) // Looking for available video modes
!       return(0);
!   }
    switch (format) {
      case IMGFMT_RGB32: 
      case IMGFMT_BGR|32: {
!       return ((bpp_avail & BPP_32) ? 1 : 0);
      }
      case IMGFMT_RGB24: 
      case IMGFMT_BGR|24: {
!       res = (bpp_avail & BPP_24) ? 1 : 0;
        if (!res) {
!         res = (bpp_avail & BPP_32) ? 1 : 0;
  	bpp_conv = 1;
        }
--- 218,233 ----
    uint8_t res = 0;
  
!   if (!checked)
!     checksupportedmodes(); // Looking for available video modes
    switch (format) {
      case IMGFMT_RGB32: 
      case IMGFMT_BGR|32: {
!       return (vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32]);
      }
      case IMGFMT_RGB24: 
      case IMGFMT_BGR|24: {
!       res = vid_modes[_640x480x16M] | vid_modes[_800x600x16M] | vid_modes[_1024x768x16M];
        if (!res) {
!         res = vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32];
  	bpp_conv = 1;
        }
***************
*** 325,335 ****
      case IMGFMT_RGB16: 
      case IMGFMT_BGR|16: {
!       return ((bpp_avail & BPP_16) ? 1 : 0);
      }
      case IMGFMT_RGB15: 
      case IMGFMT_BGR|15: {
!       res = (bpp_avail & BPP_15) ? 1 : 0;
        if (!res) {
!         res = (bpp_avail & BPP_16) ? 1 : 0;
          bpp_conv = 1;
        }
--- 236,246 ----
      case IMGFMT_RGB16: 
      case IMGFMT_BGR|16: {
!       return (vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K]);
      }
      case IMGFMT_RGB15: 
      case IMGFMT_BGR|15: {
!       res = vid_modes[_640x480x32K] | vid_modes[_800x600x32K] | vid_modes[_1024x768x32K];
        if (!res) {
!         res = vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K];
          bpp_conv = 1;
        }
***************
*** 368,372 ****
      src[0] = yuvbuf;
    }
!   if (scalebuf != NULL) {
      gl_scalebox(orig_w, orig_h, src[0], maxw, maxh, scalebuf);
      src[0] = scalebuf;
--- 279,283 ----
      src[0] = yuvbuf;
    }
!   if (scalebuf) {
      gl_scalebox(orig_w, orig_h, src[0], maxw, maxh, scalebuf);
      src[0] = scalebuf;
***************
*** 414,418 ****
    sh = (uint32_t) (h * scaling);
    yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, stride[0], stride[1]);
!   if (scalebuf != NULL) {
      gl_scalebox(w, h, yuvbuf, sw, sh, scalebuf);
      src = scalebuf;
--- 325,329 ----
    sh = (uint32_t) (h * scaling);
    yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, stride[0], stride[1]);
!   if (scalebuf) {
      gl_scalebox(w, h, yuvbuf, sw, sh, scalebuf);
      src = scalebuf;
***************
*** 437,460 ****
  
  static void uninit(void) {
-   vga_modelist_t *list = modelist;
- 
    gl_freecontext(screen);
    gl_freecontext(virt);
    vga_setmode(TEXT);
!   if (bppbuf != NULL)
      free(bppbuf);
!   if (scalebuf != NULL)
      free(scalebuf);
!   if (yuvbuf != NULL)
      free(yuvbuf);
-   if (modelist != NULL) {
-     while (modelist->next != NULL) {
-       list = modelist;
-       while (list->next != NULL)
-         list = list->next;
-       free(list);
-     }
-     free(modelist);
-   }
  }
  	
--- 348,360 ----
  
  static void uninit(void) {
    gl_freecontext(screen);
    gl_freecontext(virt);
    vga_setmode(TEXT);
!   if (bppbuf)
      free(bppbuf);
!   if (scalebuf)
      free(scalebuf);
!   if (yuvbuf)
      free(yuvbuf);
  }
  	

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** vo_xmga.c	2001/04/13 00:54:05	1.12
--- vo_xmga.c	2001/04/15 20:31:58	1.13
***************
*** 190,193 ****
--- 190,197 ----
          mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height * 2;
          break;
+    case IMGFMT_UYVY:
+         mga_vid_config.format=MGA_VID_FORMAT_UYVY;
+         mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height * 2;
+         break;
     default:          fprintf(stderr,"mga: invalid output format %0X\n",format); return (-1);
    }

Index: wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/wskeys.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** wskeys.h	2001/04/15 18:35:17	1.2
--- wskeys.h	2001/04/15 20:31:58	1.3
***************
*** 61,66 ****
  #define wsMinus '-'
  #define wsPlus  '+'
- #define wsMul   '*'
- #define wsDiv   '/'
  
  #define wsUp            0x52 + 256
--- 61,64 ----

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** x11_common.c	2001/04/15 18:35:17	1.9
--- x11_common.c	2001/04/15 20:31:58	1.10
***************
*** 1,14 ****
  #include <stdio.h>
  #include <stdlib.h>
- #include <string.h>
  
  #include <unistd.h>
  #include <sys/mman.h>
  
- #include "config.h"
  #include "video_out.h"
  
- #ifdef X11_FULLSCREEN
- 
  #include <X11/Xmd.h>
  #include <X11/Xlib.h>
--- 1,16 ----
+ 
  #include <stdio.h>
  #include <stdlib.h>
  
+ #include "config.h"
+ 
+ #ifdef X11_FULLSCREEN
+ 
+ #include <string.h>
  #include <unistd.h>
  #include <sys/mman.h>
  
  #include "video_out.h"
  
  #include <X11/Xmd.h>
  #include <X11/Xlib.h>
***************
*** 16,19 ****
--- 18,23 ----
  #include <X11/Xatom.h>
  
+ #include <X11/extensions/dpms.h>
+ 
  static int dpms_disabled=0;
  static int timeout_save=0;
***************
*** 22,36 ****
  void vo_hidecursor ( Display *disp , Window win )
  {
!         Cursor no_ptr;
!         Pixmap bm_no;
!         XColor black,dummy;
!         Colormap colormap;
!         static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
! 
!         colormap = DefaultColormap(disp,DefaultScreen(disp));
!         XAllocNamedColor(disp,colormap,"black",&black,&dummy);
!         bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);
!         no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);
!         XDefineCursor(disp,win,no_ptr);
  }
  
--- 26,40 ----
  void vo_hidecursor ( Display *disp , Window win )
  {
! 	Cursor no_ptr;
! 	Pixmap bm_no;
! 	XColor black,dummy;
! 	Colormap colormap;
! 	static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
! 	
! 	colormap = DefaultColormap(disp,DefaultScreen(disp));
! 	XAllocNamedColor(disp,colormap,"black",&black,&dummy);	
! 	bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);    
! 	no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);									          
! 	XDefineCursor(disp,win,no_ptr);
  }
  
***************
*** 97,104 ****
     case wsPlus:
     case wsGrayPlus:  mplayer_put_key('+'); break;
-    case wsGrayMul:
-    case wsMul:       mplayer_put_key('*'); break;
-    case wsGrayDiv:
-    case wsDiv:       mplayer_put_key('/'); break;
     default: if((key>='a' && key<='z')||(key>='A' && key<='Z')) mplayer_put_key(key);
    }
--- 101,104 ----
***************
*** 154,168 ****
      {
         case Expose:
!              ret|=VO_EVENT_EXPOSE;
               break;
         case ConfigureNotify:
               vo_dwidth=Event.xconfigure.width;
!              vo_dheight=Event.xconfigure.height;
!              ret|=VO_EVENT_RESIZE;
               break;
         case KeyPress:
               XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
               vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) );
!              ret|=VO_EVENT_KEYPRESS;
               break;
      }
--- 154,168 ----
      {
         case Expose:
! 	     ret|=VO_EVENT_EXPOSE;
               break;
         case ConfigureNotify:
               vo_dwidth=Event.xconfigure.width;
! 	     vo_dheight=Event.xconfigure.height;
! 	     ret|=VO_EVENT_RESIZE;
               break;
         case KeyPress:
               XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
               vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) );
! 	     ret|=VO_EVENT_KEYPRESS;
               break;
      }
***************
*** 172,177 ****
  }
  
- #endif
- 
  void saver_on(Display *mDisplay) {
  
--- 172,175 ----
***************
*** 179,196 ****
      if (dpms_disabled)
      {
!         if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
!         {
!             printf ("Enabling DPMS\n");
!             DPMSEnable(mDisplay);  // restoring power saving settings
!             DPMSQueryExtension(mDisplay, &nothing, &nothing);
!         }
      }
! 
      if (timeout_save)
      {
!         int dummy, interval, prefer_blank, allow_exp;
!         XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
!         XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
!         XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      }
  
--- 177,194 ----
      if (dpms_disabled)
      {
! 	if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
! 	{
! 	    printf ("Enabling DPMS\n");
! 	    DPMSEnable(mDisplay);  // restoring power saving settings
! 	    DPMSQueryExtension(mDisplay, &nothing, &nothing);
! 	}
      }
!     
      if (timeout_save)
      {
! 	int dummy, interval, prefer_blank, allow_exp;
! 	XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
! 	XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
! 	XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      }
  
***************
*** 203,219 ****
      if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
      {
!         BOOL onoff;
!         CARD16 state;
!         DPMSInfo(mDisplay, &state, &onoff);
!         if (onoff)
!         {
!             printf ("Disabling DPMS\n");
!             dpms_disabled=1;
!                 DPMSDisable(mDisplay);  // monitor powersave off
!         }
      }
      XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      if (timeout_save)
!         XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
!                     // turning off screensaver
  }
--- 201,219 ----
      if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
      {
! 	BOOL onoff;
! 	CARD16 state;
! 	DPMSInfo(mDisplay, &state, &onoff);
! 	if (onoff)
! 	{
! 	    printf ("Disabling DPMS\n");
! 	    dpms_disabled=1;
! 		DPMSDisable(mDisplay);  // monitor powersave off
! 	}
      }
      XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      if (timeout_save)
! 	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
! 		    // turning off screensaver
  }
+ 
+ #endif


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list