From dba74524c7f070d6c66b0901f744ac17891df417 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Tue, 1 Dec 2015 15:51:34 +0100 Subject: [PATCH] Fps configurable in configuration file --- docs/README.pod | 4 ++++ src/config.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/README.pod b/docs/README.pod index 9df0df3..79712a1 100644 --- a/docs/README.pod +++ b/docs/README.pod @@ -77,6 +77,10 @@ Use 30 fps for streaming. Use 60 fps for streaming. This is the default configuration. +=item B<-fps> [I] + +Change the number of frame per second to I + =item B<-bitrate> [I] Change bitrate to I kbps. diff --git a/src/config.c b/src/config.c index dfde033..ff0f5e2 100644 --- a/src/config.c +++ b/src/config.c @@ -61,6 +61,7 @@ static struct option long_options[] = { {"remote", no_argument, NULL, 's'}, {"fullscreen", no_argument, NULL, 't'}, {"surround", no_argument, NULL, 'u'}, + {"fps", required_argument, NULL, 'v'}, {0, 0, 0, 0}, }; @@ -192,6 +193,9 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) { case 'u': config->stream.audioConfiguration = AUDIO_CONFIGURATION_51_SURROUND; break; + case 'v': + config->stream.fps = atoi(value); + break; case 1: if (config->action == NULL) config->action = value;