Skip to main content

StillImageInput.h File

StillImageInput Node — source that emits a single image, typically as a freeze frame. More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classStillImageInput

Source Node that emits a single image as a continuous video stream. More...

structContentWidth

Strong-typed wrapper for the original content width, in pixels. More...

structContentHeight

Strong-typed wrapper for the original content height, in pixels. More...

structEncodeWidth

Strong-typed wrapper for the encoded output width, in pixels. More...

structEncodeHeight

Strong-typed wrapper for the encoded output height, in pixels. More...

structFramesPerSecond

Strong-typed wrapper for the emit framerate, in frames per second. More...

Description

StillImageInput Node — source that emits a single image, typically as a freeze frame.

Reads one image file from disk and presents it as a video source at a configured framerate. Useful as a stand-in for a live camera (e.g. powering an RTSP server with a fixed test pattern, or driving a Session that expects continuous video input).

File Listing

The file content with the documentation metadata removed is:

1
11#pragma once
12
13#include "builder/Node.h"
14#include "builder/OutputSpec.h"
15
16#include <cstdint>
17#include <memory>
18#include <string>
19#include <vector>
20
21namespace simaai::neat {
22
32class StillImageInput final : public Node, public OutputSpecProvider {
33public:
35 struct ContentWidth {
36 int value = 0;
38 constexpr ContentWidth() = default;
40 constexpr ContentWidth(int v) : value(v) {}
41 };
42
44 struct ContentHeight {
45 int value = 0;
47 constexpr ContentHeight() = default;
49 constexpr ContentHeight(int v) : value(v) {}
50 };
51
53 struct EncodeWidth {
54 int value = 0;
56 constexpr EncodeWidth() = default;
58 constexpr EncodeWidth(int v) : value(v) {}
59 };
60
62 struct EncodeHeight {
63 int value = 0;
65 constexpr EncodeHeight() = default;
67 constexpr EncodeHeight(int v) : value(v) {}
68 };
69
72 int value = 30;
74 constexpr FramesPerSecond() = default;
76 constexpr FramesPerSecond(int v) : value(v) {}
77 };
78
82
84 std::string kind() const override {
85 return "StillImageInput";
86 }
88 std::string user_label() const override {
89 return image_path_;
90 }
92 InputRole input_role() const override {
93 return InputRole::Source;
94 }
96 NodeCapsBehavior caps_behavior() const override {
97 return NodeCapsBehavior::Static;
98 }
99
101 std::string backend_fragment(int node_index) const override;
103 std::vector<std::string> element_names(int node_index) const override;
105 OutputSpec output_spec(const OutputSpec& input) const override;
106
108 const std::string& image_path() const {
109 return image_path_;
110 }
112 int content_w() const {
113 return content_w_;
114 }
116 int content_h() const {
117 return content_h_;
118 }
120 int enc_w() const {
121 return enc_w_;
122 }
124 int enc_h() const {
125 return enc_h_;
126 }
128 int fps() const {
129 return fps_;
130 }
132 const std::shared_ptr<std::vector<uint8_t>>& nv12_enc() const {
133 return nv12_enc_;
134 }
135
136private:
137 std::string image_path_;
138 int content_w_ = 0;
139 int content_h_ = 0;
140 int enc_w_ = 0;
141 int enc_h_ = 0;
142 int fps_ = 30;
143
144 std::shared_ptr<std::vector<uint8_t>> nv12_enc_;
145};
146
147} // namespace simaai::neat
148
149namespace simaai::neat::nodes {
151std::shared_ptr<simaai::neat::Node>
157} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.