#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 ×tamp);
|
|
// 检索视频片段
|
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
|