#ifndef AMF_ComputeFactory_h
#define AMF_ComputeFactory_h
#pragma once
#include "Compute.h"
#if defined(__cplusplus)
namespace amf
{
#endif
#define AMF_DEVICE_NAME L"DeviceName"
#define AMF_DRIVER_VERSION_NAME L"DriverVersion"
#define AMF_AUDIO_CONVOLUTION_MAX_STREAMS L"ConvolutionMaxStreams"
#define AMF_AUDIO_CONVOLUTION_LENGTH L"ConvolutionLength"
#define AMF_AUDIO_CONVOLUTION_BUFFER_SIZE L"ConvolutionBufferSize"
#define AMF_AUDIO_CONVOLUTION_SAMPLE_RATE L"ConvolutionSampleRate"
#if defined(__cplusplus)
class AMF_NO_VTABLE AMFComputeDevice : public AMFPropertyStorage
{
public:
AMF_DECLARE_IID(0xb79d7cf6, 0x2c5c, 0x4deb, 0xb8, 0x96, 0xa2, 0x9e, 0xbe, 0xa6, 0xe3, 0x97)
virtual void* AMF_STD_CALL GetNativePlatform() = 0;
virtual void* AMF_STD_CALL GetNativeDeviceID() = 0;
virtual void* AMF_STD_CALL GetNativeContext() = 0;
virtual AMF_RESULT AMF_STD_CALL CreateCompute(void *reserved, AMFCompute **ppCompute) = 0;
virtual AMF_RESULT AMF_STD_CALL CreateComputeEx(void* pCommandQueue, AMFCompute **ppCompute) = 0;
};
typedef AMFInterfacePtr_T<AMFComputeDevice> AMFComputeDevicePtr;
#else
AMF_DECLARE_IID(AMFComputeDevice, 0xb79d7cf6, 0x2c5c, 0x4deb, 0xb8, 0x96, 0xa2, 0x9e, 0xbe, 0xa6, 0xe3, 0x97)
typedef struct AMFComputeDevice AMFComputeDevice;
typedef struct AMFComputeDeviceVtbl
{
amf_long (AMF_STD_CALL *Acquire)(AMFComputeDevice* pThis);
amf_long (AMF_STD_CALL *Release)(AMFComputeDevice* pThis);
enum AMF_RESULT (AMF_STD_CALL *QueryInterface)(AMFComputeDevice* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
AMF_RESULT (AMF_STD_CALL *SetProperty)(AMFComputeDevice* pThis, const wchar_t* name, AMFVariantStruct value);
AMF_RESULT (AMF_STD_CALL *GetProperty)(AMFComputeDevice* pThis, const wchar_t* name, AMFVariantStruct* pValue);
amf_bool (AMF_STD_CALL *HasProperty)(AMFComputeDevice* pThis, const wchar_t* name);
amf_size (AMF_STD_CALL *GetPropertyCount)(AMFComputeDevice* pThis);
AMF_RESULT (AMF_STD_CALL *GetPropertyAt)(AMFComputeDevice* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
AMF_RESULT (AMF_STD_CALL *Clear)(AMFComputeDevice* pThis);
AMF_RESULT (AMF_STD_CALL *AddTo)(AMFComputeDevice* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
AMF_RESULT (AMF_STD_CALL *CopyTo)(AMFComputeDevice* pThis, AMFPropertyStorage* pDest, amf_bool deep);
void (AMF_STD_CALL *AddObserver)(AMFComputeDevice* pThis, AMFPropertyStorageObserver* pObserver);
void (AMF_STD_CALL *RemoveObserver)(AMFComputeDevice* pThis, AMFPropertyStorageObserver* pObserver);
void* (AMF_STD_CALL *GetNativePlatform)(AMFComputeDevice* pThis);
void* (AMF_STD_CALL *GetNativeDeviceID)(AMFComputeDevice* pThis);
void* (AMF_STD_CALL *GetNativeContext)(AMFComputeDevice* pThis);
AMF_RESULT (AMF_STD_CALL *CreateCompute)(AMFComputeDevice* pThis, void *reserved, AMFCompute **ppCompute);
AMF_RESULT (AMF_STD_CALL *CreateComputeEx)(AMFComputeDevice* pThis, void* pCommandQueue, AMFCompute **ppCompute);
} AMFComputeDeviceVtbl;
struct AMFComputeDevice
{
const AMFComputeDeviceVtbl *pVtbl;
};
#endif #if defined(__cplusplus)
class AMF_NO_VTABLE AMFComputeFactory : public AMFInterface
{
public:
AMF_DECLARE_IID(0xe3c24bd7, 0x2d83, 0x416c, 0x8c, 0x4e, 0xfd, 0x13, 0xca, 0x86, 0xf4, 0xd0)
virtual amf_int32 AMF_STD_CALL GetDeviceCount() = 0;
virtual AMF_RESULT AMF_STD_CALL GetDeviceAt(amf_int32 index, AMFComputeDevice **ppDevice) = 0;
};
typedef AMFInterfacePtr_T<AMFComputeFactory> AMFComputeFactoryPtr;
#else
AMF_DECLARE_IID(AMFComputeFactory, 0xe3c24bd7, 0x2d83, 0x416c, 0x8c, 0x4e, 0xfd, 0x13, 0xca, 0x86, 0xf4, 0xd0)
typedef struct AMFComputeFactory AMFComputeFactory;
typedef struct AMFComputeFactoryVtbl
{
amf_long (AMF_STD_CALL *Acquire)(AMFComputeFactory* pThis);
amf_long (AMF_STD_CALL *Release)(AMFComputeFactory* pThis);
enum AMF_RESULT (AMF_STD_CALL *QueryInterface)(AMFComputeFactory* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
amf_int32 (AMF_STD_CALL *GetDeviceCount)(AMFComputeFactory* pThis);
AMF_RESULT (AMF_STD_CALL *GetDeviceAt)(AMFComputeFactory* pThis, amf_int32 index, AMFComputeDevice **ppDevice);
} AMFComputeFactoryVtbl;
struct AMFComputeFactory
{
const AMFComputeFactoryVtbl *pVtbl;
};
#endif
#if defined(__cplusplus)
} #endif
#endif