[Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.69,1.70 x11_common.c,1.89,1.90
Arpi of Ize
arpi at mplayerhq.hu
Tue Jun 4 01:23:07 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv4177/libvo
Modified Files:
vo_xmga.c x11_common.c
Log Message:
msg/i18n fixes and some printf->mp_msg
Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- vo_xmga.c 14 May 2002 23:44:35 -0000 1.69
+++ vo_xmga.c 3 Jun 2002 23:23:03 -0000 1.70
@@ -29,6 +29,8 @@
#include <string.h>
#include "config.h"
+#include "mp_msg.h"
+
#include "video_out.h"
#include "video_out_internal.h"
@@ -106,10 +108,10 @@
if ( WinID )
{
XGetGeometry( mDisplay,vo_window,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
- fprintf( stderr,"[xmga] x: %d y: %d w: %d h: %d\n",drwX,drwY,drwWidth,drwHeight );
+ mp_msg(MSGT_VO,MSGL_V,"[xmga] x: %d y: %d w: %d h: %d\n",drwX,drwY,drwWidth,drwHeight );
drwX=0; drwY=0;
XTranslateCoordinates( mDisplay,vo_window,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 );
+ mp_msg(MSGT_VO,MSGL_V,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
}
else { drwX=drwcX=vo_dx; drwY=drwcY=vo_dy; drwWidth=vo_dwidth; drwHeight=vo_dheight; }
@@ -123,7 +125,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 );
+ mp_msg(MSGT_VO,MSGL_V,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
}
mDrawColorKey();
@@ -166,7 +168,7 @@
if ( !(e&VO_EVENT_RESIZE) && !(e&VO_EVENT_EXPOSE) ) return;
set_window();
mDrawColorKey();
- if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) ) printf( "Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
+ if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) ) mp_msg(MSGT_VO,MSGL_WARN,"Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
}
static void draw_osd(void)
@@ -176,7 +178,7 @@
#ifdef SHOW_TIME
unsigned int t;
t=GetTimer();
- printf(" [timer: %08X diff: %6d dd: %6d ] \n",t,t-timer,(t-timer)-timerd);
+ mp_msg(MSGT_VO,MSGL_STATUS," [timer: %08X diff: %6d dd: %6d ] \n",t,t-timer,(t-timer)-timerd);
timerd=t-timer;
timer=t;
#endif
@@ -218,7 +220,9 @@
mga_vid_config.format=MGA_VID_FORMAT_UYVY;
mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height * 2;
break;
- default: printf("mga: invalid output format %0X\n",format); return (-1);
+ default:
+ mp_msg(MSGT_VO,MSGL_ERR,"mga: invalid output format %0X\n",format);
+ return -1;
}
aspect_save_orig(width,height);
@@ -237,7 +241,7 @@
case 24: fgColor=0x00ff00ffL; break;
case 16: fgColor=0xf81fL; break;
case 15: fgColor=0x7c1fL; break;
- default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1;
+ default: mp_msg(MSGT_VO,MSGL_ERR,"Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1;
}
inited=1;
@@ -335,6 +339,6 @@
mga_uninit();
saver_on(mDisplay);
vo_x11_uninit();
- printf("vo: uninit!\n");
+ mp_msg(MSGT_VO,MSGL_V,"vo: uninit!\n");
}
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- x11_common.c 27 May 2002 11:19:56 -0000 1.89
+++ x11_common.c 3 Jun 2002 23:23:03 -0000 1.90
@@ -128,8 +128,7 @@
&nvisuals);
if (visuals != NULL) {
for (i = 0; i < nvisuals; i++) {
- if (verbose)
- printf("vo: X11 truecolor visual %#x, depth %d, R:%lX G:%lX B:%lX\n",
+ mp_msg(MSGT_VO,MSGL_V,"vo: X11 truecolor visual %#x, depth %d, R:%lX G:%lX B:%lX\n",
visuals[i].visualid, visuals[i].depth,
visuals[i].red_mask, visuals[i].green_mask,
visuals[i].blue_mask);
@@ -163,15 +162,12 @@
XGetErrorText(display, event->error_code, (char *)&msg, MSGLEN);
- printf("X11 error: %s\n", msg);
+ mp_msg(MSGT_VO,MSGL_ERR,"X11 error: %s\n", msg);
- if (verbose)
- {
- printf("Type: %x, display: %x, resourceid: %x, serial: %x\n",
+ mp_msg(MSGT_VO,MSGL_V,"Type: %x, display: %x, resourceid: %x, serial: %x\n",
event->type, event->display, event->resourceid, event->serial);
- printf("Error code: %x, request code: %x, minor code: %x\n",
+ mp_msg(MSGT_VO,MSGL_V,"Error code: %x, request code: %x, minor code: %x\n",
event->error_code, event->request_code, event->minor_code);
- }
abort();
//exit_player("X11 error");
@@ -267,13 +263,12 @@
dispName = XDisplayName(mDisplayName);
#endif
- if (verbose)
- printf("X11 opening display: %s\n", dispName);
+ mp_msg(MSGT_VO,MSGL_V,"X11 opening display: %s\n", dispName);
mDisplay=XOpenDisplay(dispName);
if ( !mDisplay )
{
- printf( "vo: couldn't open the X11 display (%s)!\n",dispName );
+ mp_msg(MSGT_VO,MSGL_ERR,"vo: couldn't open the X11 display (%s)!\n",dispName );
return 0;
}
mScreen=DefaultScreen( mDisplay ); // Screen ID.
@@ -345,8 +340,7 @@
bpp=mXImage->bits_per_pixel;
if((vo_depthonscreen+7)/8 != (bpp+7)/8) vo_depthonscreen=bpp; // by A'rpi
mask=mXImage->red_mask|mXImage->green_mask|mXImage->blue_mask;
- if(verbose)
- printf("vo: X11 color mask: %X (R:%lX G:%lX B:%lX)\n",
+ mp_msg(MSGT_VO,MSGL_V,"vo: X11 color mask: %X (R:%lX G:%lX B:%lX)\n",
mask,mXImage->red_mask,mXImage->green_mask,mXImage->blue_mask);
XDestroyImage( mXImage );
}
@@ -361,7 +355,7 @@
else if ( strncmp(dispName, "localhost:", 10) == 0)
dispName += 9;
if (*dispName==':') mLocalDisplay=1; else mLocalDisplay=0;
- printf("vo: X11 running at %dx%d with depth %d and %d bits/pixel (\"%s\" => %s display)\n",
+ mp_msg(MSGT_VO,MSGL_INFO,"vo: X11 running at %dx%d with depth %d and %d bpp (\"%s\" => %s display)\n",
vo_screenwidth,vo_screenheight,
depth, vo_depthonscreen,
dispName,mLocalDisplay?"local":"remote");
@@ -379,7 +373,7 @@
return;
}
// if( !vo_depthonscreen ) return;
- printf("vo: uninit ...\n" );
+ mp_msg(MSGT_VO,MSGL_V,"vo: uninit ...\n" );
XSetErrorHandler(NULL);
XCloseDisplay( mDisplay );
vo_depthonscreen = 0;
@@ -780,16 +774,16 @@
if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing))
{
if (!DPMSEnable(mDisplay)) { // restoring power saving settings
- printf("DPMS not available?\n");
+ mp_msg(MSGT_VO,MSGL_WARN,"DPMS not available?\n");
} else {
// DPMS does not seem to be enabled unless we call DPMSInfo
BOOL onoff;
CARD16 state;
DPMSInfo(mDisplay, &state, &onoff);
if (onoff) {
- printf ("Successfully enabled DPMS\n");
+ mp_msg(MSGT_VO,MSGL_INFO,"Successfully enabled DPMS\n");
} else {
- printf ("Could not enable DPMS\n");
+ mp_msg(MSGT_VO,MSGL_WARN,"Could not enable DPMS\n");
}
}
}
@@ -820,10 +814,10 @@
if (onoff)
{
Status stat;
- printf ("Disabling DPMS\n");
+ mp_msg(MSGT_VO,MSGL_INFO,"Disabling DPMS\n");
dpms_disabled=1;
stat = DPMSDisable(mDisplay); // monitor powersave off
- printf ("stat: %d\n", stat);
+ mp_msg(MSGT_VO,MSGL_V,"DPMSDisable stat: %d\n", stat);
}
}
#endif
@@ -857,10 +851,10 @@
if (XF86VidModeQueryExtension(mDisplay, &vm_event, &vm_error)) {
XF86VidModeQueryVersion(mDisplay, &vm_ver, &vm_rev);
- printf("XF86VidMode Extension v%i.%i\n", vm_ver, vm_rev);
+ mp_msg(MSGT_VO,MSGL_V,"XF86VidMode Extension v%i.%i\n", vm_ver, vm_rev);
have_vm=1;
} else
- printf("XF86VidMode Extenstion not available.\n");
+ mp_msg(MSGT_VO,MSGL_WARN,"XF86VidMode Extenstion not available.\n");
if (have_vm) {
if (vidmodes==NULL)
@@ -878,7 +872,7 @@
j=i;
}
- printf("XF86VM: Selected video mode %dx%d for image size %dx%d.\n",*modeline_width, *modeline_height, X, Y);
+ mp_msg(MSGT_VO,MSGL_INFO,"XF86VM: Selected video mode %dx%d for image size %dx%d.\n",*modeline_width, *modeline_height, X, Y);
XF86VidModeLockModeSwitch(mDisplay,mScreen,0);
XF86VidModeSwitchToMode(mDisplay,mScreen,vidmodes[j]);
XF86VidModeSwitchToMode(mDisplay,mScreen,vidmodes[j]);
@@ -904,7 +898,7 @@
for (i=0; i<modecount; i++)
if ((vidmodes[i]->hdisplay == vo_screenwidth) && (vidmodes[i]->vdisplay == vo_screenheight))
{
- printf("\nReturning to original mode %dx%d\n", vo_screenwidth, vo_screenheight);
+ mp_msg(MSGT_VO,MSGL_INFO,"\nReturning to original mode %dx%d\n", vo_screenwidth, vo_screenheight);
break;
}
More information about the MPlayer-cvslog
mailing list