Skip to main content

Output.h File

Output Node — terminal sink that exposes pulled samples to Run::pull(). More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

structOutputOptions

Buffering / sync options for the Output Node. More...

classOutput

Pull-side terminal sink. More...

Description

Output Node — terminal sink that exposes pulled samples to Run::pull().

Wraps an appsink-style element. Place at the end of a Graph that uses async-mode (Run::pull()). For sync-mode pipelines that write directly to a file, use the file-output Graph fragments instead.

File Listing

The file content with the documentation metadata removed is:

1
10#pragma once
11
12#include "builder/Node.h"
13
14#include <memory>
15#include <string>
16#include <utility>
17#include <vector>
18
19namespace simaai::neat {
20
30enum class CombinePolicy {
33 None,
34
38
41 ByPts,
42};
43
53 int max_buffers = 4;
54 bool drop = false;
55 bool sync = false;
57
64};
65
71class Output final : public Node {
72public:
74 Output() = default;
76 explicit Output(std::string name) : endpoint_name_(std::move(name)) {}
78 explicit Output(OutputOptions opt) : opt_(std::move(opt)) {}
80 Output(std::string name, OutputOptions opt)
81 : opt_(std::move(opt)), endpoint_name_(std::move(name)) {}
82
84 const OutputOptions& options() const {
85 return opt_;
86 }
87
89 std::string kind() const override {
90 return "Output";
91 }
93 std::string user_label() const override {
94 return endpoint_name_;
95 }
97 const std::string& endpoint_name() const noexcept {
98 return endpoint_name_;
99 }
101 NodeCapsBehavior caps_behavior() const override {
102 return NodeCapsBehavior::Dynamic;
103 }
105 std::string backend_fragment(int node_index) const override;
107 std::vector<std::string> element_names(int node_index) const override;
108
109private:
110 OutputOptions opt_;
111 std::string endpoint_name_;
112};
113
114} // namespace simaai::neat
115
116namespace simaai::neat::nodes {
118std::shared_ptr<simaai::neat::Node> Output(OutputOptions opt = {});
120std::shared_ptr<simaai::neat::Node> Output(std::string name, OutputOptions opt = {});
121} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.