Skip to main content

H264EncodeSima.h File

SimaAI H264 encode node wrapper. 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

Description

SimaAI H264 encode node wrapper.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
8#include "builder/Node.h"
9#include "builder/OutputSpec.h"
10
11#include <memory>
12#include <string>
13#include <vector>
14
15namespace simaai::neat {
16
17class H264EncodeSima final : public Node, public OutputSpecProvider {
18public:
19 H264EncodeSima(int w, int h, int fps, int bitrate_kbps = 4000, std::string profile = "baseline",
20 std::string level = "4.0");
21
22 std::string kind() const override {
23 return "H264EncodeSima";
24 }
25 NodeCapsBehavior caps_behavior() const override {
26 return NodeCapsBehavior::Static;
27 }
28
29 std::string backend_fragment(int node_index) const override;
30 std::vector<std::string> element_names(int node_index) const override;
31 OutputSpec output_spec(const OutputSpec& input) const override;
32
33 int width() const {
34 return w_;
35 }
36 int height() const {
37 return h_;
38 }
39 int fps() const {
40 return fps_;
41 }
42 int bitrate_kbps() const {
43 return bitrate_kbps_;
44 }
45 const std::string& profile() const {
46 return profile_;
47 }
48 const std::string& level() const {
49 return level_;
50 }
51
52private:
53 int w_ = 0;
54 int h_ = 0;
55 int fps_ = 30;
56
57 int bitrate_kbps_ = 4000;
58 std::string profile_ = "baseline";
59 std::string level_ = "4.0";
60};
61
62} // namespace simaai::neat
63
64namespace simaai::neat::nodes {
65std::shared_ptr<simaai::neat::Node> H264EncodeSima(int w, int h, int fps, int bitrate_kbps = 4000,
66 std::string profile = "baseline",
67 std::string level = "4.0");
68
69// picks x264enc/openh264enc/avenc_h264
70std::shared_ptr<simaai::neat::Node> H264EncodeSW(int bitrate_kbps = 4000);
71} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.