1.调通所有与服务器HTTP连接的接口 2.更新图语License从服务器查询和U盘获取后上报,前板可直接使用产测工具写入License 3.优化接收到前板的H264解码后出现视频卡的问题 4.更新从前板取图后旋转 5.增加ffmpeg解码的视频分辨率获取
This commit is contained in:
@@ -32,13 +32,14 @@ public:
|
||||
explicit ClientHandler(QTcpSocket* socket, QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest,
|
||||
QJsonArray frontBoardFuncConfig, QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
||||
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig, QJsonArray backBoardDevInfoJson,
|
||||
QJsonArray getPicJson, QJsonArray getVideoJson,
|
||||
QJsonArray backBoardUuidJson, QJsonArray getPicJson, QJsonArray getVideoJson,
|
||||
int clientId, QObject* parent = nullptr);
|
||||
|
||||
~ClientHandler();
|
||||
|
||||
int preVideoClientId = 0;
|
||||
int controlClientId = 0;
|
||||
void sendDevInfoItem();
|
||||
|
||||
//int preVideoClientId = 0;
|
||||
bool isData_Stuck() const;
|
||||
//static int pre_H264_clientId; // 预览H264的客户端ID
|
||||
QTcpSocket* getSocket() const { return socket; }
|
||||
@@ -87,13 +88,15 @@ public:
|
||||
signals:
|
||||
// 数据接收信号
|
||||
void dataReceived(const QString& client, const QByteArray& data, unsigned char msg_id, int currentRecvItemIndex,
|
||||
int currentRecvFuncItemIndex, const QString& itemData, const QString& funcItemData);
|
||||
int currentRecvFuncItemIndex, const QString& itemData, const QString& funcItemData,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void handleData(QByteArray& data);
|
||||
// 数据发送信号
|
||||
void sendData(const QByteArray& data);
|
||||
// 状态更新信号
|
||||
void statusUpdated(const QString& client, int itemIndex, int funcItemIndex,
|
||||
bool success, const QString& itemData, const QString& funcItemData);
|
||||
bool success, const QString& itemData, const QString& funcItemData,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
// 客户端断开连接信号
|
||||
void clientDisconnected(ClientHandler* handler);
|
||||
// json文件配置项发送完毕
|
||||
@@ -116,8 +119,8 @@ public slots:
|
||||
void onTimeoutRead();
|
||||
void checkConnectionStatus(); // 定期检查连接状态
|
||||
void processPendingData();
|
||||
void startReadVideoDataTimer();
|
||||
void stopReadVideoDataTimer();
|
||||
void startReadVideoDataTimer(int client_Id);
|
||||
void stopReadVideoDataTimer(int client_Id);
|
||||
|
||||
private:
|
||||
QTcpSocket* socket; // 客户端 socket
|
||||
@@ -130,16 +133,19 @@ private:
|
||||
QJsonArray backBoardTest; // 后板单项测试 JSON
|
||||
QJsonArray backBoardFuncConfig; // 后板功能配置参数 JSON
|
||||
QJsonArray backBoardDevInfoJson; // 后板设备信息参数 JSON
|
||||
QJsonArray backBoardUuidJson; // 后板UUID和SN参数 JSON
|
||||
QJsonArray jsonConfig; // 测试区 JSON 配置
|
||||
QJsonArray funcJsonConfig; // 功能区 JSON 配置
|
||||
QJsonArray getDevInfoJson; // 获取设备信息 JSON 配置
|
||||
QJsonArray getPicJson; // 发送取图指令 JSON 配置
|
||||
QJsonArray getVideoJson; // 发送拉视频指令 JSON 配置
|
||||
QJsonArray currentJson; // 当前处理的json
|
||||
int currentJsonItem = -1;
|
||||
int currentItemIndex; // 当前处理的测试 JSON 项目索引
|
||||
int currentFuncItemIndex; // 当前处理的功能 JSON 项目索引
|
||||
int clientId; // 新增的客户端编号
|
||||
int preVideoClientId = 0;
|
||||
int controlClientId = 1;
|
||||
|
||||
|
||||
int itemsProcessedCount; // 跟踪处理项目的数量
|
||||
QJsonObject currentItem; // 测试 json文件中当前发送的项
|
||||
QJsonObject currentFuncItem; // 功能 json文件中当前发送的项
|
||||
@@ -148,6 +154,8 @@ private:
|
||||
bool isSingleSend; // 单独点击按键发送的标志
|
||||
bool isClickedSend; // 点击按键发送的标志,没有点击不接收数据
|
||||
bool isRecvVideoData;
|
||||
bool isRecvImgData = false;
|
||||
bool isStartVideo = false;
|
||||
bool isPowerOnSend = false; // 上电发送设备信息
|
||||
//QTimer* timeoutTimer; // 超时定时器
|
||||
|
||||
|
||||
Reference in New Issue
Block a user