1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include "nodes/base/base.hpp"
- #include "nodes/stream/streamNode.hpp"
- #include "nodes/infer/inferNode.hpp"
- #include "nodes/draw/drawNode.hpp"
- #include "nodes/httpPush/httpPush.hpp"
- int main()
- {
- std::shared_ptr<Node::StreamNode> src_node0 = std::make_shared<Node::StreamNode>("src0", "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/101");
- src_node0->set_skip_frame(10);
- std::shared_ptr<Node::StreamNode> src_node1 = std::make_shared<Node::StreamNode>("src1", "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/201");
- src_node1->set_skip_frame(10);
- std::shared_ptr<Node::StreamNode> src_node2 = std::make_shared<Node::StreamNode>("src2", "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/301");
- src_node2->set_skip_frame(10);
- std::shared_ptr<Node::InferNode> infer_node = std::make_shared<Node::InferNode>("infer");
- std::shared_ptr<Node::DrawNode> draw_node = std::make_shared<Node::DrawNode>("draw");
- std::shared_ptr<Node::HttpPushNode> push_node = std::make_shared<Node::HttpPushNode>("push", "172.16.20.168", 8080, "/push");
- Node::LinkNode(src_node0, infer_node);
- Node::LinkNode(src_node1, infer_node);
- Node::LinkNode(src_node2, infer_node);
- Node::LinkNode(infer_node, draw_node);
- Node::LinkNode(draw_node, push_node);
- push_node->start();
- draw_node->start();
- infer_node->start();
- src_node0->start();
- src_node1->start();
- src_node2->start();
- getchar();
- return 0;
- }
- // TODO:创建pipeline类,能够打印pipeline的结构、状态、启动、停止、重启、添加节点、删除节点、连接节点、断开节点
- // TODO: 硬解码
- // TODO: 模型多路复用
- // TODO: 通过配置文件创建 pipeline
- // TODO: 多种推理框架支持 opencv tensorrt onnxruntime ...
- // TODO:日志系统
- // TODO: 结果推送接口 http mqtt ...
- // TODO: 电子围栏
|