libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
enums_codec.h
Go to the documentation of this file.
1
10#pragma once
11
12
13#include <promeki/config.h>
14#if PROMEKI_ENABLE_CORE
15#include <promeki/namespace.h>
16#include <promeki/enum.h>
17
18PROMEKI_NAMESPACE_BEGIN
19
47class RateControlMode : public TypedEnum<RateControlMode> {
48 public:
49 PROMEKI_REGISTER_ENUM_TYPE_DISPLAY("RateControlMode", "Rate Control Mode", 1,
50 {"CBR", 0, "Constant Bitrate (CBR)"},
51 {"VBR", 1, "Variable Bitrate (VBR)"},
52 {"ABR", 2, "Average Bitrate (ABR)"},
53 {"CQP", 3, "Constant Quantizer (CQP)"}); // default: VBR
54
55 using TypedEnum<RateControlMode>::TypedEnum;
56
57 static const RateControlMode CBR;
58 static const RateControlMode VBR;
59 static const RateControlMode ABR;
60 static const RateControlMode CQP;
61};
62
63inline const RateControlMode RateControlMode::CBR{0};
64inline const RateControlMode RateControlMode::VBR{1};
65inline const RateControlMode RateControlMode::ABR{2};
66inline const RateControlMode RateControlMode::CQP{3};
67
88class VideoEncoderPreset : public TypedEnum<VideoEncoderPreset> {
89 public:
90 PROMEKI_REGISTER_ENUM_TYPE_DISPLAY("VideoEncoderPreset", "Video Encoder Preset", 2,
91 {"UltraLowLatency", 0, "Ultra-Low Latency"},
92 {"LowLatency", 1, "Low Latency"}, {"Balanced", 2, "Balanced"},
93 {"HighQuality", 3, "High Quality"},
94 {"Lossless", 4, "Lossless"}); // default: Balanced
95
96 using TypedEnum<VideoEncoderPreset>::TypedEnum;
97
98 static const VideoEncoderPreset UltraLowLatency;
99 static const VideoEncoderPreset LowLatency;
100 static const VideoEncoderPreset Balanced;
101 static const VideoEncoderPreset HighQuality;
102 static const VideoEncoderPreset Lossless;
103};
104
105inline const VideoEncoderPreset VideoEncoderPreset::UltraLowLatency{0};
106inline const VideoEncoderPreset VideoEncoderPreset::LowLatency{1};
107inline const VideoEncoderPreset VideoEncoderPreset::Balanced{2};
108inline const VideoEncoderPreset VideoEncoderPreset::HighQuality{3};
109inline const VideoEncoderPreset VideoEncoderPreset::Lossless{4};
110
132class H264Profile : public TypedEnum<H264Profile> {
133 public:
134 PROMEKI_REGISTER_ENUM_TYPE_DISPLAY("H264Profile", "H.264 Profile", 0,
135 {"Auto", 0, "Auto (derive from input)"},
136 {"Baseline", 1, "Constrained Baseline"}, {"Main", 2, "Main"},
137 {"High", 3, "High"}, {"High10", 4, "High 10"},
138 {"High422", 5, "High 4:2:2"},
139 {"High444", 6, "High 4:4:4 Predictive"},
140 {"ProgressiveHigh", 7, "Progressive High"}); // default: Auto
141
142 using TypedEnum<H264Profile>::TypedEnum;
143
144 static const H264Profile Auto;
145 static const H264Profile Baseline;
146 static const H264Profile Main;
147 static const H264Profile High;
148 static const H264Profile High10;
149 static const H264Profile High422;
150 static const H264Profile High444;
151 static const H264Profile ProgressiveHigh;
152};
153
154inline const H264Profile H264Profile::Auto{0};
155inline const H264Profile H264Profile::Baseline{1};
156inline const H264Profile H264Profile::Main{2};
157inline const H264Profile H264Profile::High{3};
158inline const H264Profile H264Profile::High10{4};
159inline const H264Profile H264Profile::High422{5};
160inline const H264Profile H264Profile::High444{6};
161inline const H264Profile H264Profile::ProgressiveHigh{7};
162
165PROMEKI_NAMESPACE_END
166
167#endif // PROMEKI_ENABLE_CORE