|
|
|
@ -50,8 +50,10 @@ void GDDCSet::initParam() {
|
|
|
|
|
ui->comboBox_streamSource->addItem("载荷端");
|
|
|
|
|
ui->comboBox_streamSource->setCurrentIndex(0);
|
|
|
|
|
|
|
|
|
|
ui->comboBox_pushURL->addItem(QStringLiteral("-1"));
|
|
|
|
|
ui->comboBox_pushURL->addItem(QStringLiteral("-1"));
|
|
|
|
|
// 应急厅指挥平台----->push.uavideo.cn
|
|
|
|
|
ui->comboBox_pushURL->addItem(QStringLiteral("应急厅指挥平台"));
|
|
|
|
|
// 应急厅铁塔平台----->182.92.130.23
|
|
|
|
|
ui->comboBox_pushURL->addItem(QStringLiteral("应急厅铁塔平台"));
|
|
|
|
|
|
|
|
|
|
ui->radioButton_NetCtrlUDP->setChecked(true);
|
|
|
|
|
ui->radioButton_NetCtrlTCP->setChecked(false);
|
|
|
|
@ -223,7 +225,24 @@ void GDDCSet::saveDataToLocalIni() {
|
|
|
|
|
// inBuf,
|
|
|
|
|
// strSysIniName);
|
|
|
|
|
|
|
|
|
|
m_pushURL = ui->comboBox_pushURL->currentText();
|
|
|
|
|
int uavID = ui->uavIDSpinBox->value();
|
|
|
|
|
if (ui->radioButton->isChecked()) {
|
|
|
|
|
m_pushURL = ui->comboBox_pushURL->currentText();
|
|
|
|
|
} else {
|
|
|
|
|
if (ui->comboBox_pushURL->currentIndex() == 0) {
|
|
|
|
|
auto iter = mapPushURL_yjzh.find(uavID);
|
|
|
|
|
if (iter != mapPushURL_yjzh.end()) {
|
|
|
|
|
m_pushURL = iter->second;
|
|
|
|
|
}
|
|
|
|
|
} else if (ui->comboBox_pushURL->currentIndex() == 1) {
|
|
|
|
|
auto iter = mapPushURL_yjtt.find(uavID);
|
|
|
|
|
if (iter != mapPushURL_yjtt.end()) {
|
|
|
|
|
m_pushURL = iter->second;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
qDebug() << "推流地址:" << m_pushURL;
|
|
|
|
|
// m_pushURL = ui->comboBox_pushURL->currentText();
|
|
|
|
|
ba = m_pushURL.toLocal8Bit();
|
|
|
|
|
inBuf = ba.data();
|
|
|
|
|
::WritePrivateProfileStringA("光电吊舱-推流", "推流URL", inBuf,
|
|
|
|
@ -296,14 +315,28 @@ void GDDCSet::on_uavIDSpinBox_valueChanged(int arg1) {
|
|
|
|
|
if ("地面端" == streamSource) {
|
|
|
|
|
QString pushURL =
|
|
|
|
|
generatePushURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
mapPushURL_yjzh[uavID] = pushURL; // 应急厅指挥平台
|
|
|
|
|
qDebug() << pushURL;
|
|
|
|
|
|
|
|
|
|
QString pushURL2 =
|
|
|
|
|
generatePushURL2(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_pushURL->setItemText(0, pushURL);
|
|
|
|
|
ui->comboBox_pushURL->setItemText(1, pushURL2);
|
|
|
|
|
mapPushURL_yjtt[uavID] = pushURL2; // 应急厅铁塔平台
|
|
|
|
|
qDebug() << pushURL2;
|
|
|
|
|
|
|
|
|
|
// ui->comboBox_pushURL->setItemText(0, pushURL);
|
|
|
|
|
// ui->comboBox_pushURL->setItemText(1, pushURL2);
|
|
|
|
|
} else {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
if (!ui->radioButton->isChecked()) {
|
|
|
|
|
if (ui->comboBox_pushURL->currentIndex() == 0) {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
} else if (ui->comboBox_pushURL->currentIndex() == 1) {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL2(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
@ -319,9 +352,30 @@ void GDDCSet::on_comboBox_streamSource_currentIndexChanged(int index) {
|
|
|
|
|
int uavID = ui->uavIDSpinBox->value();
|
|
|
|
|
auto iter = g_mapAppName.find(uavID);
|
|
|
|
|
if (iter != g_mapAppName.end()) {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
// QString pullURL =
|
|
|
|
|
// generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
// ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
if (!ui->radioButton->isChecked()) {
|
|
|
|
|
if (ui->comboBox_pushURL->currentIndex() == 0) {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
} else if (ui->comboBox_pushURL->currentIndex() == 1) {
|
|
|
|
|
QString pullURL =
|
|
|
|
|
generatePullURL2(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GDDCSet::on_radioButton_clicked() {
|
|
|
|
|
if (ui->radioButton->isChecked()) {
|
|
|
|
|
ui->comboBox_pushURL->setEditable(true);
|
|
|
|
|
ui->uavIDSpinBox->setEnabled(false);
|
|
|
|
|
} else {
|
|
|
|
|
ui->comboBox_pushURL->setEditable(false);
|
|
|
|
|
ui->uavIDSpinBox->setEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|