本文介绍了我在哪里可以获得IID_IDirect3DDeviceManager9接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


你能告诉我让IDirect3DDeviceManager9接口使用DXVA设置视频解码器的步骤吗?


I使用MFTEnumEx方法获取H.264视频的视频解码器变换接口(IMFTransform)。 之后,我尝试从此IMFTransform接口获取属性并检查MF_SA_D3D_AWARE设置。



IMFAttributes * pAttributes = NULL ; $
hr = decoder-> GetAttributes(& pAttributes);

if(MFGetAttributeUINT32(pAttributes,MF_SA_D3D_AWARE,false))

  ;  hr = pAttributes-> SetUINT32(CODECAPI_AVDecVideoAcceleration_H264,TRUE);




作为进一步的步骤,我想我需要IID_IDirect3DDeviceManager9接口。这是正确的,我从哪里获得IID_IDirect3DDeviceManager9接口?在其他示例中,在我看来,ProcessMessage调用将设置这样的接口。但我
还没有将IMFTransform接口子类化。这是否需要建立DXVA解码器?  



IDirect3DDeviceManager9 * manager = nullptr;


HRESULT hr = decoder-> ProcessMessage(MFT_MESSAGE_SET_D3D_MANAGER ,

       reinterpret_cast< ULONG_PTR>(经理));


hr = decoder-> QueryInterface(IID_IDirect3DDeviceManager9,(void **)& manager);


最后一次调用失败并返回代码,不支持此类接口。



最好的问候


saoirse

解决方案

Hi,

could you tell me the steps to get the IDirect3DDeviceManager9 interface to setup the video decoder using DXVA?

I use the MFTEnumEx method to get the video decoder transform interface (IMFTransform) for H.264 videos.  After that I try to get the attributes from this IMFTransform interface and check the MF_SA_D3D_AWARE setting.

IMFAttributes* pAttributes = NULL;
hr = decoder->GetAttributes (&pAttributes);
if (MFGetAttributeUINT32 (pAttributes, MF_SA_D3D_AWARE, false))
   hr = pAttributes->SetUINT32 (CODECAPI_AVDecVideoAcceleration_H264, TRUE);


As a further step, I think I need the IID_IDirect3DDeviceManager9 interface. Is this correct and where do I get the IID_IDirect3DDeviceManager9 interface? In other examples, it seems to me that the ProcessMessage call will setup such an interface. But I have not subclassed the IMFTransform interface. Is this necessary to establish a DXVA decoder?  

IDirect3DDeviceManager9* manager = nullptr;

HRESULT hr = decoder->ProcessMessage (MFT_MESSAGE_SET_D3D_MANAGER,
        reinterpret_cast<ULONG_PTR>(manager));

hr = decoder->QueryInterface (IID_IDirect3DDeviceManager9, (void **)&manager);

The last call fails with the return code, that no such interface is supported.

best regards

saoirse

解决方案


这篇关于我在哪里可以获得IID_IDirect3DDeviceManager9接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 23:10