Dgq
dusky
2025-07-28 dcb3a2c9ca93ed20aa64eef08d0dfdf320a42ac0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef VIDEOSTORAGEMANAGER_H
#define VIDEOSTORAGEMANAGER_H
 
#include <QObject>
 
class VideoStorageManager : public QObject {
    Q_OBJECT
public:
    explicit VideoStorageManager(QObject *parent = nullptr);
 
    // 存储视频片段
    bool storeVideo(const QString &cameraId, const QByteArray &videoData,
                   const QDateTime &timestamp);
 
    // 检索视频片段
    QByteArray retrieveVideo(const QString &cameraId,
                            const QDateTime &startTime,
                            const QDateTime &endTime);
 
    // 视频文件清理策略
    void applyRetentionPolicy(int maxDays);
 
private:
    QString m_storagePath;
    QMutex m_mutex;
};
 
#endif // VIDEOSTORAGEMANAGER_H