Separate function for video protocol listing

This commit is contained in:
Martin Pulec
2019-11-13 16:19:55 +01:00
parent 04bf6f5564
commit ee4646d7cc
3 changed files with 10 additions and 6 deletions

View File

@@ -813,10 +813,11 @@ int main(int argc, char *argv[])
}
break;
case OPT_PROTOCOL:
if (strcmp(optarg, "help") == 0) {
if (strcmp(optarg, "help") == 0 ||
strcmp(optarg, "fullhelp") == 0) {
cout << "Specify a " << style::bold << "common" << style::reset << " protocol for both audio and video.\n";
cout << "Audio protocol can be one of: " << style::bold << AUDIO_PROTOCOLS "\n" << style::reset;
video_rxtx::create("help", {});
video_rxtx::list(strcmp(optarg, "fullhelp") == 0);
return EXIT_SUCCESS;
}
audio_protocol = video_protocol = optarg;