Add 4k command line option

This commit is contained in:
Iwan Timmer 2017-05-27 16:50:29 +02:00
parent 0e1cabbd82
commit fe41e04607
3 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,10 @@ This is the default option.
Use the resolution 1920x1080 for streaming.
=item B<-4k>
Use the resolution 3840x2160 for streaming.
=item B<-width> [I<WIDTH>]
Change the horizontal resolution to I<WIDTH>

View File

@ -42,6 +42,7 @@ const char* audio_device = NULL;
static struct option long_options[] = {
{"720", no_argument, NULL, 'a'},
{"1080", no_argument, NULL, 'b'},
{"4k", no_argument, NULL, '0'},
{"width", required_argument, NULL, 'c'},
{"height", required_argument, NULL, 'd'},
{"30fps", no_argument, NULL, 'e'},
@ -125,6 +126,10 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
config->stream.width = 1920;
config->stream.height = 1080;
break;
case '0':
config->stream.width = 3840;
config->stream.height = 2160;
break;
case 'c':
config->stream.width = atoi(value);
break;

View File

@ -134,6 +134,7 @@ static void help() {
printf("\n Streaming options\n\n");
printf("\t-720\t\t\tUse 1280x720 resolution [default]\n");
printf("\t-1080\t\t\tUse 1920x1080 resolution\n");
printf("\t-4k\t\t\t\tUse 3840x2160 resolution\n");
printf("\t-width <width>\t\tHorizontal resolution (default 1280)\n");
printf("\t-height <height>\tVertical resolution (default 720)\n");
printf("\t-30fps\t\t\tUse 30fps\n");