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

@ -93,14 +93,12 @@ The packetsize should the smaller than the MTU of the network.
This value must be a multiply of 16.
By default a safe value of 1024 is used.
=item B<-hevc>
=item B<-codec> [I<CODEC>]
Request a h265/HEVC from the server.
Will still use h264 if server doesn't support HEVC.
=item B<-h264>
Request a h264 from the server even if server and video decoder supports HEVC.
Select codec to use.
Can be 'auto', 'h264', 'h265' or 'hevc'.
Not all video decoders do support H.265/HEVC.
Will still use H.264 if server doesn't support HEVC.
=item B<-remote>

View File

@ -17,8 +17,8 @@
## Size of network packets should be lower than MTU
#packetsize = 1024
## Use of h265/HEVC video codec
#hevc = false
## Select video codec (auto/h264/h265)
#codec = auto
## Default started application on host
#app = Steam
@ -34,8 +34,8 @@
## To use a different mapping then default another mapping should be declared above the input
#input = /dev/input/event1
## Stop GFE from changing graphical game settings for optimal performance and quality
#nosops = false
## Enable GFE for changing graphical game settings for optimal performance and quality
#sops = true
## Play audio on host instead of streaming to client
#localaudio = false

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");