diff options
author | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-29 12:01:26 +0000 |
---|---|---|
committer | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-29 12:01:26 +0000 |
commit | 333832e130e01e62b7534e9e2edd485bfb884368 (patch) | |
tree | 0eb52d34ab241b8d83eb0300d190a49a826accd8 | |
parent | 0a71883da42de1e710d4e7818362dde11c3a8909 (diff) |
* 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
-rw-r--r-- | cfg-common.h | 9 | ||||
-rw-r--r-- | cfg-mencoder.h | 3 | ||||
-rw-r--r-- | cfg-mplayer.h | 4 | ||||
-rw-r--r-- | loader/Makefile | 2 | ||||
-rw-r--r-- | mencoder.c | 5 | ||||
-rw-r--r-- | mplayer.c | 2 |
6 files changed, 15 insertions, 10 deletions
diff --git a/cfg-common.h b/cfg-common.h index a1dbafc31b..0ef98d971c 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -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; diff --git a/cfg-mencoder.h b/cfg-mencoder.h index 7f625b6794..d542407535 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -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}, diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 76b60bcdbb..25171f97f5 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -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}, diff --git a/loader/Makefile b/loader/Makefile index b806eec9e2..ebf576c89d 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -27,7 +27,7 @@ clean: distclean: clean -.c.o: $@ +.c.o: $(CC) $(CFLAGS) $(DEFINES) -c $< libloader.a: $(LIB_OBJECTS) stubs.s diff --git a/mencoder.c b/mencoder.c index 0bfe7ace97..c376a83f01 100644 --- a/mencoder.c +++ b/mencoder.c @@ -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); @@ -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)) |