#ifndef VIDEO_PIPELINE_HPP #define VIDEO_PIPELINE_HPP #include #include #include #include "algorithm_service.hpp" #include "rtsp_camera_service.hpp" #include "rtsp_stream_pusher.hpp" class VideoPipeline { public: VideoPipeline(); ~VideoPipeline(); // 启动流水线 // inputUrl: 拉流地址 (摄像头) // outputUrl: 推流地址 (MediaMTX) void Start(const std::string& inputUrl, const std::string& outputUrl); // 停止流水线 void Stop(); private: void pipelineLoop(); private: RtspCameraService camera; RtspStreamPusher pusher; AlgorithmService algo; std::string inputUrl; std::string outputUrl; std::thread workThread; std::atomic isRunning; }; #endif // VIDEO_PIPELINE_HPP