Own publication independently of its window and reserve call capture

This commit is contained in:
evgeny committed 2026-10-14 02:54:19 +02:00
1 parent ab01c6dc48
commit c1d7460254
3 files changed
+18 -1

No files matched your search

+10
View File
@@ -1,6 +1,8 @@
#include <QCoreApplication>
#include "mainwindow.h"
#include "streamplayer_window.h"
#include "stream_publish_engine.h"
#include "stream_publish_window.h"
#include "channellist.h"
#include "messagelist.h"
#include "messagedelegate.h"
@@ -198,6 +200,8 @@ MainWindow::MainWindow(QWidget *parent, DbManager* db, const QString& cfgPath,
}
MainWindow::~MainWindow() {
if (m_streamPublishWindow) delete m_streamPublishWindow.data();
delete m_streamPublisher; m_streamPublisher = nullptr;
if (m_streamPlayer) delete m_streamPlayer.data();
gui_bridge_set_stream_sources_cb(nullptr);
s_mainWindow = nullptr;
@@ -614,6 +618,12 @@ void MainWindow::setupBridgeCallbacks() {
}
void MainWindow::setupConnects() {
connect(m_messageList, &MessageList::streamPublishRequested, this, [this](quint64 group) {
if (!m_streamPublisher) m_streamPublisher = new StreamPublishEngine(this);
if (m_streamPublishWindow) delete m_streamPublishWindow.data();
m_streamPublishWindow = new StreamPublishWindow(m_streamPublisher, m_streamPublisher->active() ? m_streamPublisher->group() : group, this);
m_streamPublishWindow->show(); m_streamPublishWindow->raise(); m_streamPublishWindow->activateWindow();
});
connect(m_messageList, &MessageList::streamRequested, this,
[this](quint64 group, quint64 source, quint64 epoch, const QString& name) {
if (m_streamPlayer) delete m_streamPlayer.data();