🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

how to know if CLSID_CColorConvertDMO supports hardware acceleration

Started by
0 comments, last by ben5 4 years, 1 month ago

So i created CLSID_CColorConvertDMO using:

IMediaObject pMediaObject;

pMediaObject.CoCreateInstance(CLSID_CColorConvertDMO);

Now I want to check if it will do that using Hardware (GPU) or not. If it will not do that using GPU then i do not want to use it. I read about MF_SA_D3D11_AWARE and on MFT_ENUM_HARDWARE_URL_Attribute They should tell if it is Hardware accelerated supported. But to check that I need access to IMFAttributes. So I tried this:

IMFTransform* oIMFTransform = NULL;

IMFAttributes* pAttributes = NULL;

HRESULT hr = pMediaObject->QueryInterface(IID_IMFTransform, (void**)&oIMFTransform);

hr = oIMFTransform->GetAttributes(0, &pAttributes);

if (SUCCEEDED(hr))

{

UINT32 bD3DAware = MFGetAttributeUINT32(pAttributes, MF_SA_D3D_AWARE, FALSE);

bD3DAware++;

pAttributes->Release();

}

But hr that came from hr = oIMFTransform->GetAttributes(&pAttributes); is always E_NOTIMPL So how i can tell if on this PC it will do the color conversion using Hardware or not?

Thanks!

This topic is closed to new replies.

Advertisement