|
|
@ -112,9 +112,14 @@ void MainWindow::initSignalConnection() {
|
|
|
|
connect(&streamAddrSettingsDlg,
|
|
|
|
connect(&streamAddrSettingsDlg,
|
|
|
|
&StreamAddrSettingsDlg::startPushStreamSignal, this,
|
|
|
|
&StreamAddrSettingsDlg::startPushStreamSignal, this,
|
|
|
|
&MainWindow::pushStreamSlot);
|
|
|
|
&MainWindow::pushStreamSlot);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui->videoControlWidget, &VideoControl::stopVideoSignal, this,
|
|
|
|
|
|
|
|
&MainWindow::closeVideoSlot);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::initNotifyMessageConnection() {
|
|
|
|
void MainWindow::initNotifyMessageConnection() {
|
|
|
|
|
|
|
|
connect(this, &MainWindow::sendErrorMessage, this,
|
|
|
|
|
|
|
|
&MainWindow::showMessageSlots);
|
|
|
|
connect(ui->videoWidget, &VideoWidget::sendErrorMessageSignal, this,
|
|
|
|
connect(ui->videoWidget, &VideoWidget::sendErrorMessageSignal, this,
|
|
|
|
&MainWindow::showMessageSlots);
|
|
|
|
&MainWindow::showMessageSlots);
|
|
|
|
connect(ui->commandWidget, &CommandWidget::sendErrorMessage, this,
|
|
|
|
connect(ui->commandWidget, &CommandWidget::sendErrorMessage, this,
|
|
|
@ -326,27 +331,57 @@ void MainWindow::openSavedVideoDirSlot() {
|
|
|
|
void MainWindow::pullStreamSlot(bool bPull) {
|
|
|
|
void MainWindow::pullStreamSlot(bool bPull) {
|
|
|
|
if (!g_networkSettingInfo) return;
|
|
|
|
if (!g_networkSettingInfo) return;
|
|
|
|
if (bPull) {
|
|
|
|
if (bPull) {
|
|
|
|
QString podPullStreamIP =
|
|
|
|
// QString podPullStreamIP =
|
|
|
|
g_networkSettingInfo->value("NetworkStreamSettings/podPullAddress")
|
|
|
|
// g_networkSettingInfo->value("NetworkStreamSettings/podPullAddress")
|
|
|
|
.toString();
|
|
|
|
// .toString();
|
|
|
|
QString pullStreamIP1 =
|
|
|
|
// QString pullStreamIP1 =
|
|
|
|
g_networkSettingInfo->value("NetworkStreamSettings/pullAddress1")
|
|
|
|
// g_networkSettingInfo->value("NetworkStreamSettings/pullAddress1")
|
|
|
|
.toString();
|
|
|
|
// .toString();
|
|
|
|
QString pullStreamIP2 =
|
|
|
|
// QString pullStreamIP2 =
|
|
|
|
g_networkSettingInfo->value("NetworkStreamSettings/pullAddress2")
|
|
|
|
// g_networkSettingInfo->value("NetworkStreamSettings/pullAddress2")
|
|
|
|
.toString();
|
|
|
|
// .toString();
|
|
|
|
QString pullStreamIP3 =
|
|
|
|
// QString pullStreamIP3 =
|
|
|
|
g_networkSettingInfo->value("NetworkStreamSettings/pullAddress3")
|
|
|
|
// g_networkSettingInfo->value("NetworkStreamSettings/pullAddress3")
|
|
|
|
.toString();
|
|
|
|
// .toString();
|
|
|
|
QString pullStreamIP4 =
|
|
|
|
// QString pullStreamIP4 =
|
|
|
|
g_networkSettingInfo->value("NetworkStreamSettings/pullAddress4")
|
|
|
|
// g_networkSettingInfo->value("NetworkStreamSettings/pullAddress4")
|
|
|
|
.toString();
|
|
|
|
// .toString();
|
|
|
|
|
|
|
|
|
|
|
|
ui->videoWidget->play(g_pullStreamInfoStruct.podPullIP);
|
|
|
|
if (!ui->videoWidget->getPlayStatus()) {
|
|
|
|
ui->videoWidget1->play(g_pullStreamInfoStruct.pullIP1);
|
|
|
|
ui->videoWidget->play(g_pullStreamInfoStruct.podPullIP);
|
|
|
|
ui->videoWidget2->play(g_pullStreamInfoStruct.pullIP2);
|
|
|
|
} else {
|
|
|
|
ui->videoWidget3->play(g_pullStreamInfoStruct.pullIP3);
|
|
|
|
emit sendErrorMessage("吊舱视频正在播放,请先暂停!",
|
|
|
|
ui->videoWidget4->play(g_pullStreamInfoStruct.pullIP4);
|
|
|
|
NotifyType::WARNING);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ui->videoWidget1->getPlayStatus()) {
|
|
|
|
|
|
|
|
ui->videoWidget1->play(g_pullStreamInfoStruct.pullIP1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
emit sendErrorMessage("备用视频1正在播放,请先暂停!",
|
|
|
|
|
|
|
|
NotifyType::WARNING);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ui->videoWidget2->getPlayStatus()) {
|
|
|
|
|
|
|
|
ui->videoWidget2->play(g_pullStreamInfoStruct.pullIP2);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
emit sendErrorMessage("备用视频2正在播放,请先暂停!",
|
|
|
|
|
|
|
|
NotifyType::WARNING);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ui->videoWidget3->getPlayStatus()) {
|
|
|
|
|
|
|
|
ui->videoWidget3->play(g_pullStreamInfoStruct.pullIP3);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
emit sendErrorMessage("备用视频3正在播放,请先暂停!",
|
|
|
|
|
|
|
|
NotifyType::WARNING);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ui->videoWidget4->getPlayStatus()) {
|
|
|
|
|
|
|
|
ui->videoWidget4->play(g_pullStreamInfoStruct.pullIP4);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
emit sendErrorMessage("备用视频4正在播放,请先暂停!",
|
|
|
|
|
|
|
|
NotifyType::WARNING);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ui->videoWidget->stopPlay();
|
|
|
|
ui->videoWidget->stopPlay();
|
|
|
|
ui->videoWidget1->stopPlay();
|
|
|
|
ui->videoWidget1->stopPlay();
|
|
|
@ -398,3 +433,13 @@ void MainWindow::pushStreamSlot(bool bPush) {
|
|
|
|
// ui->videoWidget4->stopPushStream();
|
|
|
|
// ui->videoWidget4->stopPushStream();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::closeVideoSlot() {
|
|
|
|
|
|
|
|
ui->videoWidget->stopPlay();
|
|
|
|
|
|
|
|
ui->videoWidget1->stopPlay();
|
|
|
|
|
|
|
|
ui->videoWidget2->stopPlay();
|
|
|
|
|
|
|
|
ui->videoWidget3->stopPlay();
|
|
|
|
|
|
|
|
ui->videoWidget4->stopPlay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emit sendErrorMessage("视频流已关闭!", NotifyType::SUCCESS);
|
|
|
|
|
|
|
|
}
|
|
|
|