- 创建基本项目结构和目录 - 添加CMake构建系统 - 实现基础的配置解析功能 - 添加YOLO推理框架支持 - 集成RTSP和视频流处理功能 - 添加性能监控和日志系统
32 lines
695 B
C++
32 lines
695 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <opencv2/opencv.hpp>
|
|
#include "../common/config_parser.hpp"
|
|
|
|
namespace pipeline {
|
|
|
|
class WriterInterface {
|
|
public:
|
|
virtual ~WriterInterface() = default;
|
|
|
|
// 初始化写入器
|
|
virtual bool init(const OutputTargetConfig& config) = 0;
|
|
|
|
// 写入一帧
|
|
virtual bool write(const cv::Mat& frame) = 0;
|
|
|
|
// 检查是否已打开
|
|
virtual bool isOpened() const = 0;
|
|
|
|
// 释放资源
|
|
virtual void release() = 0;
|
|
|
|
// 获取写入器名称
|
|
virtual std::string getName() const = 0;
|
|
|
|
// 获取当前状态
|
|
virtual bool getStatus(std::string& error_msg) const = 0;
|
|
};
|
|
|
|
} // namespace pipeline
|