# HG changeset patch # User alex # Date 1016231157 0 # Node ID 70fb281bb13ccbda86cb41029e7764fd19c56c10 # Parent 1514c5d060d593cdfc488b8699d1b0bd5c339971 changed printf's to mp_msg diff -r 1514c5d060d5 -r 70fb281bb13c mplayer.c --- a/mplayer.c Fri Mar 15 22:16:56 2002 +0000 +++ b/mplayer.c Fri Mar 15 22:25:57 2002 +0000 @@ -16,6 +16,8 @@ #include #include +#include + #include "version.h" #include "config.h" @@ -577,7 +579,7 @@ #endif if(video_driver && strcmp(video_driver,"help")==0){ - printf("Available video output drivers:\n"); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Available video output drivers:\n"); i=0; while (video_out_drivers[i]) { const vo_info_t *info = video_out_drivers[i++]->get_info (); @@ -588,7 +590,7 @@ } if(audio_driver && strcmp(audio_driver,"help")==0){ - printf("Available audio output drivers:\n"); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Available audio output drivers:\n"); i=0; while (audio_out_drivers[i]) { const ao_info_t *info = audio_out_drivers[i++]->info; @@ -611,13 +613,13 @@ } if(audio_codec && strcmp(audio_codec,"help")==0){ - printf("Available audio codecs:\n"); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Available audio codecs:\n"); list_codecs(1); printf("\n"); exit(0); } if(video_codec && strcmp(video_codec,"help")==0){ - printf("Available video codecs:\n"); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Available video codecs:\n"); list_codecs(0); printf("\n"); exit(0); @@ -627,14 +629,14 @@ if(!filename && !vcd_track && !dvd_title && !tv_param_on){ if(!use_gui){ // no file/vcd/dvd -> show HELP: - printf("%s",help_text); + mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); exit(0); } else gui_no_filename=1; } // Many users forget to include command line in bugreports... if(verbose){ - printf("CommandLine:"); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "CommandLine:"); for(i=1;i (frame_time + time_frame_corr_avg) * UNEXP_CORR_WARN || SH_AV_delay - time_frame < (frame_time + time_frame_corr_avg) * -UNEXP_CORR_WARN) - printf ("WARNING: A-V SYNC LAG TOO LARGE: %.3f {%.3f - %.3f} (too little UNEXP_CORR_MAX?)\n", + mp_msg(MSGT_AVSYNC, MSGL_WARN, "WARNING: A-V SYNC LAG TOO LARGE: %.3f {%.3f - %.3f} (too little UNEXP_CORR_MAX?)\n", SH_AV_delay - time_frame, SH_AV_delay, time_frame); time_frame += (frame_time + time_frame_corr_avg) * ((SH_AV_delay > time_frame) ? UNEXP_CORR_MAX : -UNEXP_CORR_MAX); @@ -1707,7 +1709,7 @@ while (time_frame > 0.000) { unsigned long long rtc_ts; if (read (rtc_fd, &rtc_ts, sizeof(rtc_ts)) <= 0) - perror ("read (rtc_fd)"); + mp_msg(MSGT_CPLAYER, MSGL_ERR, "Linux RTC read error: %s\n", strerror(errno)); time_frame-=GetRelativeTime(); } } else @@ -1723,7 +1725,7 @@ time_frame-=GetRelativeTime(); } if(softsleep){ - if(time_frame<0) printf("Warning! softsleep underflow!\n"); + if(time_frame<0) mp_msg(MSGT_AVSYNC, MSGL_WARN, "Warning! Softsleep underflow!\n"); while(time_frame>0) time_frame-=GetRelativeTime(); // burn the CPU } } @@ -2157,7 +2159,7 @@ case '8': rel_seek_secs=0.99*(float)(c-'1')/7.0; abs_seek_pos=3; - printf("ABS seek to %5.3f \n",rel_seek_secs); + printf ("ABS seek to %5.3f \n",rel_seek_secs); break; #else /* User wants to have screen shot */ @@ -2532,7 +2534,7 @@ if ( ( use_gui )&&( cmd->id > MP_CMD_GUI_EVENTS ) ) guiGetEvent( guiIEvent,(char *)cmd->id ); else #endif - printf("Received unknow cmd %s\n",cmd->name); + mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknow cmd %s\n",cmd->name); } } mp_cmd_free(cmd);