Don't stop streaming when UAC is running

This commit is contained in:
loki 2021-04-24 15:53:48 +02:00
parent 0cfb440cf6
commit 438ae6a761
2 changed files with 18 additions and 4 deletions

View File

@ -150,8 +150,6 @@ int display_base_t::init() {
}
D3D_FEATURE_LEVEL featureLevels[] {
D3D_FEATURE_LEVEL_12_1,
D3D_FEATURE_LEVEL_12_0,
D3D_FEATURE_LEVEL_11_1,
D3D_FEATURE_LEVEL_11_0,
D3D_FEATURE_LEVEL_10_1,

View File

@ -469,7 +469,14 @@ void captureThread(
std::this_thread::sleep_for(100ms);
}
reset_display(disp, encoder.dev_type);
while(capture_ctx_queue->running()) {
reset_display(disp, encoder.dev_type);
if(disp) {
break;
}
std::this_thread::sleep_for(200ms);
}
if(!disp) {
return;
}
@ -846,7 +853,16 @@ encode_e encode_run_sync(std::vector<std::unique_ptr<sync_session_ctx_t>> &synce
const auto &encoder = encoders.front();
std::shared_ptr<platf::display_t> disp;
reset_display(disp, encoder.dev_type);
while(encode_session_ctx_queue.running()) {
reset_display(disp, encoder.dev_type);
if(disp) {
break;
}
std::this_thread::sleep_for(200ms);
}
if(!disp) {
return encode_e::error;
}