|
@@ -37,6 +37,7 @@ usage(char *name)
|
|
|
fprintf(stderr, " -c camera Use a specific camera number\n");
|
|
|
fprintf(stderr, " -m modenum Use another camera mode than the first\n");
|
|
|
fprintf(stderr, " -o file File to store the frame in\n");
|
|
|
+ fprintf(stderr, " -v Show verbose debug info\n");
|
|
|
fprintf(stderr, " -h Display this help text\n");
|
|
|
}
|
|
|
|
|
@@ -50,8 +51,9 @@ main(int argc, char *argv[])
|
|
|
char *outfile = NULL;
|
|
|
int count = 5;
|
|
|
int mode_idx = 0;
|
|
|
+ int verbose = 0;
|
|
|
|
|
|
- while ((c = getopt(argc, argv, "hc:n:o:m:")) != -1) {
|
|
|
+ while ((c = getopt(argc, argv, "hvc:n:o:m:")) != -1) {
|
|
|
switch (c) {
|
|
|
case 'c':
|
|
|
res = strtol(optarg, &end, 10);
|
|
@@ -84,6 +86,9 @@ main(int argc, char *argv[])
|
|
|
usage(argv[0]);
|
|
|
return 0;
|
|
|
break;
|
|
|
+ case 'v':
|
|
|
+ verbose = 1;
|
|
|
+ break;
|
|
|
case '?':
|
|
|
if (optopt == 'd' || optopt == 'l') {
|
|
|
fprintf(stderr, "Option -%c requires an argument.\n", optopt);
|
|
@@ -104,6 +109,9 @@ main(int argc, char *argv[])
|
|
|
int ret = libmegapixels_find_config(configpath);
|
|
|
libmegapixels_devconfig *config = {0};
|
|
|
libmegapixels_init(&config);
|
|
|
+ if (verbose) {
|
|
|
+ libmegapixels_loglevel(2);
|
|
|
+ }
|
|
|
|
|
|
if (ret) {
|
|
|
printf("Using config: %s\n", configpath);
|