2025-03-17 13:44:44 +08:00
|
|
|
|
#ifndef IPCPLUSWIDGET_H
|
2025-03-14 17:05:48 +08:00
|
|
|
|
#define IPCPLUSWIDGET_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QtAV>
|
|
|
|
|
|
#include <QtAVWidgets>
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
|
#include "net_msg_bus_api/CMbCommunicator.h"
|
|
|
|
|
|
#include "CCamInfo.h"
|
|
|
|
|
|
#include "COnvifOpt.h"
|
|
|
|
|
|
#include <CPlayerCfgParser.h>
|
|
|
|
|
|
#include <QThread>
|
|
|
|
|
|
class Slider;
|
|
|
|
|
|
class QPushButton;
|
|
|
|
|
|
class QWidget;
|
|
|
|
|
|
class QToolButton;
|
|
|
|
|
|
class Renderer;
|
|
|
|
|
|
class VoiceSlider;
|
|
|
|
|
|
class QComboBox;
|
|
|
|
|
|
|
|
|
|
|
|
namespace QtAV {
|
|
|
|
|
|
class AVPlayer;
|
|
|
|
|
|
class WidgetRenderer;
|
|
|
|
|
|
class AVError;
|
|
|
|
|
|
}
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class IpcPlusWidget;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class IpcPlusWidget : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit IpcPlusWidget(bool editMode = false,QWidget *parent = 0);
|
|
|
|
|
|
~IpcPlusWidget();
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void setStreamInfo(QString pointTag);
|
|
|
|
|
|
void setNodeInfo(int nDomainId,int nAppid);
|
|
|
|
|
|
void setNodeName(const QString &nodeName);
|
|
|
|
|
|
void setAppName(const QString &appName);
|
|
|
|
|
|
|
|
|
|
|
|
void slotInitStream(CCamInfo caminfo, int result);
|
|
|
|
|
|
signals:
|
|
|
|
|
|
void sigCamInfo(CCamInfo caminfo);
|
|
|
|
|
|
private:
|
|
|
|
|
|
void init();
|
|
|
|
|
|
void loadCamInfo();
|
|
|
|
|
|
void startStream();
|
|
|
|
|
|
void setCapturePath();
|
|
|
|
|
|
|
|
|
|
|
|
bool ptzContinuousMove(int cmd,double cmd_speed = 1);
|
|
|
|
|
|
bool ptzStopMove();
|
|
|
|
|
|
bool ptzGotopreset(const std::string &preset_tag);
|
|
|
|
|
|
|
|
|
|
|
|
bool sendOptContinuousMove(int cmd, double cmd_speed = 1);
|
|
|
|
|
|
bool sendOptStopMove();
|
|
|
|
|
|
bool sendOptGotopreset(const std::string &preset_tag);
|
|
|
|
|
|
|
|
|
|
|
|
void gotoPreset();
|
|
|
|
|
|
|
|
|
|
|
|
void setShowVoice(bool bo);
|
|
|
|
|
|
|
|
|
|
|
|
void setVoiceNum();
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void play();
|
|
|
|
|
|
void pause();
|
|
|
|
|
|
void capture();
|
|
|
|
|
|
|
|
|
|
|
|
void leftPressed();
|
|
|
|
|
|
void released();
|
|
|
|
|
|
|
|
|
|
|
|
void rightPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void upPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void downPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void tretchPressed();
|
|
|
|
|
|
void released_1();
|
|
|
|
|
|
|
|
|
|
|
|
void drawPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void farPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void nearPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void bigPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void smallPressed();
|
|
|
|
|
|
|
|
|
|
|
|
void voiceSliderShow();
|
|
|
|
|
|
|
|
|
|
|
|
void slotVoiceClose(int voice);
|
|
|
|
|
|
|
|
|
|
|
|
void slotVoiceOpen(int voice);
|
|
|
|
|
|
|
|
|
|
|
|
double getCurrentCmdspeed();
|
|
|
|
|
|
|
|
|
|
|
|
void slot_presets_itemChanged(const QString & str);
|
|
|
|
|
|
private:
|
|
|
|
|
|
QtAV::AVPlayer *m_player;
|
|
|
|
|
|
QtAV::VideoRenderer *m_s_vo;
|
|
|
|
|
|
CPlayerCfgParser m_playerCfgParser;
|
|
|
|
|
|
QPushButton *m_play,*m_pause;
|
|
|
|
|
|
|
|
|
|
|
|
QPushButton *m_cap; //抓图
|
|
|
|
|
|
QPushButton *m_voiceOpen,*m_voiceClose;
|
|
|
|
|
|
VoiceSlider *m_voiceSlider;
|
|
|
|
|
|
|
|
|
|
|
|
QLabel m_ptz,m_tj,m_jj,m_gq,m_preset;//云台 调焦 聚焦 光圈
|
|
|
|
|
|
QPushButton *m_up,*m_down,*m_left,*m_right; //上下左右
|
|
|
|
|
|
QPushButton *m_tretch,*m_draw,*m_far,*m_near,*m_big,*m_small; //伸 缩 远 近 大 小
|
|
|
|
|
|
QWidget *m_control_1;
|
|
|
|
|
|
QWidget *m_control_2;
|
|
|
|
|
|
QComboBox *m_combox;
|
|
|
|
|
|
QPushButton *m_allot; //调用
|
|
|
|
|
|
|
|
|
|
|
|
int m_nDomainId;
|
|
|
|
|
|
int m_nAppId;
|
|
|
|
|
|
std::string m_strNodeName;
|
|
|
|
|
|
std::string m_strAppName;
|
|
|
|
|
|
|
2025-03-17 09:23:17 +08:00
|
|
|
|
iot_net::CMbCommunicator m_com;
|
2025-03-14 17:05:48 +08:00
|
|
|
|
|
|
|
|
|
|
//< 摄像头相关信息
|
|
|
|
|
|
QString m_pointTag; //< 摄像头关联点
|
|
|
|
|
|
CCamInfo m_caminfo;
|
|
|
|
|
|
int m_voice;
|
|
|
|
|
|
Ui::IpcPlusWidget *ui;
|
|
|
|
|
|
|
|
|
|
|
|
QThread m_onvifThread;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // IPCPLUSWIDGET_H
|