@@ -51,21 +51,22 @@ void Parser::ParseArgs(int argc, char *argv[], Args &args) {
5151 " Turn server username" )
5252 (" turn_password" , bpo::value<std::string>()->default_value (args.turn_password ),
5353 " Turn server password" )
54- #if USE_MQTT_SIGNALING
5554 (" mqtt_port" , bpo::value<int >()->default_value (args.mqtt_port ), " Mqtt server port" )
5655 (" mqtt_host" , bpo::value<std::string>()->default_value (args.mqtt_host ),
5756 " Mqtt server host" )
5857 (" mqtt_username" , bpo::value<std::string>()->default_value (args.mqtt_username ),
5958 " Mqtt server username" )
6059 (" mqtt_password" , bpo::value<std::string>()->default_value (args.mqtt_password ),
6160 " Mqtt server password" )
62- #elif USE_HTTP_SIGNALING
6361 (" http_port" , bpo::value<uint16_t >()->default_value (args.http_port ), " Http server port" )
64- #endif
6562 (" record_path" , bpo::value<std::string>()->default_value (args.record_path ),
6663 " The path to save the recording video files. The recorder won't start if it's empty" )
6764 (" hw_accel" , bpo::bool_switch ()->default_value (args.hw_accel ),
6865 " Share DMA buffers between decoder/scaler/encoder, which can decrease cpu usage" )
66+ (" use_mqtt" , bpo::bool_switch ()->default_value (args.use_mqtt ),
67+ " Use mqtt to exchange sdp and ice candidates" )
68+ (" use_whep" , bpo::bool_switch ()->default_value (args.use_whep ),
69+ " Use whep to exchange sdp and ice candidates" )
6970 (" v4l2_format" , bpo::value<std::string>()->default_value (args.v4l2_format ),
7071 " Set v4l2 camera capture format to `i420`, `mjpeg`, `h264`. The `h264` can pass "
7172 " packets into mp4 without encoding to reduce cpu usage."
@@ -110,6 +111,8 @@ void Parser::ParseArgs(int argc, char *argv[], Args &args) {
110111 args.fixed_resolution = vm[" fixed_resolution" ].as <bool >();
111112 args.no_audio = vm[" no_audio" ].as <bool >();
112113 args.hw_accel = vm[" hw_accel" ].as <bool >();
114+ args.use_mqtt = vm[" use_mqtt" ].as <bool >();
115+ args.use_whep = vm[" use_whep" ].as <bool >();
113116
114117 if (!args.stun_url .empty () && args.stun_url .substr (0 , 4 ) != " stun" ) {
115118 std::cout << " Stun url should not be empty and start with \" stun:\" " << std::endl;
0 commit comments