Allow NVENC to be forced to try capturing non-Nvidia GPUs
This commit is contained in:
@@ -625,10 +625,13 @@ namespace platf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip non-Nvidia cards if we're looking for CUDA devices
|
// Skip non-Nvidia cards if we're looking for CUDA devices
|
||||||
|
// unless NVENC is selected manually by the user
|
||||||
if (mem_type == mem_type_e::cuda && !card.is_nvidia()) {
|
if (mem_type == mem_type_e::cuda && !card.is_nvidia()) {
|
||||||
BOOST_LOG(debug) << file << " is not a CUDA device"sv;
|
BOOST_LOG(debug) << file << " is not a CUDA device"sv;
|
||||||
|
if (config::video.encoder != "nvenc") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto end = std::end(card);
|
auto end = std::end(card);
|
||||||
for (auto plane = std::begin(card); plane != end; ++plane) {
|
for (auto plane = std::begin(card); plane != end; ++plane) {
|
||||||
@@ -1635,10 +1638,16 @@ namespace platf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip non-Nvidia cards if we're looking for CUDA devices
|
// Skip non-Nvidia cards if we're looking for CUDA devices
|
||||||
|
// unless NVENC is selected manually by the user
|
||||||
if (hwdevice_type == mem_type_e::cuda && !card.is_nvidia()) {
|
if (hwdevice_type == mem_type_e::cuda && !card.is_nvidia()) {
|
||||||
BOOST_LOG(debug) << file << " is not a CUDA device"sv;
|
BOOST_LOG(debug) << file << " is not a CUDA device"sv;
|
||||||
|
if (config::video.encoder == "nvenc") {
|
||||||
|
BOOST_LOG(warning) << "Using NVENC with your display connected to a different GPU may not work properly!"sv;
|
||||||
|
}
|
||||||
|
else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto crtc_to_monitor = kms::map_crtc_to_monitor(card.monitors(conn_type_count));
|
auto crtc_to_monitor = kms::map_crtc_to_monitor(card.monitors(conn_type_count));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user