#include "nodes/base/base.hpp" #include "nodes/stream/streamNode.hpp" #include "nodes/infer/inferNode.hpp" #include "nodes/draw/drawNode.hpp" #include "nodes/track/trackNode.hpp" #include "nodes/analyze/analyzeNode.hpp" #include "nodes/httpPush/httpPush.hpp" #include "nodes/record/recordNode.hpp" #include "plog/Log.h" #include "plog/Initializers/RollingFileInitializer.h" #include "pipeline/pipeline.hpp" int main(int argc , char* argv[]) { plog::init(plog::info, "log/vsp.log", 1000000, 5); if (argc < 3) { std::cerr << "Usage: " << argv[0] << " " << std::endl; return 1; } const char* config_path = argv[1]; const char* config_type = argv[2]; Pipe::PipelineManager pipeline_manager; if (std::string(config_type) == "yaml") { pipeline_manager.create_from_yaml(std::string(config_path)); } else if (std::string(config_type) == "json") { pipeline_manager.create_from_json(std::string(config_path)); } else { std::cerr << "Unknown config type: " << config_type << std::endl; return 1; } pipeline_manager.create_from_json(std::string(json_path)); for (const auto& p : pipeline_manager.getPipelines()) { std::cout << "Pipeline ID: " << p.pipeline_id << ", Description: " << p.description << ", Nodes: " << p.nodes.size() << std::endl; for(const auto& node : p.nodes) { std::cout << " - Node Name: " << node->get_name() << std::endl; } } pipeline_manager.start_all_pipelines(); pipeline_manager.show_all_pipeline(); getchar(); return 0; } // TODO // 硬解码、软解码 完成 软解使用opencv + ffmpeg,硬解使用nvcodec + ffmpeg // 模型复用 完成,基类加锁保证一致性 // 画图节点 完成 // 推送节点 基本完成 // 日志 完成 // YOLO11 seg 完成 // 通过配置文件创建 pipeline 完成 // 分析节点 // 置信度阈值修改 // 设置电子围栏 // 数据传输过程中使用显存指针