|
|
|
@ -5,10 +5,9 @@ ModelCameraDlg::ModelCameraDlg(QWidget *parent)
|
|
|
|
|
: QDialog(parent), ui(new Ui::ModelCameraDlg) {
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
ui->videoIPLineEdit->setText(QStringLiteral(
|
|
|
|
|
"rtmp://liteavapp.qcloud.com/live/"
|
|
|
|
|
"liteavdemoplayerstreamid")); // rtsp://192.168.5.70:8554/LIVE
|
|
|
|
|
"rtsp://192.168.5.70:8554/LIVE")); // rtsp://192.168.5.70:8554/LIVE
|
|
|
|
|
ui->pushStreamIPEdit->setText(
|
|
|
|
|
QStringLiteral("rtmp://182.92.130.23/app/stream999"));
|
|
|
|
|
QStringLiteral("rtmp://182.92.130.23/app/stream99"));
|
|
|
|
|
ui->cameraVideoWidget->setVedioSaveFileDirPath("./3DCameraVideo");
|
|
|
|
|
InitialComboBox();
|
|
|
|
|
cameraCMDThread = new QThread();
|
|
|
|
@ -172,6 +171,14 @@ void ModelCameraDlg::on_pushButton_5_clicked() {
|
|
|
|
|
ffmpegvideoDlg *videoDlg = ui->cameraVideoWidget;
|
|
|
|
|
if (str == "播放视频") {
|
|
|
|
|
QString streamIP = ui->videoIPLineEdit->text();
|
|
|
|
|
if (streamIP.isEmpty()) {
|
|
|
|
|
QMessageBox::warning(NULL, "提示", "拉流地址为空!", QMessageBox::Ok);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!(streamIP.left(4) == "rtmp" || streamIP.left(4) == "rtsp")) {
|
|
|
|
|
QMessageBox::warning(NULL, "提示", "拉流地址有误!", QMessageBox::Ok);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
videoDlg->setStreamIP(streamIP);
|
|
|
|
|
videoDlg->setPlayVideo(true);
|
|
|
|
|
ui->pushButton_5->setText("暂停播放");
|
|
|
|
@ -188,6 +195,19 @@ void ModelCameraDlg::on_pushStreamBtn_clicked() {
|
|
|
|
|
if (str == "开始推流") {
|
|
|
|
|
QString streamIP = ui->videoIPLineEdit->text();
|
|
|
|
|
QString pushIP = ui->pushStreamIPEdit->text();
|
|
|
|
|
if (streamIP.isEmpty() || pushIP.isEmpty()) {
|
|
|
|
|
QMessageBox::warning(NULL, "提示", "拉流或推流地址为空!",
|
|
|
|
|
QMessageBox::Ok);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!(streamIP.left(4) == "rtmp" || streamIP.left(4) == "rtsp")) {
|
|
|
|
|
QMessageBox::warning(NULL, "提示", "拉流地址有误!", QMessageBox::Ok);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!(pushIP.left(4) == "rtmp" || pushIP.left(4) == "rtsp")) {
|
|
|
|
|
QMessageBox::warning(NULL, "提示", "推流地址有误!", QMessageBox::Ok);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
videoDlg->setStreamIP(streamIP);
|
|
|
|
|
videoDlg->setPushStreamIP(pushIP);
|
|
|
|
|
videoDlg->setPushStream(true);
|
|
|
|
|