[Mplayer-cvslog] CVS: main mencoder.c,1.94,1.95 mp_msg.c,1.9,1.10

Nick Kurshev nick at mplayer.dev.hu
Thu Feb 28 09:26:30 CET 2002


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

Modified Files:
	mencoder.c mp_msg.c 
Log Message:
Use stdout as default mencoder's output if no filename specified

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- mencoder.c	24 Feb 2002 17:10:06 -0000	1.94
+++ mencoder.c	28 Feb 2002 08:26:20 -0000	1.95
@@ -168,7 +168,7 @@
 
 int force_srate=0;
 
-char* out_filename="test.avi";
+char* out_filename=NULL;/*"test.avi"*/
 char* mp3_filename=NULL;
 char* ac3_filename=NULL;
 
@@ -234,9 +234,9 @@
 void mencoder_exit(int level, char *how)
 {
     if (how)
-	printf("Exiting... (%s)\n", how);
+	fprintf(stderr,"Exiting... (%s)\n", how);
     else
-	printf("Exiting...\n");
+	fprintf(stderr,"Exiting...\n");
 
     exit(level);
 }
@@ -262,7 +262,7 @@
 
 static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h, int x0,int y0){
   int y;
-//  printf("draw_slice %dx%d %d;%d\n",w,h,x0,y0);
+//  fprintf(stderr,"draw_slice %dx%d %d;%d\n",w,h,x0,y0);
   if(scale_srcW || scale_srcH)
   {
       uint8_t* dstPtr[3]= {
@@ -298,7 +298,7 @@
 }
 
 static uint32_t draw_frame(uint8_t *src[]){
-  // printf("This function shouldn't be called - report bug!\n");
+  // fprintf(stderr,"This function shouldn't be called - report bug!\n");
   // later: add YUY2->YV12 conversion here!
   vo_image_ptr=src[0];
   return(0);
@@ -442,7 +442,7 @@
   stream2=open_stream(frameno_filename,0,&i);
   if(stream2){
     demuxer2=demux_open(stream2,DEMUXER_TYPE_AVI,-1,-1,-2);
-    if(demuxer2) printf("Using pass3 control file: %s\n",frameno_filename);
+    if(demuxer2) fprintf(stderr,"Using pass3 control file: %s\n",frameno_filename);
   }
 
   playtree = play_tree_new();
@@ -465,7 +465,7 @@
   }
 
   if(!filename && !vcd_track && !dvd_title && !tv_param_on){
-	printf("\nMissing filename!\n\n");
+	fprintf(stderr,"\nMissing filename!\n\n");
 	mencoder_exit(1,NULL);
   }
 
@@ -474,11 +474,11 @@
   stream=open_stream(filename,vcd_track,&file_format);
 
   if(!stream){
-	printf("Cannot open file/device\n");
+	fprintf(stderr,"Cannot open file/device\n");
 	mencoder_exit(1,NULL);
   }
 
-  printf("success: format: %d  data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos));
+  fprintf(stderr,"success: format: %d  data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos));
 
   if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0);
 
@@ -506,7 +506,7 @@
   //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id);
   demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id);
   if(!demuxer){
-	printf("Cannot open demuxer\n");
+	fprintf(stderr,"Cannot open demuxer\n");
 	mencoder_exit(1,NULL);
   }
 
@@ -517,7 +517,7 @@
 sh_video=d_video->sh;
 
   if(!video_read_properties(sh_video)){
-      printf("Couldn't read video properties\n");
+      fprintf(stderr,"Couldn't read video properties\n");
       mencoder_exit(1,NULL);
   }
 
@@ -554,7 +554,7 @@
     else if(video_family!=-1 && sh_video->codec->driver!=video_family) continue;
     else if(video_family==-1 && !video_codec && sh_video->codec->priority) {
 	    if(sh_video->codec->priority > bestprio) {
-        //printf("\n\n!!! setting bestprio from %d to %d for %s!!!\n\n", bestprio, sh_video->codec->priority, sh_video->codec->name);
+        //fprintf(stderr,"\n\n!!! setting bestprio from %d to %d for %s!!!\n\n", bestprio, sh_video->codec->priority, sh_video->codec->name);
         bestprio=sh_video->codec->priority;
         bestcodec=sh_video->codec;
       }
@@ -564,7 +564,7 @@
   break;
 }
 if(bestprio!=-1) {
-  //printf("chose codec %s by priority.\n", bestcodec->name);
+  //fprintf(stderr,"chose codec %s by priority.\n", bestcodec->name);
   sh_video->codec=bestcodec;
 }
 
@@ -680,11 +680,15 @@
 #endif
 
 // set up output file:
+if(out_filename)
+{
 muxer_f=fopen(out_filename,"wb");
 if(!muxer_f) {
-  printf("Cannot open output file '%s'\n", out_filename);
+  fprintf(stderr,"Cannot open output file '%s'\n", out_filename);
   mencoder_exit(1,NULL);
 }
+}
+else muxer_f=stdout;
 
 muxer=aviwrite_new_muxer();
 
@@ -718,7 +722,7 @@
 	mux_v->bih->biBitCount=24; // FIXME!!!
 	mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
     }
-    printf("videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n",
+    fprintf(stderr,"videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n",
 	mux_v->bih->biWidth, mux_v->bih->biHeight,
 	mux_v->bih->biBitCount, mux_v->bih->biCompression);
     break;
@@ -737,7 +741,7 @@
 	mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
     }
     mux_v->bih->biCompression=0;
-    printf("videocodec: raw (%dx%d %dbpp fourcc=%x)\n",
+    fprintf(stderr,"videocodec: raw (%dx%d %dbpp fourcc=%x)\n",
 	mux_v->bih->biWidth, mux_v->bih->biHeight,
 	mux_v->bih->biBitCount, mux_v->bih->biCompression);
     break;
@@ -762,7 +766,7 @@
         mux_v->bih->biBitCount = 24;
 
 	mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
-    printf("videocodec: rawrgb (%dx%d %dbpp fourcc=%x)\n",
+    fprintf(stderr,"videocodec: rawrgb (%dx%d %dbpp fourcc=%x)\n",
 	mux_v->bih->biWidth, mux_v->bih->biHeight,
 	mux_v->bih->biBitCount, mux_v->bih->biCompression);
     break;
@@ -781,7 +785,7 @@
 #if 0
     if (!vfw_codecname)
     {
-	printf("No vfw/dshow codec specified! It's requested!\n");
+	fprintf(stderr,"No vfw/dshow codec specified! It's requested!\n");
 	mencoder_exit(1, NULL);
     }
 #endif
@@ -797,7 +801,7 @@
     mux_v->bih=vfw_open_encoder("AvidAVICodec.dll",vfw_bih, 0);
     break;
 #else
-    printf("No support for Win32/VfW codecs compiled in\n");
+    fprintf(stderr,"No support for Win32/VfW codecs compiled in\n");
     mencoder_exit(1,NULL);
 #endif
 case VCODEC_NULL:
@@ -812,7 +816,7 @@
     break;
 case VCODEC_DIVX4:
 #ifndef HAVE_DIVX4ENCORE
-    printf("No support for Divx4 encore compiled in\n");
+    fprintf(stderr,"No support for Divx4 encore compiled in\n");
     mencoder_exit(1,NULL);
 #else
     mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
@@ -825,12 +829,12 @@
     mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
 
     if (pass)
-	printf("Divx: 2-pass logfile: %s\n", passtmpfile);
+	fprintf(stderr,"Divx: 2-pass logfile: %s\n", passtmpfile);
     break;
 #endif
 case VCODEC_LIBAVCODEC:
 #ifndef USE_LIBAVCODEC
-    printf("No support for FFmpeg's libavcodec compiled in\n");
+    fprintf(stderr,"No support for FFmpeg's libavcodec compiled in\n");
     mencoder_exit(1,NULL);
 #else
     mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
@@ -841,7 +845,7 @@
     mux_v->bih->biBitCount=24;
     if (!lavc_param_vcodec)
     {
-	printf("No libavcodec codec specified! It's requested!\n");
+	fprintf(stderr,"No libavcodec codec specified! It's requested!\n");
 	mencoder_exit(1,NULL);
     }
     else
@@ -877,7 +881,7 @@
     }
     mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
 
-    printf("videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
+    fprintf(stderr,"videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
 	mux_v->bih->biWidth, mux_v->bih->biHeight, mux_v->bih->biCompression,
 	    (char *)&mux_v->bih->biCompression);
 #endif
@@ -888,7 +892,7 @@
 {
     mux_v->bih->biCompression = mmioFOURCC(force_fourcc[0], force_fourcc[1],
 					    force_fourcc[2], force_fourcc[3]);
-    printf("Forcing output fourcc to %x [%.4s]\n",
+    fprintf(stderr,"Forcing output fourcc to %x [%.4s]\n",
 	mux_v->bih->biCompression, (char *)&mux_v->bih->biCompression);
 }
 
@@ -930,12 +934,12 @@
 	mux_a->h.dwScale=mux_a->h.dwSampleSize;
 	mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
     }
-    printf("audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d bps=%d sample=%d)\n",
+    fprintf(stderr,"audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d bps=%d sample=%d)\n",
 	mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec,
 	mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize);
     break;
 case ACODEC_PCM:
-    printf("CBR PCM audio selected\n");
+    fprintf(stderr,"CBR PCM audio selected\n");
     mux_a->h.dwSampleSize=2*sh_audio->channels;
     mux_a->h.dwScale=1;
     mux_a->h.dwRate=sh_audio->samplerate;
@@ -949,7 +953,7 @@
     mux_a->wf->cbSize=0; // FIXME for l3codeca.acm
     break;
 case ACODEC_VBRMP3:
-    printf("MP3 audio selected\n");
+    fprintf(stderr,"MP3 audio selected\n");
     mux_a->h.dwSampleSize=0; // VBR
     mux_a->h.dwScale=1152; // samples/frame
     mux_a->h.dwRate=sh_audio->samplerate;
@@ -972,7 +976,7 @@
 }
 }
 
-printf("Writing AVI header...\n");
+fprintf(stderr,"Writing AVI header...\n");
 aviwrite_write_header(muxer,muxer_f);
 
 switch(mux_v->codec){
@@ -986,7 +990,7 @@
     break;
 case VCODEC_DIVX4:
 #ifndef HAVE_DIVX4ENCORE
-    printf("No support for Divx4 encore compiled in\n");
+    fprintf(stderr,"No support for Divx4 encore compiled in\n");
     mencoder_exit(1,NULL);
 #else
     // init divx4linux:
@@ -1017,7 +1021,7 @@
     case 1:
 	if (VbrControl_init_2pass_vbr_analysis(passtmpfile, divx4_param.quality) == -1)
 	{
-	    printf("2pass failed: filename=%s\n", passtmpfile);
+	    fprintf(stderr,"2pass failed: filename=%s\n", passtmpfile);
 	    pass_working = 0;
 	}
 	else
@@ -1030,7 +1034,7 @@
 					 divx4_crispness,
 					 divx4_param.quality) == -1)
 	{
-	    printf("2pass failed: filename=%s\n", passtmpfile);
+	    fprintf(stderr,"2pass failed: filename=%s\n", passtmpfile);
 	    pass_working = 0;
 	}
 	else
@@ -1041,7 +1045,7 @@
 #endif
 case VCODEC_LIBAVCODEC:
 #ifndef USE_LIBAVCODEC
-    printf("No support for FFmpeg's libavcodec compiled in\n");
+    fprintf(stderr,"No support for FFmpeg's libavcodec compiled in\n");
 #else
     if (!avcodec_inited)
     {
@@ -1096,7 +1100,7 @@
     /* ignored by libavcodec? */
     if (lavc_param_vhq)
     {
-	printf("High quality encoding selected (non real time)!\n");
+	fprintf(stderr,"High quality encoding selected (non real time)!\n");
 	lavc_venc_context.flags = CODEC_FLAG_HQ;
     }
     else
@@ -1110,7 +1114,7 @@
     /* fixed qscale :p */
     if (lavc_param_vqscale)
     {
-	printf("Using constant qscale = %d (VBR)\n", lavc_param_vqscale);
+	fprintf(stderr,"Using constant qscale = %d (VBR)\n", lavc_param_vqscale);
 	lavc_venc_context.flags |= CODEC_FLAG_QSCALE;
 	lavc_venc_context.quality = lavc_param_vqscale;
     }
@@ -1123,14 +1127,14 @@
 
     if (lavc_venc_context.codec->encode == NULL)
     {
-	printf("avcodec init failed (ctx->codec->encode == NULL)!\n");
+	fprintf(stderr,"avcodec init failed (ctx->codec->encode == NULL)!\n");
 	mencoder_exit(1,NULL);
     }
 
 #if 1
     if (out_fmt != IMGFMT_YV12 && out_fmt != IMGFMT_I420 && out_fmt != IMGFMT_IYUV)
     {
-        printf("Not supported image format! (%s)\n",
+        fprintf(stderr,"Not supported image format! (%s)\n",
     	    vo_format_name(out_fmt));
 	mencoder_exit(1,NULL);
     }
@@ -1173,16 +1177,16 @@
 	    break;
 #endif
 	default:
-	    printf("Not supported image format! (%s)\n",
+	    fprintf(stderr,"Not supported image format! (%s)\n",
 		vo_format_name(out_fmt));
 	    mencoder_exit(1,NULL);
     }
 
-    printf("Using picture format: %s\n", vo_format_name(out_fmt));
+    fprintf(stderr,"Using picture format: %s\n", vo_format_name(out_fmt));
 
     memset(&lavc_venc_picture, 0, sizeof(lavc_venc_picture));
     
-    printf("ahh: avpict_getsize=%d, vo_image_ptr=%d\n", avpicture_get_size(lavc_venc_context.pix_fmt,
+    fprintf(stderr,"ahh: avpict_getsize=%d, vo_image_ptr=%d\n", avpicture_get_size(lavc_venc_context.pix_fmt,
 	lavc_venc_context.width, lavc_venc_context.height),
 	vo_h*vo_w*3/2);
     
@@ -1194,7 +1198,7 @@
 	char buf[1024];
 	
 	avcodec_string((char *)&buf[0], 1023, &lavc_venc_context, 1);
-	printf("%s\n", buf);
+	fprintf(stderr,"%s\n", buf);
     }
 #endif
 
@@ -1291,7 +1295,7 @@
 	    switch(mux_a->codec){
 	    case ACODEC_COPY: // copy
 		len=ds_get_packet(sh_audio->ds,(unsigned char**) &mux_a->buffer);
-//		printf("VBR audio framecopy not yet implemented!\n");
+//		fprintf(stderr,"VBR audio framecopy not yet implemented!\n");
 		break;
 #ifdef HAVE_MP3LAME
 	    case ACODEC_VBRMP3:
@@ -1307,7 +1311,7 @@
 		}
 		if(mux_a->buffer_len<4) break;
 		len=mp_decode_mp3_header(mux_a->buffer);
-		//printf("%d\n",len);
+		//fprintf(stderr,"%d\n",len);
 		if(len<=0) break; // bad frame!
 		while(mux_a->buffer_len<len){
 		  unsigned char tmp[2304];
@@ -1351,7 +1355,7 @@
 	    if(len==4) next_frameno=start[0];
 	}
     if(eof) break;
-	if(skip_flag) printf("!!!!!!!!!!!!\n");
+	if(skip_flag) fprintf(stderr,"!!!!!!!!!!!!\n");
 	skip_flag=next_frameno-decoded_frameno;
     // find next frame:
 	while(next_frameno<=decoded_frameno){
@@ -1362,7 +1366,7 @@
 	    if(len==4) next_frameno=start[0];
 	}
 //    if(eof) break;
-//	    printf("Current fno=%d  requested=%d  skip=%d  \n",decoded_frameno,fno,skip_flag);
+//	    fprintf(stderr,"Current fno=%d  requested=%d  skip=%d  \n",decoded_frameno,fno,skip_flag);
 } else {
 
 // check frame duplicate/drop:
@@ -1490,14 +1494,14 @@
     }
     flip_upside_down(vo_image_ptr,vo_image_ptr,3*vo_w,vo_h); // dirty hack
     ret=vfw_encode_frame(mux_v->bih, mux_v->buffer, vfw_bih, vo_image_ptr, &flags, 10000);
-//    printf("vfw_encode_frame -> %d  (size=%d,flag=%X)\n",ret,mux_v->bih->biSizeImage,flags);
+//    fprintf(stderr,"vfw_encode_frame -> %d  (size=%d,flag=%X)\n",ret,mux_v->bih->biSizeImage,flags);
     aviwrite_write_chunk(muxer,mux_v,muxer_f,mux_v->bih->biSizeImage,flags);
     break;
 }
 #endif
 case VCODEC_DIVX4:
 #ifndef HAVE_DIVX4ENCORE
-    printf("No support for Divx4 encore compiled in\n");
+    fprintf(stderr,"No support for Divx4 encore compiled in\n");
     mencoder_exit(1,NULL);
 #else
     blit_frame=decode_video(&video_out,sh_video,start,in_size,0);
@@ -1532,15 +1536,15 @@
 	}
     }
     
-//    printf("encoding...\n");
-//    printf("  len=%d  key:%d  qualt:%d  \n",enc_frame.length,enc_result.is_key_frame,enc_result.quantizer);
+//    fprintf(stderr,"encoding...\n");
+//    fprintf(stderr,"  len=%d  key:%d  qualt:%d  \n",enc_frame.length,enc_result.is_key_frame,enc_result.quantizer);
     aviwrite_write_chunk(muxer,mux_v,muxer_f,enc_frame.length,enc_result.is_key_frame?0x10:0);
     break;
 #endif
 case VCODEC_LIBAVCODEC:
     {
 #ifndef USE_LIBAVCODEC
-	printf("No support for FFmpeg's libavcodec compiled in\n");
+	fprintf(stderr,"No support for FFmpeg's libavcodec compiled in\n");
 #else
 	int out_size;
 
@@ -1561,7 +1565,7 @@
 
 if(skip_flag<0){
     // duplicate frame
-    printf("\nduplicate %d frame(s)!!!    \n",-skip_flag);
+    fprintf(stderr,"\nduplicate %d frame(s)!!!    \n",-skip_flag);
     while(skip_flag<0){
 	aviwrite_write_chunk(muxer,mux_v,muxer_f,0,0);
 	++skip_flag;
@@ -1569,7 +1573,7 @@
 } else
 if(skip_flag>0){
     // skip frame
-    printf("\nskip frame!!!    \n");
+    fprintf(stderr,"\nskip frame!!!    \n");
     --skip_flag;
 }
 
@@ -1580,14 +1584,14 @@
         unsigned int samples=(sh_audio->audio.dwSampleSize)?
           ((ds_tell(d_audio)-sh_audio->a_in_buffer_len)/sh_audio->audio.dwSampleSize) :
           (d_audio->pack_no); // <- used for VBR audio
-//	printf("samples=%d  \n",samples);
+//	fprintf(stderr,"samples=%d  \n",samples);
         a_pts=samples*(float)sh_audio->audio.dwScale/(float)sh_audio->audio.dwRate;
       delay_corrected=1;
     } else {
       // PTS = (last timestamp) + (bytes after last timestamp)/(bytes per sec)
       a_pts=d_audio->pts;
       if(!delay_corrected) if(a_pts) delay_corrected=1;
-      //printf("*** %5.3f ***\n",a_pts);
+      //fprintf(stderr,"*** %5.3f ***\n",a_pts);
       a_pts+=(ds_tell_pts(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
     }
     v_pts=d_video->pts;
@@ -1606,11 +1610,11 @@
 	v_pts_corr+=x;
 }
 
-//    printf("A:%6.1f V:%6.1f A-V:%7.3f oAV:%7.3f diff:%7.3f ct:%7.3f vpc:%7.3f   \r",
+//    fprintf(stderr,"A:%6.1f V:%6.1f A-V:%7.3f oAV:%7.3f diff:%7.3f ct:%7.3f vpc:%7.3f   \r",
 //	a_pts,v_pts,a_pts-v_pts,
 //	(float)(mux_a->timer-mux_v->timer),
 //	AV_delay, c_total, v_pts_corr );
-//    printf("V:%6.1f \r", d_video->pts );
+//    fprintf(stderr,"V:%6.1f \r", d_video->pts );
 
 #if 0
     mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f  %3d/%3d  %2d%% %2d%% %4.1f%%  %d%%\r",
@@ -1660,7 +1664,7 @@
     mux_a->h.dwSampleSize=1;
     mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
     mux_a->h.dwScale=1;
-    printf("\n\nCBR audio effective bitrate: %8.3f kbit/s  (%d bytes/sec)\n",
+    fprintf(stderr,"\n\nCBR audio effective bitrate: %8.3f kbit/s  (%d bytes/sec)\n",
 	    mux_a->h.dwRate*8.0f/1000.0f,mux_a->h.dwRate);
 }
 #endif
@@ -1670,24 +1674,24 @@
 	avcodec_close(&lavc_venc_context);
 #endif
 
-printf("\nWriting AVI index...\n");
+fprintf(stderr,"\nWriting AVI index...\n");
 aviwrite_write_index(muxer,muxer_f);
 muxer_f_size=ftell(muxer_f);
-printf("Fixup AVI header...\n");
+fprintf(stderr,"Fixup AVI header...\n");
 fseek(muxer_f,0,SEEK_SET);
 aviwrite_write_header(muxer,muxer_f); // update header
 fclose(muxer_f);
 
 if(out_video_codec==VCODEC_FRAMENO && mux_v->timer>100){
-    printf("Recommended video bitrate for 650MB CD: %d\n",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf("Recommended video bitrate for 700MB CD: %d\n",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
-    printf("Recommended video bitrate for 800MB CD: %d\n",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
+    fprintf(stderr,"Recommended video bitrate for 650MB CD: %d\n",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
+    fprintf(stderr,"Recommended video bitrate for 700MB CD: %d\n",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
+    fprintf(stderr,"Recommended video bitrate for 800MB CD: %d\n",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
 }
 
-printf("\nVideo stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs  %d frames\n",
+fprintf(stderr,"\nVideo stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs  %d frames\n",
     (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer, decoded_frameno);
 if(sh_audio)
-printf("\nAudio stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs\n",
+fprintf(stderr,"\nAudio stream: %8.3f kbit/s  (%d bps)  size: %d bytes  %5.3f secs\n",
     (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), mux_a->size, (float)mux_a->timer);
 
 if(stream) free_stream(stream); // kill cache thread

Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mp_msg.c	15 Jan 2002 17:03:18 -0000	1.9
+++ mp_msg.c	28 Feb 2002 08:26:20 -0000	1.10
@@ -44,12 +44,12 @@
               gtkMessageBox( GTK_MB_ERROR|GTK_MB_SIMPLE,tmp );
        	   break;
        case MSGL_WARN:
-              printf( "%s",tmp );
+              fprintf( stderr, "%s",tmp );
 	      fflush(stdout);
               gtkMessageBox( GTK_MB_WARNING|GTK_MB_SIMPLE,tmp );
        	   break;
        default:
-              printf( "%s",tmp );
+              fprintf(stderr, "%s",tmp );
 	      fflush(stdout);
       }
     } else
@@ -60,7 +60,7 @@
       fflush(stderr);
     } else {
 //	printf("%%%%%% ");
-      vprintf(format, va);
+      vfprintf(stderr,format, va);
       fflush(stdout);
     }
     va_end(va);




More information about the MPlayer-cvslog mailing list