Verify live desktop codec changes preserve the audio epoch
This commit is contained in:
1 parent
b5f84d4a9b
commit
e99a1b9450
2 files changed
+18
-12
No files matched your search
@@ -428,17 +428,19 @@ void StreamPublishEngine::videoLoop() {
|
||||
if (generation == m->generation) { emit configurationChanged(); emit stateChanged(text("Live")); }
|
||||
});
|
||||
} else {
|
||||
auto candidate = std::make_unique<StreamVideoEncoder>();
|
||||
if (!candidate->open(config.video)) {
|
||||
QString error = candidate->error();
|
||||
QMetaObject::invokeMethod(this, [this, generation, error] { sourceFailed(generation, error); });
|
||||
std::unique_lock<std::mutex> lock(m->lock);
|
||||
m->wake.wait_for(lock, std::chrono::milliseconds(100), [this, generation] { return !m->running || m->generation != generation; });
|
||||
continue;
|
||||
}
|
||||
encoder = std::move(candidate); current = generation; encoding = config; revision++; lastImage = {}; lastKey = -1000000;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_VIDEO, "desktop video prepared generation=%llu revision=%u encoder=%s",
|
||||
(unsigned long long)generation, revision, qPrintable(encoder->name()));
|
||||
auto candidate = std::make_unique<StreamVideoEncoder>();
|
||||
if (!candidate->open(config.video)) {
|
||||
QString error = candidate->error();
|
||||
QMetaObject::invokeMethod(this, [this, generation, error] { sourceFailed(generation, error); });
|
||||
std::unique_lock<std::mutex> lock(m->lock);
|
||||
m->wake.wait_for(lock, std::chrono::milliseconds(100), [this, generation] {
|
||||
return !m->running || m->generation != generation;
|
||||
});
|
||||
continue;
|
||||
}
|
||||
encoder = std::move(candidate); current = generation; encoding = config; revision++; lastImage = {}; lastKey = -1000000;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_VIDEO, "desktop video prepared generation=%llu revision=%u encoder=%s",
|
||||
(unsigned long long)generation, revision, qPrintable(encoder->name()));
|
||||
}
|
||||
}
|
||||
bool screen = config.source.kind != StreamVideoSource::Camera;
|
||||
|
||||
Reference in new issue
Block a user