1. 增加猫眼镜头切换IRCUT; 2. 优化连续多次打开视频获取视频流导致的内存问题

This commit is contained in:
2024-09-02 18:37:24 +08:00
parent 09c5843358
commit 15eb213578
19 changed files with 153 additions and 181 deletions

View File

@@ -15,6 +15,7 @@
#include <cstdint>
#include <vector>
#include <QDir>
#include <QLineEdit>
#include "RingBuffer.h"
#include "FocusWindow.h"
@@ -38,7 +39,7 @@ public:
~FFmpegDecoder() override;
void initialize();
void decodeFile(const QString& filePath, QLabel* videoLabel);
void decodeFile(const QString& videoFilePath, QLabel* videoLabel, QLineEdit* VideoResolutionEdit);
void decodeSingleFrame(const QByteArray& data, QLabel* videoLabel); // 添加 videoLabel 参数
void FFmpegDecoder::processVideo(int itemIndex);
bool initializeFFmpeg(const QString& filePath);
@@ -55,6 +56,7 @@ private:
QWaitCondition condition;
QString filePath;
QLabel* videoLabel;
QLineEdit* resolutionEdit;
bool abort;
bool restart;