视频格式设置的问题?
想每次打开摄像头都是用同一种格式采集数据,
尝试用capSetVideoFormat函数
但是返回失败
那位能指点怎么使用这个函数
WORD vfs;
BITMAPINFO lpBmpInfo;
vfs = sizeof(BITMAPINFO);
capGetVideoFormat(hWnd, &lpBmpInfo, vfs);
lpBmpInfo.bmiHeader.biWidth = 176;
lpBmpInfo.bmiHeader.biHeight =144;
lpBmpInfo.bmiHeader.biBitCount =12;
lpBmpInfo.bmiHeader.biPlanes = 1;
lpBmpInfo.bmiHeader.biClrUsed = 0;
lpBmpInfo.bmiHeader.biXPelsPerMeter = 0;
lpBmpInfo.bmiHeader.biSize = 40;
lpBmpInfo.bmiHeader.biYPelsPerMeter = 0;
lpBmpInfo.bmiHeader.biCompression =mmioFOURCC('I','4','2','0');
lpBmpInfo.bmiHeader.biClrImportant =0 ;
lpBmpInfo.bmiHeader.biSizeImage = lpBmpInfo->biWidth*lpBmpInfo->biHeight*lpBmpInfo->biBitCount/8;
capSetVideoFormat(hWnd, &lpBmpInfo, vfs);
如果同时再i420格式下 就可以改变视频的大小,
如果在其他格式下 不能更改到i420格式,也不能修改大小
希望各位大侠指点一下