Input.h File
Input Node — push-mode source. More...
Included Headers
#include "builder/Node.h"
#include "builder/OutputSpec.h"
#include "pipeline/FormatSpec.h"
#include "pipeline/PayloadType.h"
#include <memory>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
| namespace | nodes |
Classes Index
| struct | PreprocessMetaTemplate |
|
Preprocess metadata template attached to ingress buffers. More... | |
| struct | InputOptions |
|
Caps, buffering, and pool options for the Input Node. More... | |
| class | Input |
|
Push-mode source Node. More... | |
Description
Input Node — push-mode source.
Lets the application feed samples via Run::push().
Wraps an appsrc-style element. Use this when the application owns frame production (e.g. capturing from a custom source, replaying a buffer, or feeding test data) and needs to deliver samples to the pipeline by hand. A Graph that begins with an Input Node is built with Graph::build() and driven by Run::push() rather than Run::run().
File Listing
The file content with the documentation metadata removed is:
16#include "pipeline/FormatSpec.h"
17#include "pipeline/PayloadType.h"
26namespace simaai::neat {
37struct PreprocessMetaTemplate {
39 int target_width = 0;
40 int target_height = 0;
41 int scaled_width = 0;
42 int scaled_height = 0;
43 std::string resize_mode = "none";
53 bool tessellate = false;
64enum class InputMemoryPolicy {
65 Auto = 0,
66 Ev74,
67 Dms0,
68 SystemMemory,
76struct InputOptions {
85 int max_height = -1;
91 std::string caps_override;
94 bool do_timestamp = true;
96 int stream_type = 0;
99 bool use_simaai_pool = true;
100 int pool_min_buffers = 1;
101 int pool_max_buffers = 2;
107 std::string buffer_name;
111 std::optional<PreprocessMetaTemplate> preprocess_meta;
115inline std::string resolve_input_media_type(const InputOptions& opt) {
116 switch (opt.payload_type) {
117 case PayloadType::Image:
119 case PayloadType::Tensor:
121 case PayloadType::Encoded:
122 if (opt.format.tag == FormatTag::H264) {
126 case PayloadType::Auto:
144 explicit Input(InputOptions opt);
148 Input(std::string name, InputOptions opt);
155 std::string user_label() const override {
162 const std::string& endpoint_name() const noexcept {
166 InputRole input_role() const override {
170 NodeCapsBehavior caps_behavior() const override {
174 std::string buffer_name_hint(int node_index) const override;
177 std::string backend_fragment(int node_index) const override;
179 std::vector<std::string> element_names(int node_index) const override;
181 OutputSpec output_spec(const OutputSpec& input) const override;
184 const InputOptions& options() const {
188 std::string caps_string() const;
191 InputOptions opt_;
197namespace simaai::neat::nodes {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.