running MediaForkCLI with XGrid makes a lot of noise updating the status.
I added a quiet flag to make the output less verbouse.
NikWest
Code: Select all
Index: test/test.c
===================================================================
--- test/test.c (revision 374)
+++ test/test.c (working copy)
@@ -43,11 +43,14 @@
static int chapter_start = 0;
static int chapter_end = 0;
static int crf = 0;
+static int quiet = 0;
/* Exit cleanly on Ctrl-C */
static volatile int die = 0;
static void SigHandler( int );
+static float lastprogess=0.0;
+
/* Utils */
static void ShowCommands();
static void ShowHelp();
@@ -439,9 +442,13 @@
#define p s.param.working
case HB_STATE_WORKING:
+ if(quiet && p.progress <= lastprogess) {
+ break;
+ }
+ lastprogess+=0.01;
fprintf( stderr, "\rEncoding: task %d of %d, %.2f %%",
p.job_cur, p.job_count, 100.0 * p.progress );
- if( p.seconds > -1 )
+ if( p.seconds > -1)
{
fprintf( stderr, " (%.2f fps, avg %.2f fps, ETA "
"%02dh%02dm%02ds)", p.rate_cur, p.rate_avg,
@@ -512,7 +519,8 @@
"\n"
" -h, --help Print help\n"
" -u, --update Check for updates and exit\n"
- " -v, --verbose Be verbose\n"
+ " -v, --verbose Be verbose\n"
+ " -V, --quiet Be quiet\n"
" -C, --cpu Set CPU count (default: autodetected)\n"
"\n"
" -f, --format <string> Set output format (avi/mp4/ogm, default:\n"
@@ -575,7 +583,8 @@
{
{ "help", no_argument, NULL, 'h' },
{ "update", no_argument, NULL, 'u' },
- { "verbose", no_argument, NULL, 'v' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "quiet", no_argument, NULL, 'V' },
{ "cpu", required_argument, NULL, 'C' },
{ "format", required_argument, NULL, 'f' },
@@ -612,7 +621,7 @@
int c;
c = getopt_long( argc, argv,
- "hvuC:f:i:o:t:c:a:s:e:E:2dgpw:l:n:b:q:S:B:r:R:Q",
+ "hvVuC:f:i:o:t:c:a:s:e:E:2dgpw:l:n:b:q:S:B:r:R:Q",
long_options, &option_index );
if( c < 0 )
{
@@ -630,6 +639,9 @@
case 'v':
debug = HB_DEBUG_ALL;
break;
+ case 'V':
+ quiet = 1;
+ break;
case 'C':
cpu = atoi( optarg );
break;