Keep desktop stream failure visible after draining

This commit is contained in:
evgeny committed 2026-10-14 12:58:09 +02:00
1 parent c3512b787e
commit 4e7b8f5c1a
2 files changed
+12 -3

No files matched your search

+8 -2
View File
@@ -80,6 +80,7 @@ StreamPublishWindow::StreamPublishWindow(StreamPublishEngine* engine, uint64_t g
m_stats = new QLabel(this); m_stats->setWordWrap(true); m_stats->setMinimumHeight(46); layout->addWidget(m_stats);
m_start = new QPushButton(text("Start stream"), this); layout->addWidget(m_start);
connect(m_start, &QPushButton::clicked, this, [this] {
if (!m_engine->active()) m_status->setProperty("streamError", QString());
if (m_engine->active()) m_engine->stop(); else m_engine->start(m_group, selection()); synchronize();
});
for (auto* box : {m_source, m_mode, m_codec, m_bitrate}) connect(box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &StreamPublishWindow::apply);
@@ -90,8 +91,13 @@ StreamPublishWindow::StreamPublishWindow(StreamPublishEngine* engine, uint64_t g
#endif
connect(engine, &StreamPublishEngine::codecsChanged, this, &StreamPublishWindow::refreshCodecs);
connect(engine, &StreamPublishEngine::configurationChanged, this, &StreamPublishWindow::synchronize);
connect(engine, &StreamPublishEngine::stateChanged, this, [this](const QString& value) { m_status->setText(value); synchronize(); });
connect(engine, &StreamPublishEngine::errorOccurred, this, [this](const QString& value) { m_status->setText(value); });
connect(engine, &StreamPublishEngine::stateChanged, this, [this](const QString& value) {
auto error = m_status->property("streamError").toString();
m_status->setText(error.isEmpty() ? value : value + "\n" + error); synchronize();
});
connect(engine, &StreamPublishEngine::errorOccurred, this, [this](const QString& value) {
m_status->setProperty("streamError", value); m_status->setText(value);
});
connect(engine, &StreamPublishEngine::audioChannelsChanged, this, [this](int channels) { m_inputChannels->setText(channels == 2 ? text("Stereo") : text("Mono")); });
connect(engine, &StreamPublishEngine::telemetryChanged, this, [this](const stream_publisher_status& stats) {
m_stats->setText(text("Video queue: %1 · Inflight: %2 · Send buffer: %3\nACK, all connections, last second: %4")