1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

* changes mencoder's exit code on explicit kill to 2

* add quiet/noquiet to mencoder
* dont depend targets on themselfs
patch by Oswald Buddenhagen <ossi@kde.org>
additionaly moved quiet/noquiet and v/verbose to cfg-common.h


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11876 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
attila 2004-01-29 12:01:26 +00:00
parent 0a71883da4
commit 333832e130
6 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,11 @@
#ifdef MAIN_CONF /* this will be included in conf[] */
// ------------------------- common optionss --------------------
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
// ------------------------- stream options --------------------
#ifdef USE_STREAM_CACHE
@ -266,6 +272,9 @@
#include "config.h"
extern int quiet;
extern int verbose;
// codec/filter opts: (defiend at libmpcodecs/vd.c)
extern float screen_size_xy;
extern float movie_aspect;

View File

@ -230,9 +230,6 @@ m_option_t mencoder_opts[]={
#include "cfg-common.h"
#undef MAIN_CONF
// {"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL},
// {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
// {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
// {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},

View File

@ -420,11 +420,7 @@ m_option_t mplayer_opts[]={
#undef MAIN_CONF
{"identify", &identify, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
{"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL, 0, -10, NULL},
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},

View File

@ -27,7 +27,7 @@ clean:
distclean: clean
.c.o: $@
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $<
libloader.a: $(LIB_OBJECTS) stubs.s

View File

@ -129,6 +129,7 @@ int out_file_format=MUXER_TYPE_AVI; // default to AVI
//void resync_audio_stream(sh_audio_t *sh_audio){}
int verbose=0; // must be global!
int quiet=0;
double video_time_usage=0;
double vout_time_usage=0;
double max_video_time_usage=0;
@ -317,7 +318,7 @@ static double end_at;
static void exit_sighandler(int x){
at_eof=1;
interrupted=1;
interrupted=2; /* 1 means error */
}
static muxer_t* muxer=NULL;
@ -1376,6 +1377,7 @@ if(sh_audio && !demuxer2){
(int)demuxer->filepos,
(int)demuxer->movi_end);
#else
if(!quiet) {
if(verbose>0) {
mp_msg(MSGT_AVSYNC,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",
mux_v->timer, decoded_frameno, (int)(p*100),
@ -1398,6 +1400,7 @@ if(sh_audio && !demuxer2){
(mux_v->timer>1) ? (int)(mux_v->size/mux_v->timer/125) : 0,
(mux_a && mux_a->timer>1) ? (int)(mux_a->size/mux_a->timer/125) : 0
);
}
#endif
}
fflush(stdout);

View File

@ -82,7 +82,7 @@ extern int mp_input_win32_slave_cmd_func(int fd,char* dest,int size);
int slave_mode=0;
int verbose=0;
int identify=0;
static int quiet=0;
int quiet=0;
#define ABS(x) (((x)>=0)?(x):(-(x)))
#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))