diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-09-25 01:15:54 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-09-25 01:15:54 +0200 |
commit | 58eb7fbd7bb9257460b2fe3949c49b3c7afce81c (patch) | |
tree | fcbfbca83237bf9760249a0b5654e523ff9dfcf8 /src/options.c | |
parent | removing clients works now (diff) |
added timeout option
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index 84d5840..737bd7d 100644 --- a/src/options.c +++ b/src/options.c @@ -166,6 +166,7 @@ int options_parse(options_t* opt, int argc, char* argv[]) PARSE_INT_PARAM("-o","--rtp-port-base", opt->rtp_port_base_, 10) PARSE_STRING_PARAM("-A","--rtp-addr-local", opt->rtp_addr_local_) PARSE_INT_PARAM("-O","--rtp-port-base-local", opt->rtp_port_base_local_, 10) + PARSE_INT_PARAM("-t","--timeout", opt->timeout_, 10) PARSE_STRING_PARAM("-V","--videosink", opt->preview_videosink_) PARSE_STRING_PARAM("-rv","--rec-video-encoder", opt->video_enc_rec_) PARSE_STRING_PARAM("-ra","--rec-audio-encoder", opt->audio_enc_rec_) @@ -179,6 +180,9 @@ int options_parse(options_t* opt, int argc, char* argv[]) opt->rtp_port_base_local_ < 1 || opt->rtp_port_base_local_ > 65535) return -4; + if(opt->timeout_ < 0) + return -5; + if(opt->debug_) { string_list_add(&opt->log_targets_, "stdout:5"); opt->daemonize_ = 0; @@ -226,6 +230,7 @@ void options_default(options_t* opt) opt->rtp_port_base_ = 5000; opt->rtp_addr_local_ = NULL; opt->rtp_port_base_local_ = 5000; + opt->timeout_ = 0; opt->preview_videosink_ = NULL; @@ -305,6 +310,7 @@ void options_print_usage() printf(" [-o|--rtp-port-base base number for remote ports\n"); printf(" [-A|--rtp-addr-local local address to bind to\n"); printf(" [-O|--rtp-port-base-local base number for local ports to bind to\n"); + printf(" [-t|--timeout client timeout (0 means no timeout)\n"); printf(" [-V|--videosink video sink element for local preview (i.e. xvimagesink) - leave empty to disable preview\n"); printf(" [-rv|--rec-video-encoder pipeline for video encoder (recording - leave empty for same as stream)\n"); printf(" [-ra|--rec-audio-encoder pipeline for audio encoder (recording - leave empty for same as stream)\n"); @@ -343,6 +349,7 @@ void options_print(options_t* opt) printf(" rtp_port_base: %d\n", opt->rtp_port_base_); printf(" rtp_addr_local: >>%s<<\n", opt->rtp_addr_local_); printf(" rtp_port_base_local: %d\n", opt->rtp_port_base_local_); + printf(" timeout: %d\n", opt->timeout_); printf(" preview_video_sink: >>%s<<\n", opt->preview_videosink_); printf(" video_enc_rec: >>%s<<\n", opt->video_enc_rec_); printf(" audio_enc_rec: >>%s<<\n", opt->audio_enc_rec_); |