summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-21 15:46:17 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-21 15:46:17 +0200
commitc3a72f6afafcb876329dfd001ce3050021486b2f (patch)
tree13f41a3d8628b6a6efe395b9822ef4cfc7198875 /src
parent66f40d1badeb945d60b76c182e7bee4b0fc4dd7b (diff)
downloadfdk-aac-c3a72f6afafcb876329dfd001ce3050021486b2f.tar.gz
fdk-aac-c3a72f6afafcb876329dfd001ce3050021486b2f.tar.bz2
fdk-aac-c3a72f6afafcb876329dfd001ce3050021486b2f.zip
Add option to suppress the little dots
Diffstat (limited to 'src')
-rw-r--r--src/dabplus-enc-alsa-zmq.cpp32
-rw-r--r--src/dabplus-enc-file-zmq.c32
2 files changed, 40 insertions, 24 deletions
diff --git a/src/dabplus-enc-alsa-zmq.cpp b/src/dabplus-enc-alsa-zmq.cpp
index 92980e2..f9ff3a4 100644
--- a/src/dabplus-enc-alsa-zmq.cpp
+++ b/src/dabplus-enc-alsa-zmq.cpp
@@ -86,6 +86,7 @@ void usage(const char* name) {
" -c, --channels={ 1, 2 } Nb of input channels for raw input (default: 2).\n"
" -r, --rate={ 32000, 48000 } Sample rate for raw input (default: 48000).\n"
" -k, --secret-key=FILE Set the secret key for encryption.\n"
+ " -s, --suppress-dots Do not show the little dots.\n"
//" -V, --version Print version and exit.\n"
"\n"
"Only the tcp:// zeromq transport has been tested until now.\n"
@@ -235,23 +236,26 @@ int main(int argc, char *argv[])
unsigned char pad_buf[128];
int padlen;
+ int show_dots = 1;
+
/* Data for ZMQ CURVE authentication */
char* keyfile = NULL;
char secretkey[CURVE_KEYLEN+1];
const struct option longopts[] = {
- {"bitrate", required_argument, 0, 'b'},
- {"output", required_argument, 0, 'o'},
- {"device", required_argument, 0, 'd'},
- {"rate", required_argument, 0, 'r'},
- {"channels", required_argument, 0, 'c'},
- {"pad", required_argument, 0, 'p'},
- {"pad-fifo", required_argument, 0, 'P'},
- {"secret-key", required_argument, 0, 'k'},
- {"drift-comp", no_argument, 0, 'D'},
- {"afterburner", no_argument, 0, 'a'},
- {"help", no_argument, 0, 'h'},
+ {"bitrate", required_argument, 0, 'b'},
+ {"output", required_argument, 0, 'o'},
+ {"device", required_argument, 0, 'd'},
+ {"rate", required_argument, 0, 'r'},
+ {"channels", required_argument, 0, 'c'},
+ {"pad", required_argument, 0, 'p'},
+ {"pad-fifo", required_argument, 0, 'P'},
+ {"secret-key", required_argument, 0, 'k'},
+ {"drift-comp", no_argument, 0, 'D'},
+ {"afterburner", no_argument, 0, 'a'},
+ {"help", no_argument, 0, 'h'},
+ {"suppress-dots", no_argument, 0, 's'},
{0,0,0,0},
};
@@ -294,6 +298,9 @@ int main(int argc, char *argv[])
case 'P':
pad_fifo = optarg;
break;
+ case 's':
+ show_dots = 0;
+ break;
case '?':
case 'h':
usage(argv[0]);
@@ -609,7 +616,8 @@ int main(int argc, char *argv[])
break;
}
- if (out_args.numOutBytes + row*10 == outbuf_size)
+ if (show_dots &&
+ out_args.numOutBytes + row*10 == outbuf_size)
print_status(".", &remaining_line_len);
}
diff --git a/src/dabplus-enc-file-zmq.c b/src/dabplus-enc-file-zmq.c
index b677d5c..76aa74a 100644
--- a/src/dabplus-enc-file-zmq.c
+++ b/src/dabplus-enc-file-zmq.c
@@ -78,6 +78,7 @@ void usage(const char* name) {
" -c, --channels={ 1, 2 } Nb of input channels for raw input (default: 2).\n"
" -r, --rate={ 32000, 48000 } Sample rate for raw input (default: 48000).\n"
" -k, --secret-key=FILE Set the secret key for encryption.\n"
+ " -s, --suppress-dots Do not show the little dots.\n"
//" -v, --verbose=LEVEL Set verbosity level.\n"
"\n"
"Only the tcp:// zeromq transport has been tested until now.\n"
@@ -117,22 +118,25 @@ int main(int argc, char *argv[]) {
void *zmq_context = zmq_ctx_new();
void *zmq_sock = NULL;
+ int show_dots = 1;
+
/* Data for ZMQ CURVE authentication */
char* keyfile = NULL;
char secretkey[CURVE_KEYLEN+1];
const struct option longopts[] = {
- {"bitrate", required_argument, 0, 'b'},
- {"input", required_argument, 0, 'i'},
- {"output", required_argument, 0, 'o'},
- {"format", required_argument, 0, 'f'},
- {"rate", required_argument, 0, 'r'},
- {"channels", required_argument, 0, 'c'},
- {"pad", required_argument, 0, 'p'},
- {"pad-fifo", required_argument, 0, 'P'},
- {"secret-key", required_argument, 0, 'k'},
- {"afterburner", no_argument, 0, 'a'},
- {"help", no_argument, 0, 'h'},
+ {"bitrate", required_argument, 0, 'b'},
+ {"input", required_argument, 0, 'i'},
+ {"output", required_argument, 0, 'o'},
+ {"format", required_argument, 0, 'f'},
+ {"rate", required_argument, 0, 'r'},
+ {"channels", required_argument, 0, 'c'},
+ {"pad", required_argument, 0, 'p'},
+ {"pad-fifo", required_argument, 0, 'P'},
+ {"secret-key", required_argument, 0, 'k'},
+ {"afterburner", no_argument, 0, 'a'},
+ {"help", no_argument, 0, 'h'},
+ {"suppress-dots", no_argument, 0, 's'},
{0,0,0,0},
};
@@ -178,6 +182,9 @@ int main(int argc, char *argv[]) {
case 'P':
pad_fifo = optarg;
break;
+ case 's':
+ show_dots = 0;
+ break;
case '?':
case 'h':
usage(argv[0]);
@@ -556,7 +563,8 @@ int main(int argc, char *argv[]) {
}
//fwrite(outbuf, 1, /*out_args.numOutBytes*/ outbuf_size, out_fh);
//fprintf(stderr, "Written %d/%d bytes!\n", out_args.numOutBytes + row*10, outbuf_size);
- if(out_args.numOutBytes + row*10 == outbuf_size)
+ if (show_dots &&
+ out_args.numOutBytes + row*10 == outbuf_size)
fprintf(stderr, ".");
// if(frame > 10)