修改分包接收前板发的YUV数据,取图成功后保存YUV图和JPG图
This commit is contained in:
@@ -33,9 +33,7 @@ class DataHandler : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DataHandler(QLabel* leftLens_imageLabel, QLabel* rightLens_imageLabel, QLabel* videoLabel,
|
||||
QLineEdit* VideoResolutionEdit,
|
||||
QTextEdit* licenseHwInfoEdit, QMap<QString, QLineEdit*>* devInfoLineEdits,
|
||||
explicit DataHandler(QLabel* videoLabel, QLineEdit* VideoResolutionEdit, QSize labelSize, QMap<QString, QLineEdit*>* devInfoLineEdits,
|
||||
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
||||
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
||||
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig,
|
||||
@@ -52,7 +50,11 @@ signals:
|
||||
void statusUpdated(const QString& clientAddress, int currentItemIndex, int currentFuncItemIndex,
|
||||
bool success, const QString& currentItemLabel, const QString& currentFuncItemLabel,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
|
||||
void updateLicenseHwInfoEdit(const QString& text);
|
||||
void updateLeftLensImage(const QPixmap& pixmap);
|
||||
void updateRightLensImage(const QPixmap& pixmap);
|
||||
void updateVideoLabel(const QPixmap& pixmap);
|
||||
void updateVideoResolution(const QString& resolutionText);
|
||||
private:
|
||||
QJsonArray frontBoardOneClickTest; // 前板一键功能测试 JSON
|
||||
QJsonArray frontBoardTest; // 前板单项测试 JSON
|
||||
@@ -67,20 +69,22 @@ private:
|
||||
QJsonArray getDevInfoJson; // 获取设备信息 JSON 配置
|
||||
QJsonArray getPicJson; // 发送取图指令 JSON 配置
|
||||
QJsonArray getVideoJson; // 发送拉视频指令 JSON 配置
|
||||
QLabel* leftLens_m_imageLabel;
|
||||
QLabel* rightLens_m_imageLabel;
|
||||
//QLabel* leftLens_m_imageLabel;
|
||||
//QLabel* rightLens_m_imageLabel;
|
||||
QLabel* videoLabel;
|
||||
QLineEdit* VideoResolutionEdit;
|
||||
QTextEdit* licenseHwInfoEdit;
|
||||
//QTextEdit* licenseHwInfoEdit;
|
||||
QByteArray allRecvData; // 完整的一帧数据
|
||||
int remain = 0;
|
||||
int start_run = 0;
|
||||
long dataLen = 0;
|
||||
FFmpegDecoder* ffmpegDecoder;
|
||||
QByteArray *buffer;
|
||||
QByteArray* buffer;
|
||||
QByteArray* picBuffer;
|
||||
QHash<QString, unsigned char> clientLastMsgId;
|
||||
QMap<QString, QLineEdit*>* devInfoLineEdits;
|
||||
QMap<int, QString> msgIdToCmdMap;
|
||||
QSize labelSize;
|
||||
|
||||
// 如果接收十六进制数据,转为二进制
|
||||
QByteArray hexStringToByteArray(const QString& hexString);
|
||||
@@ -92,6 +96,8 @@ private:
|
||||
void handleBackCmd(int msg_id, const QString& client, QByteArray actual_data);
|
||||
void initializeMsgIdToCmdMap();
|
||||
void updateLineEdit(int msg_id, const QByteArray& actual_data);
|
||||
void showPic(QSize labelSize, int lens_n,
|
||||
int width, int height, int format, const QByteArray* valData);
|
||||
};
|
||||
|
||||
#endif // DATAHANDLER_H
|
||||
|
||||
Reference in New Issue
Block a user