-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvaapi_encoder.h
More file actions
50 lines (38 loc) · 1.33 KB
/
vaapi_encoder.h
File metadata and controls
50 lines (38 loc) · 1.33 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include <memory>
#include "wrapper/plugin_api.h"
extern "C" {
#include <libavutil/avutil.h>
#include <libavcodec/avcodec.h>
}
using namespace IOPlugin;
class UISettingsController;
class VAAPIEncoder : public IPluginCodecRef
{
public:
~VAAPIEncoder();
bool IsNeedNextPass() override;
bool IsAcceptingFrame(int64_t p_PTS) override;
static VAAPIEncoder *Create(uint8_t *uuid);
static StatusCode RegisterCodecs(HostListRef *p_pList);
static StatusCode GetEncoderSettings(uint8_t *uuid, HostPropertyCollectionRef *p_pValues, HostListRef *p_pSettingsList);
private:
explicit VAAPIEncoder(const char *name, uint32_t depth);
StatusCode DoInit(HostPropertyCollectionRef *p_pProps) override;
StatusCode DoOpen(HostBufferRef *p_pBuff) override;
StatusCode DoProcess(HostBufferRef *p_pBuff) override;
void DoFlush() override;
StatusCode ReceiveData();
const char *m_name;
uint32_t m_depth;
enum AVPixelFormat m_format = AV_PIX_FMT_NONE;
AVBufferRef *m_hwdev = nullptr;
AVCodecContext *m_codec = nullptr;
AVBufferRef *m_hwframes = nullptr;
int m_ColorModel;
std::unique_ptr<UISettingsController> m_pSettings;
HostCodecConfigCommon m_CommonProps;
std::vector<uint8_t> m_configExtradata;
bool m_sentFirstPacket = false;
std::string m_containerFormat;
};