Skip to main content

Input.h File

Input node for push pipelines. More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

structInputOptions
classInput

Description

Input node for push pipelines.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
8#include "builder/Node.h"
9#include "builder/OutputSpec.h"
10
11#include <memory>
12#include <cstdint>
13#include <string>
14#include <vector>
15
16namespace simaai::neat {
17
19 std::string media_type = "video/x-raw";
20 std::string format;
21 int width = -1;
22 int height = -1;
23 int depth = -1;
24 // Optional dynamic-input limits used for validation/pool sizing.
25 // These do not constrain negotiated caps and are only checked at push time.
26 int max_width = -1;
27 int max_height = -1;
28 int max_depth = -1;
29 // Optional fixed framerate for caps (0/1 means "unspecified").
30 int fps_n = 0;
31 int fps_d = 1;
32 // Optional full caps string override (used for multi-tensor caps).
33 std::string caps_override;
34
35 bool is_live = true;
36 bool do_timestamp = true;
37 bool block = true;
38 int stream_type = 0; // GST_APP_STREAM_TYPE_STREAM
39 std::uint64_t max_bytes = 0;
40
41 bool use_simaai_pool = true;
44
45 // Optional GstSimaMeta buffer name override. Leave empty to avoid forcing a legacy default.
46 std::string buffer_name;
47};
48
49class Input final : public Node, public OutputSpecProvider {
50public:
51 explicit Input(InputOptions opt);
52
53 std::string kind() const override {
54 return "Input";
55 }
56 std::string user_label() const override {
57 return "mysrc";
58 }
59 InputRole input_role() const override {
60 return InputRole::Push;
61 }
62 NodeCapsBehavior caps_behavior() const override {
63 return NodeCapsBehavior::Static;
64 }
65 std::string buffer_name_hint(int node_index) const override;
66
67 std::string backend_fragment(int node_index) const override;
68 std::vector<std::string> element_names(int node_index) const override;
69 OutputSpec output_spec(const OutputSpec& input) const override;
70
71 const InputOptions& options() const {
72 return opt_;
73 }
74 std::string caps_string() const;
75
76private:
77 InputOptions opt_;
78};
79
80} // namespace simaai::neat
81
82namespace simaai::neat::nodes {
83std::shared_ptr<simaai::neat::Node> Input(InputOptions opt = {});
84} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.