Isolate video call camera capture from the GUI process

This commit is contained in:
evgeny committed 2026-10-15 20:16:59 +02:00
1 parent 0b136ae2ab
commit 3e4d5d235f
13 files changed
+915 -115

No files matched your search

+8 -1
View File
@@ -272,7 +272,14 @@ CallWindow::CallWindow(QWidget* parent)
});
auto* modes = new QHBoxLayout();
m_camera = new QComboBox(this);
for (const auto& camera : CallVideoEngine::cameras()) m_camera->addItem(camera.first, camera.second);
connect(m_video, &CallVideoEngine::camerasChanged, this, [this](const CallCameraDevices& cameras) {
const auto selected = m_camera->currentData();
m_camera->clear();
for (const auto& camera : cameras) m_camera->addItem(camera.first, camera.second);
const int index = m_camera->findData(selected);
if (index >= 0) m_camera->setCurrentIndex(index);
if (m_videoEnabled->isChecked()) applyVideo();
});
m_resolution = new QComboBox(this); m_resolution->addItem("640×480", QSize(640, 480)); m_resolution->addItem("1280×720", QSize(1280, 720));
m_codec = new QComboBox(this); m_codec->addItem(callText("Auto (H.265 → H.264)"), 0); m_codec->addItem("H.265", 2); m_codec->addItem("H.264", 1);
modes->addWidget(m_camera, 1); modes->addWidget(m_resolution); modes->addWidget(m_codec); videoLayout->addLayout(modes);