Skip to main content

H264EncodeSima.h File

H264EncodeSima Node — hardware-accelerated H.264 encoder. More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classH264EncodeSima

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

Description

H264EncodeSima Node — hardware-accelerated H.264 encoder.

Wraps the SiMa hardware H.264 encoder. Use after a video source (raw frames) when running on a SiMa board. Pair with H264Packetize for RTP streaming or with a file muxer for writing to disk.

File Listing

The file content with the documentation metadata removed is:

1
10#pragma once
11
12#include "builder/Node.h"
13#include "builder/OutputSpec.h"
14
15#include <memory>
16#include <string>
17#include <vector>
18
19namespace simaai::neat {
20
26class H264EncodeSima final : public Node, public OutputSpecProvider {
27public:
38 H264EncodeSima(int w, int h, int fps, int bitrate_kbps = 4000, std::string profile = "baseline",
39 std::string level = "4.0");
40
42 std::string kind() const override {
43 return "H264EncodeSima";
44 }
46 NodeCapsBehavior caps_behavior() const override {
47 return NodeCapsBehavior::Static;
48 }
49
51 std::string backend_fragment(int node_index) const override;
53 std::vector<std::string> element_names(int node_index) const override;
55 OutputSpec output_spec(const OutputSpec& input) const override;
56
58 int width() const {
59 return w_;
60 }
62 int height() const {
63 return h_;
64 }
66 int fps() const {
67 return fps_;
68 }
70 int bitrate_kbps() const {
71 return bitrate_kbps_;
72 }
74 const std::string& profile() const {
75 return profile_;
76 }
78 const std::string& level() const {
79 return level_;
80 }
81
82private:
83 int w_ = 0;
84 int h_ = 0;
85 int fps_ = 30;
86
87 int bitrate_kbps_ = 4000;
88 std::string profile_ = "baseline";
89 std::string level_ = "4.0";
90};
91
92} // namespace simaai::neat
93
94namespace simaai::neat::nodes {
96std::shared_ptr<simaai::neat::Node> H264EncodeSima(int w, int h, int fps, int bitrate_kbps = 4000,
97 std::string profile = "baseline",
98 std::string level = "4.0");
99
101std::shared_ptr<simaai::neat::Node> H264EncodeSW(int bitrate_kbps = 4000);
102} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.