DXVA Checker怎么破??

yamkou 2013-07-10 11:16:05
DXVA Checker 功能企图实现,可是Decoder Device部分只做到了DXVA2.0检测。DXVA1.0的API就是找不到。
还有就是Processor Device也无法实现。怎么破?
附上DXVA2.0检测的Code:

IDirectXVideoDecoderService * pDecoder = NULL;
IDirect3D9 *pD3D = NULL;
IDirect3DDevice9 *pDevice = NULL;

// Set up structure to create D3D Device
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof( d3dpp));
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;

// Set up structure to create D3D Device
if( FAILED( pD3D = Direct3DCreate9( D3D_SDK_VERSION)))
{
RT_LOG("Failed to Create Direct3D9!\n");
return E_FAIL;
}
RT_LOG( "Success to Create Direct3D9 !\n");
if( FAILED( pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, this->m_hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &pDevice)))
{
RT_LOG("Failed to Create Direct3D9 Device!\n");
return E_FAIL;
}
RT_LOG( "Success to Create Direct3D9 Device!\n");

if( FAILED( DXVA2CreateVideoService( pDevice, IID_PPV_ARGS(&pDecoder))))
{
RT_LOG("Failed to CreatVideoService!\n");
return E_FAIL;
}

UINT nCount;
GUID* pGuids;

if( FAILED(pDecoder->GetDecoderDeviceGuids( &nCount, &pGuids)))
{
RT_LOG("Failed to Get Decoder!\n");
return E_FAIL;
}
CString src;
for( UINT i =0; i < nCount; i++)
{
for (int j = 1; j < _countof(DXVA2Decoder); j++) {
if (pGuids[i] == *DXVA2Decoder[j].Guid) {
WriteConsole( hOutPut, DXVA2Decoder[j].Description, _tcslen(DXVA2Decoder[j].Description), NULL, NULL);
WriteConsole( hOutPut, _T("\n"), _tcslen( _T("\n")), NULL, NULL);
break;
}
}
src ="";
src.Format(_T("%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X\n"), pGuids[i].Data1, pGuids[i].Data2,
pGuids[i].Data3, pGuids[i].Data4[0], pGuids[i].Data4[1], pGuids[i].Data4[2], pGuids[i].Data4[3],
pGuids[i].Data4[4],pGuids[i].Data4[5],pGuids[i].Data4[6],pGuids[i].Data4[7]);
WriteConsole( hOutPut, src, src.GetLength(), NULL, NULL);
}



pDecoder->Release();
pDevice->Release();
pD3D->Release();

return S_OK;
...全文
165 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
never715 2014-04-29
  • 打赏
  • 举报
回复
不知道这个DXVA2Decoder哪来的,我最近也在纠结这个问题,可否请教你是怎么拿到这些硬件解码信息的? 哦,我在百度directx吧也看到你的问题了!

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧