mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-14 20:06:16 +00:00
Replace seperate codec options with single option
This commit is contained in:
13
src/config.c
13
src/config.c
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user