[fix]修改视频控件的bug

This commit is contained in:
shijianquan 2025-05-15 15:14:00 +08:00
parent 3a6992f7da
commit e5cf57c679
2 changed files with 53 additions and 1 deletions

View File

@ -33,7 +33,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += IPCVIEWERWIDGET_LIBRARY
SOURCES += main.cpp VideoWall.cpp \
SOURCES += main.cpp \
VideoWall.cpp \
../../../../../platform/src/include/service/operate_server_api/JsonOptCommand.cpp \
$$PWD/../IpcPlusWidget/VoiceSlider.cpp \
$$PWD/../IpcViewerWidget/ccaminfo.cpp \

View File

@ -607,6 +607,12 @@ void VideoWall::loadPtzCtrl()
if(curNo == -1)
return;
if(players.size() <= curNo
|| m_camInfoVec.size() <= curNo)
{
return;
}
if(players[curNo]->isPlaying())
{
m_play->setHidden(true);
@ -1050,6 +1056,11 @@ bool VideoWall::sendOptGotopreset(const std::string &preset_tag)
void VideoWall::leftPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_LEFT,1) == false)
@ -1060,6 +1071,11 @@ void VideoWall::leftPressed()
void VideoWall::rightPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_RIGHT,1) == false)
@ -1071,6 +1087,11 @@ void VideoWall::rightPressed()
void VideoWall::upPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_UP,1) == false)
@ -1081,6 +1102,11 @@ void VideoWall::upPressed()
void VideoWall::downPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_DOWN,1) == false)
@ -1091,6 +1117,11 @@ void VideoWall::downPressed()
void VideoWall::tretchPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_ZOOMIN,1) == false)
@ -1101,6 +1132,11 @@ void VideoWall::tretchPressed()
void VideoWall::drawPressed()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzContinuousMove(PTZ_ZOOMOUT,1) == false)
@ -1111,6 +1147,11 @@ void VideoWall::drawPressed()
void VideoWall::released()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
if(ptzStopMove() == false)
@ -1119,6 +1160,11 @@ void VideoWall::released()
void VideoWall::gotoPreset()
{
if(curNo < 0)
{
return;
}
if(!players[curNo]->isPlaying())
return;
else
@ -1133,6 +1179,11 @@ void VideoWall::gotoPreset()
void VideoWall::capture()
{
if(curNo < 0)
{
return;
}
if (players[curNo]->isPlaying()) {
players[curNo]->videoCapture()->setCaptureName(QDateTime::currentDateTime().toString("yyyy_MMdd_hhmmss_z"));
players[curNo]->videoCapture()->capture();