佚名通过本文主要向大家介绍了directshow视频采集,directshow采集摄像头,directshow,directshow9.0下载,directshow9官方下载等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: directshow视频采集问题
描述:
描述:
用IAMStreamConfig
GetFormat之后,直接再SetFormat没有问题,但是修改了pmtConfig结构里面的变量以后就无法再SetFormat这是为什么?
代码:
hr = pConfig->GetFormat(&pmtConfig);
pVih = (VIDEOINFOHEADER*)pmtConfig->pbFormat;
// pVih contains the detailed format information
pVih->bmiHeader.biWidth=gp.WidthW;//改变宽高两个属性
pVih->bmiHeader.biHeight=gp.HeightW;
hr = pConfig->SetFormat(pmtConfig);
这里hr出现VFW_E_INVALIDMEDIATYPE的返回值
正确的方法是什么呢?