[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.95,1.96
Alban Bedel CVS
albeu at mplayerhq.hu
Thu May 2 12:49:57 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv28796/libvo
Modified Files:
vo_x11.c
Log Message:
printf to mp_msg
Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- vo_x11.c 25 Apr 2002 21:52:47 -0000 1.95
+++ vo_x11.c 2 May 2002 10:49:55 -0000 1.96
@@ -74,7 +74,7 @@
#include <X11/extensions/XShm.h>
static int Shmem_Flag;
-static int Quiet_Flag;
+//static int Quiet_Flag; Here also what is this for. It's used but isn't inited ?
static XShmSegmentInfo Shminfo[1];
static int gXErrorFlag;
static int CompletionType=-1;
@@ -133,7 +133,7 @@
else
{
Shmem_Flag=0;
- if ( !Quiet_Flag ) printf( "Shared memory not supported\nReverting to normal Xlib\n" );
+ mp_msg(MSGT_VO,MSGL_WARN, "Shared memory not supported\nReverting to normal Xlib\n" );
}
if ( Shmem_Flag ) CompletionType=XShmGetEventBase( mDisplay ) + ShmCompletion;
@@ -143,7 +143,7 @@
if ( myximage == NULL )
{
if ( myximage != NULL ) XDestroyImage( myximage );
- if ( !Quiet_Flag ) printf( "Shared memory error,disabling ( Ximage error )\n" );
+ mp_msg(MSGT_VO,MSGL_WARN,"Shared memory error,disabling ( Ximage error )\n" );
goto shmemerror;
}
Shminfo[0].shmid=shmget( IPC_PRIVATE,
@@ -152,12 +152,9 @@
if ( Shminfo[0].shmid < 0 )
{
XDestroyImage( myximage );
- if ( !Quiet_Flag )
- {
- printf( "%s\n",strerror( errno ) );
- perror( strerror( errno ) );
- printf( "Shared memory error,disabling ( seg id error )\n" );
- }
+ mp_msg(MSGT_VO,MSGL_V, "%s\n",strerror( errno ) );
+ //perror( strerror( errno ) );
+ mp_msg(MSGT_VO,MSGL_WARN,"Shared memory error,disabling ( seg id error )\n" );
goto shmemerror;
}
Shminfo[0].shmaddr=( char * ) shmat( Shminfo[0].shmid,0,0 );
@@ -166,7 +163,7 @@
{
XDestroyImage( myximage );
if ( Shminfo[0].shmaddr != ( ( char * ) -1 ) ) shmdt( Shminfo[0].shmaddr );
- if ( !Quiet_Flag ) printf( "Shared memory error,disabling ( address error )\n" );
+ mp_msg(MSGT_VO,MSGL_WARN, "Shared memory error,disabling ( address error )\n" );
goto shmemerror;
}
myximage->data=Shminfo[0].shmaddr;
@@ -180,7 +177,7 @@
{
XDestroyImage( myximage );
shmdt( Shminfo[0].shmaddr );
- if ( !Quiet_Flag ) printf( "Shared memory error,disabling.\n" );
+ mp_msg(MSGT_VO,MSGL_WARN, "Shared memory error,disabling.\n" );
gXErrorFlag=0;
goto shmemerror;
}
@@ -189,8 +186,8 @@
{
static int firstTime=1;
- if ( !Quiet_Flag && firstTime){
- printf( "Sharing memory.\n" );
+ if ( firstTime){
+ mp_msg(MSGT_VO,MSGL_V, "Sharing memory.\n" );
firstTime=0;
}
}
@@ -415,16 +412,16 @@
#ifdef WORDS_BIGENDIAN
if(mode==MODE_BGR && bpp!=32){
- printf("BGR%d not supported, please contact the developers\n", bpp);
+ mp_msg(MSGT_VO,MSGL_ERR,"BGR%d not supported, please contact the developers\n", bpp);
return -1;
}
if(mode==MODE_RGB && bpp==32){
- printf("RGB32 not supported on big-endian systems, please contact the developers\n");
+ mp_msg(MSGT_VO,MSGL_ERR,"RGB32 not supported on big-endian systems, please contact the developers\n");
return -1;
}
#else
if(mode==MODE_BGR){
- printf("BGR not supported, please contact the developers\n");
+ mp_msg(MSGT_VO,MSGL_ERR,"BGR not supported, please contact the developers\n");
return -1;
}
#endif
@@ -566,8 +563,7 @@
static uint32_t query_format( uint32_t format )
{
- if(verbose > 2)
- printf("vo_x11: query_format was called: %x (%s)\n",format,vo_format_name(format));
+ mp_msg(MSGT_VO,MSGL_DBG2,"vo_x11: query_format was called: %x (%s)\n",format,vo_format_name(format));
if (IMGFMT_IS_BGR(format))
{
if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen)
@@ -614,7 +610,7 @@
{
if(arg)
{
- printf("vo_x11: Unknown subdevice: %s\n",arg);
+ mp_msg(MSGT_VO,MSGL_ERR,"vo_x11: Unknown subdevice: %s\n",arg);
return ENOSYS;
}
More information about the MPlayer-cvslog
mailing list