Hd-rum-transcode: added -v option

This commit is contained in:
Martin Pulec
2016-03-21 10:11:46 +01:00
parent 2984709460
commit cc4e4eb362
4 changed files with 19 additions and 8 deletions

View File

@@ -379,7 +379,8 @@ static void usage(const char *progname) {
"\t\t--blend - enable blending from original to newly received stream, increases latency\n"
"\t\t--capture-filter <cfg_string> - apply video capture filter to incoming video\n"
"\t\t--help\n"
"\t\t--verbose\n");
"\t\t--verbose\n"
"\t\t-v\n");
printf("\tand hostX_options may be:\n"
"\t\t-P <port> - TX port to be used\n"
"\t\t-c <compression> - compression\n"
@@ -441,6 +442,9 @@ static bool parse_fmt(int argc, char **argv, struct cmdline_parameters *parsed)
} else if(strcmp(argv[start_index], "--help") == 0) {
usage(argv[0]);
return false;
} else if(strcmp(argv[start_index], "-v") == 0) {
print_version();
return false;
} else if(strcmp(argv[start_index], "--verbose") == 0) {
parsed->verbose = true;
} else {

View File

@@ -194,3 +194,14 @@ void print_capabilities(struct module *root, bool use_vidcap)
}
}
void print_version()
{
printf("%s", PACKAGE_STRING);
#ifdef GIT_VERSION
printf(" (rev %s)", GIT_VERSION);
#endif
printf("\n");
printf("\n" PACKAGE_NAME " was compiled with following features:\n");
printf(AUTOCONF_RESULT);
}

View File

@@ -130,6 +130,8 @@ bool common_preinit(int argc, char *argv[]);
*/
void print_capabilities(struct module *root, bool use_vidcap);
void print_version(void);
#ifdef __cplusplus
}
#endif

View File

@@ -575,13 +575,7 @@ int main(int argc, char *argv[])
postprocess = optarg;
break;
case 'v':
printf("%s", PACKAGE_STRING);
#ifdef GIT_VERSION
printf(" (rev %s)", GIT_VERSION);
#endif
printf("\n");
printf("\n" PACKAGE_NAME " was compiled with following features:\n");
printf(AUTOCONF_RESULT);
print_version();
return EXIT_SUCCESS;
case 'c':
requested_compression = optarg;