Skip to main content

RTSPInput.h File

RTSPInput Node — source that reads from an RTSP server. More...

Included Headers

#include "builder/Node.h" #include <memory> #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classRTSPInput

RTSP source Node — pulls a stream from an RTSP URL. More...

Description

RTSPInput Node — source that reads from an RTSP server.

Wraps rtspsrc. Place at the head of a Session that consumes a network camera or other RTSP stream; downstream stages typically chain RTP depayload and an H.264 decoder. Because it carries InputRole::Source, the Session is driven with Run::run() (no push()).

File Listing

The file content with the documentation metadata removed is:

1
11#pragma once
12#include "builder/Node.h"
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace simaai::neat {
18
28class RTSPInput final : public Node {
29public:
31 RTSPInput(std::string url, int latency_ms = 200, bool tcp = true, bool drop_on_latency = false,
32 std::string buffer_mode = "");
33
35 std::string kind() const override {
36 return "RTSPInput";
37 }
39 std::string user_label() const override {
40 return url_;
41 }
43 InputRole input_role() const override {
44 return InputRole::Source;
45 }
47 NodeCapsBehavior caps_behavior() const override {
48 return NodeCapsBehavior::Dynamic;
49 }
50
52 std::string backend_fragment(int node_index) const override;
54 std::vector<std::string> element_names(int node_index) const override;
55
57 const std::string& url() const {
58 return url_;
59 }
61 int latency_ms() const {
62 return latency_ms_;
63 }
65 bool tcp() const {
66 return tcp_;
67 }
69 bool drop_on_latency() const {
70 return drop_on_latency_;
71 }
73 const std::string& buffer_mode() const {
74 return buffer_mode_;
75 }
76
77private:
78 std::string url_;
79 int latency_ms_ = 200;
80 bool tcp_ = true;
81 bool drop_on_latency_ = false;
82 std::string buffer_mode_;
83};
84
85} // namespace simaai::neat
86
87namespace simaai::neat::nodes {
89std::shared_ptr<simaai::neat::Node> RTSPInput(std::string url, int latency_ms = 200,
90 bool tcp = true, bool drop_on_latency = false,
91 std::string buffer_mode = "");
92} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.