Replace seperate codec options with single option

This commit is contained in:
Iwan Timmer
2017-06-09 22:50:48 +02:00
parent 63f05b2baf
commit 0b7c2f62a7
4 changed files with 17 additions and 19 deletions

View File

@@ -62,8 +62,7 @@ static struct option long_options[] = {
{"surround", no_argument, NULL, 'u'},
{"fps", required_argument, NULL, 'v'},
{"forcehw", no_argument, NULL, 'w'},
{"hevc", no_argument, NULL, 'x'},
{"h264", no_argument, NULL, 'z'},
{"codec", required_argument, NULL, 'x'},
{"unsupported", no_argument, NULL, 'y'},
{0, 0, 0, 0},
};
@@ -198,10 +197,12 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
config->forcehw = true;
break;
case 'x':
config->codec = CODEC_HEVC;
break;
case 'z':
config->codec = CODEC_H264;
if (strcasecmp(value, "auto") == 0)
config->codec = CODEC_UNSPECIFIED;
else if (strcasecmp(value, "h264") == 0)
config->codec = CODEC_H264;
if (strcasecmp(value, "h265") == 0 || strcasecmp(value, "hevc") == 0)
config->codec = CODEC_HEVC;
break;
case 'y':
config->unsupported_version = true;

View File

@@ -148,8 +148,7 @@ static void help() {
printf("\t-height <height>\tVertical resolution (default 720)\n");
printf("\t-bitrate <bitrate>\tSpecify the bitrate in Kbps\n");
printf("\t-packetsize <size>\tSpecify the maximum packetsize in bytes\n");
printf("\t-hevc\t\t\tUse the high efficiency video coding (HEVC)\n");
printf("\t-h264\t\t\tUse the advanced video coding (H264)\n");
printf("\t-codec <codec>\t\tSelect used codec auto/h264/h265 (default auto)\n");
printf("\t-remote\t\t\tEnable remote optimizations\n");
printf("\t-app <app>\t\tName of app to stream\n");
printf("\t-nosops\t\t\tDon't allow GFE to modify game settings\n");