#ifndef AMF_ComponentCaps_h
#define AMF_ComponentCaps_h
#pragma once
#include "../core/Interface.h"
#include "../core/PropertyStorage.h"
#include "../core/Surface.h"
#if defined(__cplusplus)
namespace amf
{
#endif
typedef enum AMF_ACCELERATION_TYPE
{
AMF_ACCEL_NOT_SUPPORTED = -1,
AMF_ACCEL_HARDWARE,
AMF_ACCEL_GPU,
AMF_ACCEL_SOFTWARE
} AMF_ACCELERATION_TYPE;
#if defined(__cplusplus)
class AMF_NO_VTABLE AMFIOCaps : public AMFInterface
{
public:
virtual void AMF_STD_CALL GetWidthRange(amf_int32* minWidth, amf_int32* maxWidth) const = 0;
virtual void AMF_STD_CALL GetHeightRange(amf_int32* minHeight, amf_int32* maxHeight) const = 0;
virtual amf_int32 AMF_STD_CALL GetVertAlign() const = 0;
virtual amf_int32 AMF_STD_CALL GetNumOfFormats() const = 0;
virtual AMF_RESULT AMF_STD_CALL GetFormatAt(amf_int32 index, AMF_SURFACE_FORMAT* format, amf_bool* native) const = 0;
virtual amf_int32 AMF_STD_CALL GetNumOfMemoryTypes() const = 0;
virtual AMF_RESULT AMF_STD_CALL GetMemoryTypeAt(amf_int32 index, AMF_MEMORY_TYPE* memType, amf_bool* native) const = 0;
virtual amf_bool AMF_STD_CALL IsInterlacedSupported() const = 0;
};
typedef AMFInterfacePtr_T<AMFIOCaps> AMFIOCapsPtr;
#else
typedef struct AMFIOCaps AMFIOCaps;
typedef struct AMFIOCapsVtbl
{
amf_long (AMF_STD_CALL *Acquire)(AMFIOCaps* pThis);
amf_long (AMF_STD_CALL *Release)(AMFIOCaps* pThis);
enum AMF_RESULT (AMF_STD_CALL *QueryInterface)(AMFIOCaps* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
void (AMF_STD_CALL *GetWidthRange)(AMFIOCaps* pThis, amf_int32* minWidth, amf_int32* maxWidth);
void (AMF_STD_CALL *GetHeightRange)(AMFIOCaps* pThis, amf_int32* minHeight, amf_int32* maxHeight);
amf_int32 (AMF_STD_CALL *GetVertAlign)(AMFIOCaps* pThis);
amf_int32 (AMF_STD_CALL *GetNumOfFormats)(AMFIOCaps* pThis);
AMF_RESULT (AMF_STD_CALL *GetFormatAt)(AMFIOCaps* pThis, amf_int32 index, AMF_SURFACE_FORMAT* format, amf_bool* native);
amf_int32 (AMF_STD_CALL *GetNumOfMemoryTypes)(AMFIOCaps* pThis);
AMF_RESULT (AMF_STD_CALL *GetMemoryTypeAt)(AMFIOCaps* pThis, amf_int32 index, AMF_MEMORY_TYPE* memType, amf_bool* native);
amf_bool (AMF_STD_CALL *IsInterlacedSupported)(AMFIOCaps* pThis);
} AMFIOCapsVtbl;
struct AMFIOCaps
{
const AMFIOCapsVtbl *pVtbl;
};
#endif
#if defined(__cplusplus)
class AMF_NO_VTABLE AMFCaps : public AMFPropertyStorage
{
public:
virtual AMF_ACCELERATION_TYPE AMF_STD_CALL GetAccelerationType() const = 0;
virtual AMF_RESULT AMF_STD_CALL GetInputCaps(AMFIOCaps** input) = 0;
virtual AMF_RESULT AMF_STD_CALL GetOutputCaps(AMFIOCaps** output) = 0;
};
typedef AMFInterfacePtr_T<AMFCaps> AMFCapsPtr;
#else
typedef struct AMFCaps AMFCaps;
typedef struct AMFCapsVtbl
{
amf_long (AMF_STD_CALL *Acquire)(AMFCaps* pThis);
amf_long (AMF_STD_CALL *Release)(AMFCaps* pThis);
enum AMF_RESULT (AMF_STD_CALL *QueryInterface)(AMFCaps* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
AMF_RESULT (AMF_STD_CALL *SetProperty)(AMFCaps* pThis, const wchar_t* name, AMFVariantStruct value);
AMF_RESULT (AMF_STD_CALL *GetProperty)(AMFCaps* pThis, const wchar_t* name, AMFVariantStruct* pValue);
amf_bool (AMF_STD_CALL *HasProperty)(AMFCaps* pThis, const wchar_t* name);
amf_size (AMF_STD_CALL *GetPropertyCount)(AMFCaps* pThis);
AMF_RESULT (AMF_STD_CALL *GetPropertyAt)(AMFCaps* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
AMF_RESULT (AMF_STD_CALL *Clear)(AMFCaps* pThis);
AMF_RESULT (AMF_STD_CALL *AddTo)(AMFCaps* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
AMF_RESULT (AMF_STD_CALL *CopyTo)(AMFCaps* pThis, AMFPropertyStorage* pDest, amf_bool deep);
void (AMF_STD_CALL *AddObserver)(AMFCaps* pThis, AMFPropertyStorageObserver* pObserver);
void (AMF_STD_CALL *RemoveObserver)(AMFCaps* pThis, AMFPropertyStorageObserver* pObserver);
AMF_ACCELERATION_TYPE (AMF_STD_CALL *GetAccelerationType)(AMFCaps* pThis);
AMF_RESULT (AMF_STD_CALL *GetInputCaps)(AMFCaps* pThis, AMFIOCaps** input);
AMF_RESULT (AMF_STD_CALL *GetOutputCaps)(AMFCaps* pThis, AMFIOCaps** output);
} AMFCapsVtbl;
struct AMFCaps
{
const AMFCapsVtbl *pVtbl;
};
#endif
#if defined(__cplusplus)
}
#endif
#endif