Skip to main content

StillImageInput Class

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

Declaration

class simaai::neat::StillImageInput { ... }

Included Headers

#include <StillImageInput.h>

Base classes

classNode
classOutputSpecProvider

Public Constructors Index

StillImageInput (std::string image_path, ContentWidth content_w, ContentHeight content_h, EncodeWidth enc_w, EncodeHeight enc_h, FramesPerSecond fps)

Construct from an image path plus content / encode geometry and emit framerate. More...

Public Member Functions Index

std::stringkind () const override

Type label for this Node kind. More...

std::stringuser_label () const override

User-facing label for this Node. More...

InputRoleinput_role () const override

Role this Node plays as a stream source. More...

NodeCapsBehaviorcaps_behavior () const override

Whether the Node negotiates static or dynamic caps. More...

std::stringbackend_fragment (int node_index) const override

GStreamer fragment this Node emits. More...

std::vector< std::string >element_names (int node_index) const override

Deterministic element names this Node will create. More...

OutputSpecoutput_spec (const OutputSpec &input) const override

Negotiated downstream caps produced by this Node. More...

const std::string &image_path () const

Path to the still image file loaded at construction. More...

intcontent_w () const

Original content width, in pixels. More...

intcontent_h () const

Original content height, in pixels. More...

intenc_w () const

Encoded output width, in pixels. More...

intenc_h () const

Encoded output height, in pixels. More...

intfps () const

Emit framerate, in frames per second. More...

const std::shared_ptr< std::vector< uint8_t > > &nv12_enc () const

Pre-encoded NV12 buffer of the loaded image, sized to the encode geometry. More...

Private Member Attributes Index

std::stringimage_path_
intcontent_w_ = 0
intcontent_h_ = 0
intenc_w_ = 0
intenc_h_ = 0
intfps_ = 30
std::shared_ptr< std::vector< uint8_t > >nv12_enc_

Description

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

The image is loaded once at construction and re-emitted at the configured framerate. Carries InputRole::Source, so the Session is driven with Run::run().

Definition at line 32 of file StillImageInput.h.

Public Constructors

StillImageInput()

simaai::neat::StillImageInput::StillImageInput (std::string image_path, ContentWidth content_w, ContentHeight content_h, EncodeWidth enc_w, EncodeHeight enc_h, FramesPerSecond fps)

Construct from an image path plus content / encode geometry and emit framerate.

Definition at line 80 of file StillImageInput.h.

Public Member Functions

backend_fragment()

std::string simaai::neat::StillImageInput::backend_fragment (int node_index)

GStreamer fragment this Node emits.

Definition at line 101 of file StillImageInput.h.

caps_behavior()

NodeCapsBehavior simaai::neat::StillImageInput::caps_behavior ()
inline

Whether the Node negotiates static or dynamic caps.

Definition at line 96 of file StillImageInput.h.

96 NodeCapsBehavior caps_behavior() const override {
97 return NodeCapsBehavior::Static;
98 }

content_h()

int simaai::neat::StillImageInput::content_h ()
inline

Original content height, in pixels.

Definition at line 116 of file StillImageInput.h.

116 int content_h() const {
117 return content_h_;
118 }

content_w()

int simaai::neat::StillImageInput::content_w ()
inline

Original content width, in pixels.

Definition at line 112 of file StillImageInput.h.

112 int content_w() const {
113 return content_w_;
114 }

element_names()

std::vector< std::string > simaai::neat::StillImageInput::element_names (int node_index)

Deterministic element names this Node will create.

Definition at line 103 of file StillImageInput.h.

enc_h()

int simaai::neat::StillImageInput::enc_h ()
inline

Encoded output height, in pixels.

Definition at line 124 of file StillImageInput.h.

124 int enc_h() const {
125 return enc_h_;
126 }

enc_w()

int simaai::neat::StillImageInput::enc_w ()
inline

Encoded output width, in pixels.

Definition at line 120 of file StillImageInput.h.

120 int enc_w() const {
121 return enc_w_;
122 }

fps()

int simaai::neat::StillImageInput::fps ()
inline

Emit framerate, in frames per second.

Definition at line 128 of file StillImageInput.h.

128 int fps() const {
129 return fps_;
130 }

image_path()

const std::string & simaai::neat::StillImageInput::image_path ()
inline

Path to the still image file loaded at construction.

Definition at line 108 of file StillImageInput.h.

108 const std::string& image_path() const {
109 return image_path_;
110 }

input_role()

InputRole simaai::neat::StillImageInput::input_role ()
inline

Role this Node plays as a stream source.

Definition at line 92 of file StillImageInput.h.

92 InputRole input_role() const override {
93 return InputRole::Source;
94 }

kind()

std::string simaai::neat::StillImageInput::kind ()
inline

Type label for this Node kind.

Definition at line 84 of file StillImageInput.h.

84 std::string kind() const override {
85 return "StillImageInput";
86 }

nv12_enc()

const std::shared_ptr< std::vector< uint8_t > > & simaai::neat::StillImageInput::nv12_enc ()
inline

Pre-encoded NV12 buffer of the loaded image, sized to the encode geometry.

Definition at line 132 of file StillImageInput.h.

132 const std::shared_ptr<std::vector<uint8_t>>& nv12_enc() const {
133 return nv12_enc_;
134 }

output_spec()

OutputSpec simaai::neat::StillImageInput::output_spec (const OutputSpec & input)

Negotiated downstream caps produced by this Node.

Definition at line 105 of file StillImageInput.h.

user_label()

std::string simaai::neat::StillImageInput::user_label ()
inline

User-facing label for this Node.

Definition at line 88 of file StillImageInput.h.

88 std::string user_label() const override {
89 return image_path_;
90 }

Private Member Attributes

content_h_

int simaai::neat::StillImageInput::content_h_ = 0

Definition at line 139 of file StillImageInput.h.

139 int content_h_ = 0;

content_w_

int simaai::neat::StillImageInput::content_w_ = 0

Definition at line 138 of file StillImageInput.h.

138 int content_w_ = 0;

enc_h_

int simaai::neat::StillImageInput::enc_h_ = 0

Definition at line 141 of file StillImageInput.h.

141 int enc_h_ = 0;

enc_w_

int simaai::neat::StillImageInput::enc_w_ = 0

Definition at line 140 of file StillImageInput.h.

140 int enc_w_ = 0;

fps_

int simaai::neat::StillImageInput::fps_ = 30

Definition at line 142 of file StillImageInput.h.

142 int fps_ = 30;

image_path_

std::string simaai::neat::StillImageInput::image_path_

Definition at line 137 of file StillImageInput.h.

137 std::string image_path_;

nv12_enc_

std::shared_ptr<std::vector<uint8_t> > simaai::neat::StillImageInput::nv12_enc_

Definition at line 144 of file StillImageInput.h.

144 std::shared_ptr<std::vector<uint8_t>> nv12_enc_;

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.