Directshow 中IID_IAMStreamConfig 接口的 SetFormat为什么会设置不成功啊???
程序如下
HRESULT CDirectShow::ZoomVideo()
{
AM_MEDIA_TYPE *amt;
HRESULT hr = 0;
IAMStreamConfig * g_pConfig;
hr = g_pConfig->GetFormat(&amt);
if (FAILED(hr))
return hr;
VIDEOINFOHEADER *pVih = reinterpret_cast<VIDEOINFOHEADER*>(amt->pbFormat);
pVih->bmiHeader.biBitCount=24;
pVih->bmiHeader.biWidth= 576;
pVih->bmiHeader.biHeight=768;
hr = g_pConfig->SetFormat(amt);
// DeleteMediaType(amt);
if (FAILED(hr))
return hr;
return hr;
}