-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathh264_encoder.cpp
More file actions
26 lines (22 loc) · 962 Bytes
/
h264_encoder.cpp
File metadata and controls
26 lines (22 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "h264_encoder.h"
const EncoderInfo H264Encoder::encoderInfo = {
.UUID{0xaa, 0xeb, 0x0f, 0x28, 0x4c, 0x6f, 0x4e, 0x3f, 0x95, 0xdd, 0x23, 0x43, 0x41, 0xf3, 0x8d, 0xa0},
.codecGroup = "H.264",
.codecName = "VAAPI (FFmpeg)",
.fourCC = 'avc1',
.encoder = "h264_vaapi",
.hwAcceleration = Vaapi,
.pixelFormat = AV_PIX_FMT_NV12,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.qualityModes = CQP | VBR,
.qp = {1, 20, 51},
.presets = {{0, "Speed"}, {1, "Balanced"}, {2, "Quality"}},
.defaultPreset = 1,
};
H264Encoder::H264Encoder() { FFmpegEncoder::encoderInfo = encoderInfo; }
StatusCode H264Encoder::RegisterCodecs(HostListRef* list) { return FFmpegEncoder::RegisterCodecs(list, encoderInfo); }
StatusCode H264Encoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}