Add option to ignore encoder probe failure
This commit is contained in:
@@ -514,6 +514,7 @@ namespace config {
|
||||
|
||||
"1920x1080x60", // fallback_mode
|
||||
false, // isolated Display
|
||||
false, // ignore_encoder_probe_failure
|
||||
};
|
||||
|
||||
audio_t audio {
|
||||
@@ -1199,6 +1200,7 @@ namespace config {
|
||||
int_f(vars, "max_bitrate", video.max_bitrate);
|
||||
string_f(vars, "fallback_mode", video.fallback_mode);
|
||||
bool_f(vars, "isolated_virtual_display_option", video.isolated_virtual_display_option);
|
||||
bool_f(vars, "ignore_encoder_probe_failure", video.ignore_encoder_probe_failure);
|
||||
|
||||
path_f(vars, "pkey", nvhttp.pkey);
|
||||
path_f(vars, "cert", nvhttp.cert);
|
||||
|
||||
@@ -147,6 +147,7 @@ namespace config {
|
||||
|
||||
std::string fallback_mode;
|
||||
bool isolated_virtual_display_option;
|
||||
bool ignore_encoder_probe_failure;
|
||||
};
|
||||
|
||||
struct audio_t {
|
||||
|
||||
@@ -353,7 +353,11 @@ namespace proc {
|
||||
// due to hotplugging, driver crash, primary monitor change,
|
||||
// or any number of other factors).
|
||||
if (rtsp_stream::session_count() == 0 && video::probe_encoders()) {
|
||||
return 503;
|
||||
if (config::video.ignore_encoder_probe_failure) {
|
||||
BOOST_LOG(warning) << "Encoder probe failed, but continuing due to user configuration.";
|
||||
} else {
|
||||
return 503;
|
||||
}
|
||||
}
|
||||
|
||||
std::string fps_str;
|
||||
|
||||
Reference in New Issue
Block a user