Skip to main content

H264EncodeSima Class

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

Declaration

class simaai::neat::H264EncodeSima { ... }

Included Headers

#include <H264EncodeSima.h>

Base classes

classNode
classOutputSpecProvider

Public Constructors Index

H264EncodeSima (int w, int h, int fps, int bitrate_kbps=4000, std::string profile="baseline", std::string level="4.0")

Construct with stream parameters and encoder profile. 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...

intwidth () const

Configured frame width. More...

intheight () const

Configured frame height. More...

intfps () const

Configured target framerate. More...

intbitrate_kbps () const

Configured target bitrate, kbps. More...

const std::string &profile () const

Configured H.264 profile string. More...

const std::string &level () const

Configured H.264 level string. More...

Private Member Attributes Index

intw_ = 0
inth_ = 0
intfps_ = 30
intbitrate_kbps_ = 4000
std::stringprofile_ = "baseline"
std::stringlevel_ = "4.0"

Description

Hardware-accelerated H.264 encoder Node.

Definition at line 26 of file H264EncodeSima.h.

Public Constructors

H264EncodeSima()

simaai::neat::H264EncodeSima::H264EncodeSima (int w, int h, int fps, int bitrate_kbps=4000, std::string profile="baseline", std::string level="4.0")

Construct with stream parameters and encoder profile.

Parameters
w

Frame width in pixels.

h

Frame height in pixels.

fps

Target encode framerate.

bitrate_kbps

Target output bitrate in kbps (default 4000).

profile

H.264 profile string ("baseline", "main", "high").

level

H.264 level string (e.g. "4.0").

Definition at line 38 of file H264EncodeSima.h.

Public Member Functions

backend_fragment()

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

GStreamer fragment this Node emits.

Definition at line 51 of file H264EncodeSima.h.

bitrate_kbps()

int simaai::neat::H264EncodeSima::bitrate_kbps ()
inline

Configured target bitrate, kbps.

Definition at line 70 of file H264EncodeSima.h.

70 int bitrate_kbps() const {
71 return bitrate_kbps_;
72 }

caps_behavior()

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

Whether the Node negotiates static or dynamic caps.

Definition at line 46 of file H264EncodeSima.h.

46 NodeCapsBehavior caps_behavior() const override {
47 return NodeCapsBehavior::Static;
48 }

element_names()

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

Deterministic element names this Node will create.

Definition at line 53 of file H264EncodeSima.h.

fps()

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

Configured target framerate.

Definition at line 66 of file H264EncodeSima.h.

66 int fps() const {
67 return fps_;
68 }

height()

int simaai::neat::H264EncodeSima::height ()
inline

Configured frame height.

Definition at line 62 of file H264EncodeSima.h.

62 int height() const {
63 return h_;
64 }

kind()

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

Type label for this Node kind.

Definition at line 42 of file H264EncodeSima.h.

42 std::string kind() const override {
43 return "H264EncodeSima";
44 }

level()

const std::string & simaai::neat::H264EncodeSima::level ()
inline

Configured H.264 level string.

Definition at line 78 of file H264EncodeSima.h.

78 const std::string& level() const {
79 return level_;
80 }

output_spec()

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

Negotiated downstream caps produced by this Node.

Definition at line 55 of file H264EncodeSima.h.

profile()

const std::string & simaai::neat::H264EncodeSima::profile ()
inline

Configured H.264 profile string.

Definition at line 74 of file H264EncodeSima.h.

74 const std::string& profile() const {
75 return profile_;
76 }

width()

int simaai::neat::H264EncodeSima::width ()
inline

Configured frame width.

Definition at line 58 of file H264EncodeSima.h.

58 int width() const {
59 return w_;
60 }

Private Member Attributes

bitrate_kbps_

int simaai::neat::H264EncodeSima::bitrate_kbps_ = 4000

Definition at line 87 of file H264EncodeSima.h.

87 int bitrate_kbps_ = 4000;

fps_

int simaai::neat::H264EncodeSima::fps_ = 30

Definition at line 85 of file H264EncodeSima.h.

85 int fps_ = 30;

h_

int simaai::neat::H264EncodeSima::h_ = 0

Definition at line 84 of file H264EncodeSima.h.

84 int h_ = 0;

level_

std::string simaai::neat::H264EncodeSima::level_ = "4.0"

Definition at line 89 of file H264EncodeSima.h.

89 std::string level_ = "4.0";

profile_

std::string simaai::neat::H264EncodeSima::profile_ = "baseline"

Definition at line 88 of file H264EncodeSima.h.

88 std::string profile_ = "baseline";

w_

int simaai::neat::H264EncodeSima::w_ = 0

Definition at line 83 of file H264EncodeSima.h.

83 int w_ = 0;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.