Ticket #1459: mplayer-quiet-time-2010-06.patch
| File mplayer-quiet-time-2010-06.patch, 4.0 KB (added by , 15 years ago) |
|---|
-
stream/cache2.c
143 143 144 144 newb=s->max_filepos-s->read_filepos; // new bytes in the buffer 145 145 if(newb<min_fill) min_fill=newb; // statistics... 146 //if(newb<min_fill) min_fill=newb; // buffer underrun, rebuffer... 146 147 147 148 // printf("*** newb: %d bytes ***\n",newb); 148 149 -
DOCS/man/en/mplayer.1
746 746 handle carriage return (i.e.\& \\r). 747 747 . 748 748 .TP 749 .B "\-quiet-time <n>\ " 750 Reduce console output updates to n per tenth of a second. 751 Values of 5 or more work around slow terminals. 752 See \-quiet for more. 753 . 754 .TP 749 755 .B \-priority <prio> (Windows and OS/2 only) 750 756 Set process priority for MPlayer according to the predefined 751 757 priorities available under Windows and OS/2. -
mplayer.c
98 98 int slave_mode=0; 99 99 int player_idle_mode=0; 100 100 int quiet=0; 101 int quiet_time=0; 101 102 int enable_mouse_movements=0; 102 103 float start_volume = -1; 103 104 … … 2077 2078 2078 2079 static void adjust_sync_and_print_status(int between_frames, float timing_error) 2079 2080 { 2081 static unsigned last_status_update=0; 2082 unsigned now=GetTimerMS(); 2083 if (quiet_time && now >= (last_status_update + quiet_time * 100)) 2084 last_status_update=now; 2085 2080 2086 current_module="av_sync"; 2081 2087 2082 2088 if(mpctx->sh_audio){ 2083 2089 double a_pts, v_pts; 2084 2090 … … 2128 2134 c_total+=x; 2129 2135 } 2130 2136 if(!quiet) 2131 print_status(a_pts - audio_delay, AV_delay, c_total); 2137 if (!quiet_time || (last_status_update == now)) 2138 print_status(a_pts - audio_delay, AV_delay, c_total); 2132 2139 } 2133 2140 2134 2141 } else { 2135 2142 // No audio: 2136 2143 2137 2144 if (!quiet) 2138 print_status(0, 0, 0); 2145 if (!quiet_time || (last_status_update == now)) 2146 print_status(0, 0, 0); 2139 2147 } 2140 2148 } 2141 2149 -
cfg-common.h
300 300 {"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, 301 301 {"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, 302 302 {"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL}, 303 {"quiet-time", &quiet_time, CONF_TYPE_INT, CONF_RANGE, 0, 65536, NULL}, 303 304 {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL}, 304 305 {"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, 305 306 {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, -
mencoder.c
139 139 140 140 int out_file_format=MUXER_TYPE_AVI; // default to AVI 141 141 int quiet=0; 142 int quiet_time=0; 142 143 double video_time_usage=0; 143 144 double vout_time_usage=0; 144 145 double max_video_time_usage=0; … … 1639 1640 / (float)(sh_audio->audio.dwLength); 1640 1641 } 1641 1642 #endif 1643 static unsigned last_status_update=0; 1644 unsigned now=GetTimerMS(); 1645 if (quiet_time && now >= (last_status_update + quiet_time * 100)) 1646 last_status_update=now; 1647 1642 1648 if(!quiet) { 1643 1649 if( mp_msg_test(MSGT_STATUSLINE,MSGL_V) ) { 1650 if (!quiet_time || (last_status_update == now)) 1644 1651 mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d] A/Vms %d/%d D/B/S %d/%d/%d \r", 1645 1652 mux_v->timer, decoded_frameno, (int)(p*100), 1646 1653 (t>1) ? (int)(decoded_frameno/t+0.5) : 0, … … 1653 1660 duplicatedframes, badframes, skippedframes 1654 1661 ); 1655 1662 } else 1663 if (!quiet_time || (last_status_update == now)) 1656 1664 mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %5.2ffps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d]\r", 1657 1665 mux_v->timer, decoded_frameno, (int)(p*100), 1658 1666 (t>1) ? (float)(decoded_frameno/t) : 0,
