-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.cpp
More file actions
49 lines (42 loc) · 1.26 KB
/
plugin.cpp
File metadata and controls
49 lines (42 loc) · 1.26 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
#include "plugin.h"
#include "vaapi_encoder.h"
StatusCode g_HandleGetInfo(HostPropertyCollectionRef* p_pProps)
{
static const uint8_t uuid[] = { 0x01, 0x6f, 0x34, 0x71, 0x31, 0x17, 0x42, 0x05, 0xbf, 0x55, 0x37, 0x1c, 0xb0, 0xac, 0x66, 0x1a };
StatusCode err = p_pProps->SetProperty(pIOPropUUID, propTypeUInt8, uuid, 16);
if (err == errNone)
err = p_pProps->SetProperty(pIOPropName, propTypeString, "VAAPI Plugin", strlen("VAAPI Plugin"));
return err;
}
StatusCode g_HandleCreateObj(unsigned char *p_pUUID, ObjectRef *p_ppObj)
{
VAAPIEncoder *enc = VAAPIEncoder::Create(p_pUUID);
if (enc) {
*p_ppObj = enc;
return errNone;
}
return errUnsupported;
}
StatusCode g_HandlePluginStart()
{
return errNone;
}
StatusCode g_HandlePluginTerminate()
{
return errNone;
}
StatusCode g_ListCodecs(HostListRef *p_pList)
{
StatusCode err = VAAPIEncoder::RegisterCodecs(p_pList);
if (err != errNone)
return err;
return errNone;
}
StatusCode g_ListContainers(HostListRef *p_pList)
{
return errNone;
}
StatusCode g_GetEncoderSettings(unsigned char *p_pUUID, HostPropertyCollectionRef *p_pValues, HostListRef *p_pSettingsList)
{
return VAAPIEncoder::GetEncoderSettings(p_pUUID, p_pValues, p_pSettingsList);
}