summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-09-22 03:55:41 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-09-22 03:55:41 +0200
commit72897092b19354b5670194f93252fbe3ce4c2378 (patch)
tree6b147eeb70b7ef694d4bbca95f49bba890c80b5d /src/options.c
parentbuilding pipeline manually now (diff)
got rid of double audio encoding
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/src/options.c b/src/options.c
index 684a1d3..b4e5971 100644
--- a/src/options.c
+++ b/src/options.c
@@ -208,13 +208,12 @@ int options_parse(options_t* opt, int argc, char* argv[])
PARSE_STRING_PARAM("-vs","--video-source", opt->video_src_)
PARSE_STRING_PARAM("-ve","--video-encoder", opt->video_enc_)
PARSE_STRING_PARAM("-vp","--video-payloader", opt->video_payloader_)
- PARSE_STRING_PARAM("-V","--videosink", opt->videosink_)
PARSE_STRING_PARAM("-as","--audio-source", opt->audio_src_)
- PARSE_STRING_PARAM("-ae","--audio-encoder-stream", opt->audio_enc_stream_)
+ PARSE_STRING_PARAM("-ae","--audio-encoder", opt->audio_enc_)
PARSE_STRING_PARAM("-ap","--audio-payloader", opt->audio_payloader_)
PARSE_STRING_PARAM("-o","--rtp-host", opt->rtp_host_)
PARSE_INT_PARAM("-O","--rtp-port-base", opt->rtp_port_base_, 10)
- PARSE_STRING_PARAM("-ar","--audio-encoder-rec", opt->audio_enc_rec_)
+ PARSE_STRING_PARAM("-V","--videosink", opt->preview_videosink_)
PARSE_STRING_PARAM("-m","--rec-mux", opt->rec_mux_)
PARSE_STRING_PARAM("-r","--rec-name-format", opt->rec_name_format_)
else
@@ -262,19 +261,18 @@ void options_default(options_t* opt)
opt->video_src_ = strdup("v4l2src ! videoconvert ! videoscale ! video/x-raw,format=I420,width=864,height=480,framerate=25/1,pixel-aspect-ratio=1/1 ! identity");
opt->video_enc_ = strdup("vp8enc keyframe-max-dist=25 error-resilient=2 end-usage=1 target-bitrate=1800000 cpu-used=4 deadline=1000000 threads=2");
opt->video_payloader_ = strdup("rtpvp8pay");
- opt->videosink_ = strdup("xvimagesink");
opt->audio_src_ = strdup("autoaudiosrc ! audio/x-raw,format=S16LE,channels=1,rate=48000 ! identity");
- opt->audio_enc_stream_ = strdup("opusenc bitrate=64000 cbr=true packet-loss-percentage=0 inband-fec=false");
+ opt->audio_enc_ = strdup("opusenc bitrate=64000 cbr=true packet-loss-percentage=0 inband-fec=false");
opt->audio_payloader_ = strdup("rtpopuspay");
opt->rtp_host_ = strdup("127.0.0.1");
opt->rtp_port_base_ = 5100;
- opt->audio_enc_rec_ = strdup("audioconvert ! vorbisenc bitrate=96000");
- opt->rec_mux_ = strdup("matroskamux");
+ opt->preview_videosink_ = strdup("xvimagesink");
- opt->rec_name_format_ = strdup("./recordings/%Y-%m-%d_%H-%M-%S.mkv");
+ opt->rec_mux_ = strdup("oggmux");
+ opt->rec_name_format_ = strdup("./recordings/%Y-%m-%d_%H-%M-%S.ogg");
}
void options_clear(options_t* opt)
@@ -301,18 +299,16 @@ void options_clear(options_t* opt)
free(opt->video_enc_);
if(opt->video_payloader_)
free(opt->video_payloader_);
- if(opt->videosink_)
- free(opt->videosink_);
if(opt->audio_src_)
free(opt->audio_src_);
- if(opt->audio_enc_stream_)
- free(opt->audio_enc_stream_);
+ if(opt->audio_enc_)
+ free(opt->audio_enc_);
if(opt->audio_payloader_)
free(opt->audio_payloader_);
if(opt->rtp_host_)
free(opt->rtp_host_);
- if(opt->audio_enc_rec_)
- free(opt->audio_enc_rec_);
+ if(opt->preview_videosink_)
+ free(opt->preview_videosink_);
if(opt->rec_mux_)
free(opt->rec_mux_);
if(opt->rec_name_format_)
@@ -332,17 +328,16 @@ void options_print_usage()
printf(" [-L|--log] <target>:<level>[,<param1>[,<param2>..]]\n");
printf(" add a log target, can be invoked several times\n");
printf(" [-U|--debug] don't daemonize and log to stdout with maximum log level\n");
- printf(" [-n|--appname] <name> set the application name (will be used by xvimagesink for window title\n");
+ printf(" [-n|--appname] <name> set the application name (will be used by xvimagesink for window title)\n");
printf(" [-vs|--video-source pipeline for raw video (i.e. videotestsrc)\n");
printf(" [-ve|--video-encoder pipeline for video encoder (stream and recording)\n");
- printf(" [-vp|--video-payloader video payloader element (i.e. rtpvp8pay\n");
- printf(" [-V|--videosink video sink element (i.e. xvimagesink\n");
+ printf(" [-vp|--video-payloader video payloader element (i.e. rtpvp8pay)\n");
printf(" [-as|--audio-source pipeline for raw audio (audiotestsrc)\n");
- printf(" [-ae|--audio-encoder-stream pipeline for audio encoder (stream only)\n");
+ printf(" [-ae|--audio-encoder pipeline for audio encoder (stream only)\n");
printf(" [-ap|--audio-payloader audio payloader element (i.e. rptopuspay)\n");
printf(" [-o|--rtp-host remote host for RTP packets\n");
printf(" [-O|--rtp-port-base base number for remote ports\n");
- printf(" [-ar|--audio-encoder-rec pipeline for audio encoder (recording only)\n");
+ printf(" [-V|--videosink video sink element for local preview (i.e. xvimagesink)\n");
printf(" [-m|--rec-mux muxer elemenent (i.e. matroskamux)\n");
printf(" [-r|--rec-name-format] <format> the recording file name format, see manpage of strftime for the syntax\n");
}
@@ -371,13 +366,12 @@ void options_print(options_t* opt)
printf(" video_src: >>%s<<\n", opt->video_src_);
printf(" video_enc: >>%s<<\n", opt->video_enc_);
printf(" video_payloader: >>%s<<\n", opt->video_payloader_);
- printf(" video_sink: >>%s<<\n", opt->videosink_);
printf(" audio_src: >>%s<<\n", opt->audio_src_);
- printf(" audio_enc_stream: >>%s<<\n", opt->audio_enc_stream_);
+ printf(" audio_enc: >>%s<<\n", opt->audio_enc_);
printf(" audio_payloader: >>%s<<\n", opt->audio_payloader_);
printf(" rtp_host: >>%s<<\n", opt->rtp_host_);
printf(" rtp_port_base: %d\n", opt->rtp_port_base_);
- printf(" audio_enc_rec: >>%s<<\n", opt->audio_enc_rec_);
+ printf(" preview_video_sink: >>%s<<\n", opt->preview_videosink_);
printf(" rec_mux: >>%s<<\n", opt->rec_mux_);
printf(" rec_name_format: '%s'\n", opt->rec_name_format_);
}