|
|
@ -37,15 +37,17 @@ void GDDCSet::initParam() {
|
|
|
|
// ui->comboBox_streamType->addItem("UDP Raw");
|
|
|
|
// ui->comboBox_streamType->addItem("UDP Raw");
|
|
|
|
// ui->comboBox_streamType->addItem("UDP 422");
|
|
|
|
// ui->comboBox_streamType->addItem("UDP 422");
|
|
|
|
// ui->comboBox_streamType->addItem("UDP TS");
|
|
|
|
// ui->comboBox_streamType->addItem("UDP TS");
|
|
|
|
ui->comboBox_playURL1->addItem("rtsp://192.168.55.65:554/live/track0");
|
|
|
|
ui->comboBox_playURL1->addItem(
|
|
|
|
|
|
|
|
QStringLiteral("rtsp://192.168.55.65:554/live/track0"));
|
|
|
|
|
|
|
|
ui->comboBox_playURL1->setCurrentIndex(0);
|
|
|
|
// ui->comboBox_playURL1->addItem(
|
|
|
|
// ui->comboBox_playURL1->addItem(
|
|
|
|
// "rtmp://liteavapp.qcloud.com/live/liteavdemoplayerstreamid");
|
|
|
|
// "rtmp://liteavapp.qcloud.com/live/liteavdemoplayerstreamid");
|
|
|
|
ui->comboBox_playURL1->setEditable(true);
|
|
|
|
ui->comboBox_playURL1->setEditable(true);
|
|
|
|
|
|
|
|
ui->comboBox_streamSource->addItem("地面端");
|
|
|
|
|
|
|
|
ui->comboBox_streamSource->addItem("载荷端");
|
|
|
|
|
|
|
|
ui->comboBox_streamSource->setCurrentIndex(0);
|
|
|
|
|
|
|
|
|
|
|
|
ui->lineEdit_pushURL->setText(
|
|
|
|
ui->lineEdit_pushURL->setText(QStringLiteral("-1"));
|
|
|
|
QStringLiteral("rtmp://182.92.130.23/app/stream99"));
|
|
|
|
|
|
|
|
/*"rtsp://192.168.1.160:554/live/track0"*/
|
|
|
|
|
|
|
|
/*"rtmp://liteavapp.qcloud.com/live/liteavdemoplayerstreamid"*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ui->radioButton_NetCtrlUDP->setChecked(true);
|
|
|
|
ui->radioButton_NetCtrlUDP->setChecked(true);
|
|
|
|
ui->radioButton_NetCtrlTCP->setChecked(false);
|
|
|
|
ui->radioButton_NetCtrlTCP->setChecked(false);
|
|
|
@ -62,10 +64,10 @@ void GDDCSet::initParam() {
|
|
|
|
m_FlowType = streamTypeToflowType(QString::fromUtf8(inBuf));
|
|
|
|
m_FlowType = streamTypeToflowType(QString::fromUtf8(inBuf));
|
|
|
|
ui->comboBox_streamType->setCurrentText(flowTypeTostreamType(m_FlowType));
|
|
|
|
ui->comboBox_streamType->setCurrentText(flowTypeTostreamType(m_FlowType));
|
|
|
|
|
|
|
|
|
|
|
|
::GetPrivateProfileStringA("光电吊舱-视频连接-显示窗口1", "播放URL", "-1",
|
|
|
|
// ::GetPrivateProfileStringA("光电吊舱-视频连接-显示窗口1", "播放URL", "-1",
|
|
|
|
inBuf, 100, strSysIniName);
|
|
|
|
// inBuf, 100, strSysIniName);
|
|
|
|
m_playURL1 = QString::fromUtf8(inBuf);
|
|
|
|
// m_playURL1 = QString::fromUtf8(inBuf);
|
|
|
|
ui->comboBox_playURL1->setCurrentText(m_playURL1);
|
|
|
|
// ui->comboBox_playURL1->setCurrentText(m_playURL1);
|
|
|
|
|
|
|
|
|
|
|
|
// ::GetPrivateProfileStringA("光电吊舱-视频连接-显示窗口2", "播放URL", "-1",
|
|
|
|
// ::GetPrivateProfileStringA("光电吊舱-视频连接-显示窗口2", "播放URL", "-1",
|
|
|
|
// inBuf, 100, strSysIniName);
|
|
|
|
// inBuf, 100, strSysIniName);
|
|
|
@ -75,7 +77,7 @@ void GDDCSet::initParam() {
|
|
|
|
::GetPrivateProfileStringA("光电吊舱-推流", "推流URL", "-1", inBuf, 100,
|
|
|
|
::GetPrivateProfileStringA("光电吊舱-推流", "推流URL", "-1", inBuf, 100,
|
|
|
|
strSysIniName);
|
|
|
|
strSysIniName);
|
|
|
|
m_pushURL = QString::fromUtf8(inBuf);
|
|
|
|
m_pushURL = QString::fromUtf8(inBuf);
|
|
|
|
ui->lineEdit_pushURL->setText(m_pushURL);
|
|
|
|
// ui->lineEdit_pushURL->setText(m_pushURL);
|
|
|
|
|
|
|
|
|
|
|
|
::GetPrivateProfileStringA("光电吊舱-网络控制", "远端IP", "-1", inBuf, 100,
|
|
|
|
::GetPrivateProfileStringA("光电吊舱-网络控制", "远端IP", "-1", inBuf, 100,
|
|
|
|
strSysIniName);
|
|
|
|
strSysIniName);
|
|
|
@ -106,6 +108,7 @@ void GDDCSet::on_pushButton_ConnectURL1_clicked() {
|
|
|
|
emit SignalStopConnect(1);
|
|
|
|
emit SignalStopConnect(1);
|
|
|
|
ui->pushButton_ConnectURL1->setText("连接");
|
|
|
|
ui->pushButton_ConnectURL1->setText("连接");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// this->on_pushButton_pushURL_clicked();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 视频连接-显示窗口2-连接
|
|
|
|
// 视频连接-显示窗口2-连接
|
|
|
@ -146,7 +149,6 @@ void GDDCSet::on_pushButton_NetCtrlConnect_clicked() {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
emit SignalStartConnect(5);
|
|
|
|
emit SignalStartConnect(5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ui->pushButton_NetCtrlConnect->setText("断开");
|
|
|
|
ui->pushButton_NetCtrlConnect->setText("断开");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
emit SignalStopConnect(4);
|
|
|
|
emit SignalStopConnect(4);
|
|
|
@ -226,6 +228,13 @@ void GDDCSet::saveDataToLocalIni() {
|
|
|
|
m_playURL1 = ui->comboBox_playURL1->currentText();
|
|
|
|
m_playURL1 = ui->comboBox_playURL1->currentText();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GDDCSet::initPullURL(QString remoteIP) {
|
|
|
|
|
|
|
|
if (!remoteIP.isEmpty()) {
|
|
|
|
|
|
|
|
m_playURL1 = "rtsp://" + remoteIP + ":554/live/track0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ui->comboBox_playURL1->setCurrentText(m_playURL1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// //流类型
|
|
|
|
// //流类型
|
|
|
|
// void GDDCSet::on_comboBox_streamType_currentIndexChanged(int index)
|
|
|
|
// void GDDCSet::on_comboBox_streamType_currentIndexChanged(int index)
|
|
|
|
// {
|
|
|
|
// {
|
|
|
@ -276,12 +285,36 @@ void GDDCSet::setPushStreamText(QString param) {
|
|
|
|
|
|
|
|
|
|
|
|
// uavID值改变事件
|
|
|
|
// uavID值改变事件
|
|
|
|
void GDDCSet::on_uavIDSpinBox_valueChanged(int arg1) {
|
|
|
|
void GDDCSet::on_uavIDSpinBox_valueChanged(int arg1) {
|
|
|
|
|
|
|
|
QString streamSource = ui->comboBox_streamSource->currentText();
|
|
|
|
int uavID = arg1;
|
|
|
|
int uavID = arg1;
|
|
|
|
auto iter = g_mapAppName.find(uavID);
|
|
|
|
auto iter = g_mapAppName.find(uavID);
|
|
|
|
if (iter != g_mapAppName.end()) {
|
|
|
|
if (iter != g_mapAppName.end()) {
|
|
|
|
QString pushURL =
|
|
|
|
if ("地面端" == streamSource) {
|
|
|
|
generatePushURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
QString pushURL =
|
|
|
|
ui->lineEdit_pushURL->setText(pushURL);
|
|
|
|
generatePushURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
|
|
|
ui->lineEdit_pushURL->setText(pushURL);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
QString pullURL =
|
|
|
|
|
|
|
|
generatePullURL(uavID, QString::fromStdString(iter->second));
|
|
|
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, pullURL);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 切换拉流来源
|
|
|
|
|
|
|
|
void GDDCSet::on_comboBox_streamSource_currentIndexChanged(int index) {
|
|
|
|
|
|
|
|
if (0 == index) {
|
|
|
|
|
|
|
|
ui->pushButton_pushURL->setEnabled(true);
|
|
|
|
|
|
|
|
ui->comboBox_playURL1->setItemText(0, m_playURL1);
|
|
|
|
|
|
|
|
} else if (1 == index) {
|
|
|
|
|
|
|
|
ui->pushButton_pushURL->setEnabled(false);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|