[Mplayer-cvslog] CVS: main/libmpcodecs ad_mp3.c,1.2,1.3 dec_audio.c,1.4,1.5 dec_video.c,1.135,1.136 vd.c,1.38,1.39 vf.c,1.29,1.30 vf_scale.c,1.11,1.12 vf_vo.c,1.9,1.10

Arpi of Ize arpi at mplayerhq.hu
Mon May 20 05:25:56 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv6187/libmpcodecs

Modified Files:
	ad_mp3.c dec_audio.c dec_video.c vd.c vf.c vf_scale.c vf_vo.c 
Log Message:
big cosmetics patch, cleanup of messages printed by mplayer and libs.
some printf->mp_msg conversion, and some debug messages moved from warn/info to v/dbg2
mplayer's output is now shorter, readable and consistent


Index: ad_mp3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_mp3.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ad_mp3.c	25 Mar 2002 22:03:33 -0000	1.2
+++ ad_mp3.c	20 May 2002 03:25:23 -0000	1.3
@@ -46,6 +46,7 @@
 #endif
   MP3_samplerate=MP3_channels=0;
   sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1);
+  if(!sh->a_buffer_len) return 0; // unsupported layer/format
   sh->channels=2; // hack
   sh->samplerate=MP3_samplerate;
   sh->i_bps=MP3_bitrate*(1000/8);

Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_audio.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dec_audio.c	12 May 2002 00:44:32 -0000	1.4
+++ dec_audio.c	20 May 2002 03:25:23 -0000	1.5
@@ -39,7 +39,7 @@
       return 0; // no such driver
   }
   
-  mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Selecting Audio Decoder: [%s] %s\n",mpadec->info->short_name,mpadec->info->name);
+  mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Opening audio decoder: [%s] %s\n",mpadec->info->short_name,mpadec->info->name);
 
   // reset in/out buffer size/pointer:
   sh_audio->a_buffer_size=0;

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- dec_video.c	5 May 2002 17:42:09 -0000	1.135
+++ dec_video.c	20 May 2002 03:25:23 -0000	1.136
@@ -60,7 +60,7 @@
       return ret;
     }
   }
-  mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Sorry, postprocessing is not available\n");
+//  mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Sorry, postprocessing is not available\n");
   return 0;
 }
 
@@ -157,7 +157,7 @@
 	    continue;
 	}
 	// it's available, let's try to init!
-	mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Opening Video Decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name);
+	mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Opening video decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name);
 	if(!mpvdec->init(sh_video)){
 	    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDecoder init failed :(\n");
 	    continue; // try next...

Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- vd.c	12 May 2002 02:18:51 -0000	1.38
+++ vd.c	20 May 2002 03:25:23 -0000	1.39
@@ -135,7 +135,7 @@
         sh->disp_h=h;
 #endif
 
-    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d, %s  \n",
+    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d (preferred csp: %s)  \n",
 	w,h,vo_format_name(preferred_outfmt));
 
 //    if(!vf) return 1; // temp hack
@@ -232,24 +232,6 @@
       mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n");
     }
   }
-
-#if 0
-  if(video_out->get_info)
-  { const vo_info_t *info = video_out->get_info();
-    mp_msg(MSGT_CPLAYER,MSGL_INFO,"VO: [%s] %dx%d => %dx%d %s %s%s%s%s\n",info->short_name,
-         sh->disp_w,sh->disp_h,
-         screen_size_x,screen_size_y,
-	 vo_format_name(out_fmt),
-         fullscreen?"fs ":"",
-         vidmode?"vm ":"",
-         softzoom?"zoom ":"",
-         (flip==1)?"flip ":"");
-    mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name);
-    mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author);
-    if(info->comment && strlen(info->comment) > 0)
-        mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment);
-  }
-#endif
 
     // Time to config libvo!
     mp_msg(MSGT_CPLAYER,MSGL_V,"video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n",

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- vf.c	13 May 2002 21:05:02 -0000	1.29
+++ vf.c	20 May 2002 03:25:23 -0000	1.30
@@ -81,7 +81,7 @@
     for(y=y0;y<y0+h;y++){
 	unsigned char* dst=mpi->planes[0]+mpi->stride[0]*y+(mpi->bpp>>3)*x0;
 	if(mpi->flags&MP_IMGFLAG_YUV){
-	    unsigned int* p=dst;
+	    unsigned int* p=(unsigned int*) dst;
 	    int size=(mpi->bpp>>3)*w/4;
 	    int i;
 	    if(mpi->flags&MP_IMGFLAG_SWAPPED){
@@ -176,7 +176,7 @@
         }
     }
     if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){
-	    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"*** [%s] %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
+	    mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
 		  vf->info->name,
 		  (mpi->type==MP_IMGTYPE_EXPORT)?"Exporting":
 	          ((mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating"),
@@ -220,6 +220,10 @@
 }
 
 vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args){
+    if(strcmp(name,"vo"))
+    mp_msg(MSGT_VFILTER,MSGL_INFO,
+	args ? "Opening video filter: [%s=%s]\n"
+	     : "Opening video filter: [%s]\n" ,name,args);
     return vf_open_plugin(filter_list,next,name,args);
 }
 
@@ -275,7 +279,7 @@
 	    return 0; // FAIL
 	}
     }
-    printf("REQ: flags=0x%X  req=0x%X  \n",flags,vf->default_reqs);
+    mp_msg(MSGT_VFILTER,MSGL_V,"REQ: flags=0x%X  req=0x%X  \n",flags,vf->default_reqs);
     miss=vf->default_reqs - (flags&vf->default_reqs);
     if(miss&VFCAP_ACCEPT_STRIDE){
 	// vf requires stride support but vf->next doesn't support it!
@@ -311,7 +315,6 @@
 	char* name=strdup(*plugin_args);
 	char* args=strchr(name,'=');
 	if(args){args[0]=0;++args;}
-	mp_msg(MSGT_VFILTER,MSGL_INFO,"Opening video filter '%s' with args '%s'...\n",name,args);
 	vf=vf_open_filter(last,name,args);
 	if(vf) last=vf;
 	free(name);

Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vf_scale.c	19 May 2002 23:39:42 -0000	1.11
+++ vf_scale.c	20 May 2002 03:25:23 -0000	1.12
@@ -56,7 +56,7 @@
     int vo_flags;
     
     if(!best){
-	printf("SwScale: no supported outfmt found :(\n");
+	mp_msg(MSGT_VFILTER,MSGL_WARN,"SwScale: no supported outfmt found :(\n");
 	return 0;
     }
     
@@ -95,7 +95,7 @@
     if(vf->priv->h<0) vf->priv->h=height; else
     if(vf->priv->h==0) vf->priv->h=d_height;
     
-    printf("SwScale scaling %dx%d %s to %dx%d %s  \n",
+    mp_msg(MSGT_VFILTER,MSGL_DBG2,"SwScale: scaling %dx%d %s to %dx%d %s  \n",
 	width,height,vo_format_name(outfmt),
 	vf->priv->w,vf->priv->h,vo_format_name(best));
 
@@ -109,7 +109,7 @@
 	    (best==IMGFMT_I420 || best==IMGFMT_IYUV)?IMGFMT_YV12:best);
     if(!vf->priv->ctx){
 	// error...
-	printf("Couldn't init SwScaler for this setup\n");
+	mp_msg(MSGT_VFILTER,MSGL_WARN,"Couldn't init SwScaler for this setup\n");
 	return 0;
     }
     vf->priv->fmt=best;
@@ -184,7 +184,7 @@
     if(args) sscanf(args, "%d:%d",
     &vf->priv->w,
     &vf->priv->h);
-    printf("SwScale: %d x %d (-1=no scaling)\n",
+    mp_msg(MSGT_VFILTER,MSGL_V,"SwScale params: %d x %d (-1=no scaling)\n",
     vf->priv->w,
     vf->priv->h);
     return 1;

Index: vf_vo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_vo.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_vo.c	26 Apr 2002 23:18:06 -0000	1.9
+++ vf_vo.c	20 May 2002 03:25:23 -0000	1.10
@@ -24,10 +24,10 @@
          width, height,
          d_width, d_height,
 	 vo_format_name(outfmt),
-         (flags&1)?"fs ":"",
-         (flags&2)?"vm ":"",
-         (flags&4)?"zoom ":"",
-         (flags&8)?"flip ":"");
+         (flags&1)?" [fs]":"",
+         (flags&2)?" [vm]":"",
+         (flags&4)?" [zoom]":"",
+         (flags&8)?" [flip]":"");
     mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name);
     mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author);
     if(info->comment && strlen(info->comment) > 0)




More information about the MPlayer-cvslog mailing list