|
关于DirectDraw的StartVideo
[复制链接]
在wince平台下,我们通过调用IDirectDrawVideoPort中的StartVideo函数,但是StartVideo调用不成功,不知有那位大侠帮小弟分析一个原因或可能出错的地方。以下是关于StartVideo的一些代码:
memset(&g_vpInfo,0,sizeof(g_vpInfo)); //add by xgd tandow 2008/10/22
g_vpInfo.dwSize = sizeof(DDVIDEOPORTINFO);
g_vpInfo.dwOriginX = 0;
g_vpInfo.dwOriginY = 0;
g_vpInfo.dwVPFlags = DDVP_CROP | DDVP_PRESCALE;
g_vpInfo.rCrop.left = 0;
g_vpInfo.rCrop.top = 0; // Exclude VBI
g_vpInfo.rCrop.right = 720;
g_vpInfo.rCrop.bottom = 240+17;
g_vpInfo.dwPrescaleWidth = 480;
g_vpInfo.dwPrescaleHeight = 234;
g_vpInfo.lpddpfInputFormat = &g_vpInputFormats[0];
g_vpInfo.lpddpfVBIInputFormat = NULL;
g_vpInfo.lpddpfVBIOutputFormat = NULL;
g_vpInfo.dwVBIHeight = 17;
g_vpInfo.dwReserved1 = 0;
g_vpInfo.dwReserved2 = 0;
RETAILMSG(1,(TEXT("ENTER StartVideo\r\n")));
hRet = g_pVideoPort->StartVideo(&g_vpInfo);
if (hRet != DD_OK)
{
RETAILMSG(3,(TEXT("\r\n hRet = %d,add by mercury xu tandow 20081017 \r\n"),hRet));
return InitFail(hRet, TEXT("Start video FAILED"));
}
以上的代码就应该可以调用StartVideo了,可我就是调用不成功,希望有高手能帮小弟解决一下,非常感谢。
|
|