Mercurial > mplayer.hg
changeset 11875:6b28eb95c08b
* 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
author | attila |
---|---|
date | Thu, 29 Jan 2004 12:01:26 +0000 |
parents | 3f6cecc44fc7 |
children | f531170db832 |
files | cfg-common.h cfg-mencoder.h cfg-mplayer.h loader/Makefile mencoder.c mplayer.c |
diffstat | 6 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-common.h Thu Jan 29 11:04:35 2004 +0000 +++ b/cfg-common.h Thu Jan 29 12:01:26 2004 +0000 @@ -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;
--- a/cfg-mencoder.h Thu Jan 29 11:04:35 2004 +0000 +++ b/cfg-mencoder.h Thu Jan 29 12:01:26 2004 +0000 @@ -230,9 +230,6 @@ #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},
--- a/cfg-mplayer.h Thu Jan 29 11:04:35 2004 +0000 +++ b/cfg-mplayer.h Thu Jan 29 12:01:26 2004 +0000 @@ -420,11 +420,7 @@ #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},
--- a/loader/Makefile Thu Jan 29 11:04:35 2004 +0000 +++ b/loader/Makefile Thu Jan 29 12:01:26 2004 +0000 @@ -27,7 +27,7 @@ distclean: clean -.c.o: $@ +.c.o: $(CC) $(CFLAGS) $(DEFINES) -c $< libloader.a: $(LIB_OBJECTS) stubs.s
--- a/mencoder.c Thu Jan 29 11:04:35 2004 +0000 +++ b/mencoder.c Thu Jan 29 12:01:26 2004 +0000 @@ -129,6 +129,7 @@ //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 void exit_sighandler(int x){ at_eof=1; - interrupted=1; + interrupted=2; /* 1 means error */ } static muxer_t* muxer=NULL; @@ -1376,6 +1377,7 @@ (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 @@ (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);