Skip to main content

H264Decode Class

Hardware-accelerated H.264 decoder Node. More...

Declaration

class simaai::neat::H264Decode { ... }

Included Headers

#include <H264DecodeSima.h>

Base classes

classNode
classOutputSpecProvider

Public Constructors Index

H264Decode (int sima_allocator_type=2, std::string out_format="NV12", std::string decoder_name={}, bool raw_output=false, std::string next_element={}, int dec_width=-1, int dec_height=-1, int dec_fps=-1, int num_buffers=-1)

Construct with explicit decoder configuration. More...

Public Member Functions Index

std::stringkind () const override

Type label for this Node kind. 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...

intsima_allocator_type () const

SiMa DMA allocator type passed to the decoder element. More...

const std::string &out_format () const

Configured raw output format. More...

const std::string &decoder_name () const

Decoder element name override (empty = auto-pick). More...

boolraw_output () const

Whether the decoder emits raw frames without metadata adapters. More...

const std::string &next_element () const

Optional downstream element name used during graph wiring. More...

intdec_width () const

Decoded frame width override (-1 = upstream-defined). More...

intdec_height () const

Decoded frame height override (-1 = upstream-defined). More...

intdec_fps () const

Decoded framerate override (-1 = upstream-defined). More...

intnum_buffers () const

Output buffer pool size override (-1 = element default). More...

Private Member Attributes Index

intsima_allocator_type_ = 2
std::stringout_format_ = "NV12"
std::stringdecoder_name_
boolraw_output_ = false
std::stringnext_element_
intdec_width_ = -1
intdec_height_ = -1
intdec_fps_ = -1
intnum_buffers_ = -1

Description

Hardware-accelerated H.264 decoder Node.

Place after an H264Parse (or any AU-aligned H.264 source) when running on a SiMa board. The decoder produces raw video (NV12 by default) ready for downstream preprocessing.

Definition at line 30 of file H264DecodeSima.h.

Public Constructors

H264Decode()

simaai::neat::H264Decode::H264Decode (int sima_allocator_type=2, std::string out_format="NV12", std::string decoder_name={}, bool raw_output=false, std::string next_element={}, int dec_width=-1, int dec_height=-1, int dec_fps=-1, int num_buffers=-1)

Construct with explicit decoder configuration.

Parameters
sima_allocator_type

DMA allocator selector (board-specific; default 2).

out_format

Raw output pixel format (e.g. "NV12", "I420").

decoder_name

Override decoder element name; empty = auto-pick.

raw_output

If true, emit raw frames without GStreamer metadata adapters.

next_element

Optional name of the downstream element used for wiring.

dec_width

Decoded frame width override; -1 = let upstream decide.

dec_height

Decoded frame height override; -1 = let upstream decide.

dec_fps

Decoded framerate override; -1 = let upstream decide.

num_buffers

Output buffer pool size; -1 = element default.

Definition at line 45 of file H264DecodeSima.h.

Public Member Functions

backend_fragment()

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

GStreamer fragment this Node emits.

Definition at line 58 of file H264DecodeSima.h.

caps_behavior()

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

Whether the Node negotiates static or dynamic caps.

Definition at line 53 of file H264DecodeSima.h.

53 NodeCapsBehavior caps_behavior() const override {
54 return NodeCapsBehavior::Dynamic;
55 }

dec_fps()

int simaai::neat::H264Decode::dec_fps ()
inline

Decoded framerate override (-1 = upstream-defined).

Definition at line 93 of file H264DecodeSima.h.

93 int dec_fps() const {
94 return dec_fps_;
95 }

dec_height()

int simaai::neat::H264Decode::dec_height ()
inline

Decoded frame height override (-1 = upstream-defined).

Definition at line 89 of file H264DecodeSima.h.

89 int dec_height() const {
90 return dec_height_;
91 }

dec_width()

int simaai::neat::H264Decode::dec_width ()
inline

Decoded frame width override (-1 = upstream-defined).

Definition at line 85 of file H264DecodeSima.h.

85 int dec_width() const {
86 return dec_width_;
87 }

decoder_name()

const std::string & simaai::neat::H264Decode::decoder_name ()
inline

Decoder element name override (empty = auto-pick).

Definition at line 73 of file H264DecodeSima.h.

73 const std::string& decoder_name() const {
74 return decoder_name_;
75 }

element_names()

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

Deterministic element names this Node will create.

Definition at line 60 of file H264DecodeSima.h.

kind()

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

Type label for this Node kind.

Definition at line 49 of file H264DecodeSima.h.

49 std::string kind() const override {
50 return "H264Decode";
51 }

next_element()

const std::string & simaai::neat::H264Decode::next_element ()
inline

Optional downstream element name used during graph wiring.

Definition at line 81 of file H264DecodeSima.h.

81 const std::string& next_element() const {
82 return next_element_;
83 }

num_buffers()

int simaai::neat::H264Decode::num_buffers ()
inline

Output buffer pool size override (-1 = element default).

Definition at line 97 of file H264DecodeSima.h.

97 int num_buffers() const {
98 return num_buffers_;
99 }

out_format()

const std::string & simaai::neat::H264Decode::out_format ()
inline

Configured raw output format.

Definition at line 69 of file H264DecodeSima.h.

69 const std::string& out_format() const {
70 return out_format_;
71 }

output_spec()

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

Negotiated downstream caps produced by this Node.

Definition at line 62 of file H264DecodeSima.h.

raw_output()

bool simaai::neat::H264Decode::raw_output ()
inline

Whether the decoder emits raw frames without metadata adapters.

Definition at line 77 of file H264DecodeSima.h.

77 bool raw_output() const {
78 return raw_output_;
79 }

sima_allocator_type()

int simaai::neat::H264Decode::sima_allocator_type ()
inline

SiMa DMA allocator type passed to the decoder element.

Definition at line 65 of file H264DecodeSima.h.

65 int sima_allocator_type() const {
66 return sima_allocator_type_;
67 }

Private Member Attributes

dec_fps_

int simaai::neat::H264Decode::dec_fps_ = -1

Definition at line 109 of file H264DecodeSima.h.

109 int dec_fps_ = -1;

dec_height_

int simaai::neat::H264Decode::dec_height_ = -1

Definition at line 108 of file H264DecodeSima.h.

108 int dec_height_ = -1;

dec_width_

int simaai::neat::H264Decode::dec_width_ = -1

Definition at line 107 of file H264DecodeSima.h.

107 int dec_width_ = -1;

decoder_name_

std::string simaai::neat::H264Decode::decoder_name_

Definition at line 104 of file H264DecodeSima.h.

104 std::string decoder_name_;

next_element_

std::string simaai::neat::H264Decode::next_element_

Definition at line 106 of file H264DecodeSima.h.

106 std::string next_element_;

num_buffers_

int simaai::neat::H264Decode::num_buffers_ = -1

Definition at line 110 of file H264DecodeSima.h.

110 int num_buffers_ = -1;

out_format_

std::string simaai::neat::H264Decode::out_format_ = "NV12"

Definition at line 103 of file H264DecodeSima.h.

103 std::string out_format_ = "NV12";

raw_output_

bool simaai::neat::H264Decode::raw_output_ = false

Definition at line 105 of file H264DecodeSima.h.

105 bool raw_output_ = false;

sima_allocator_type_

int simaai::neat::H264Decode::sima_allocator_type_ = 2

Definition at line 102 of file H264DecodeSima.h.

102 int sima_allocator_type_ = 2;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.