日期:2014-05-17 浏览次数:20733 次
int ISampleGrabberCB.BufferCB(double SampleTime, IntPtr pBuffer, int BufferLen)
{
try
{
if (!mbGotOne)
{
// The buffer should be long enought
if (BufferLen <= mstride * mvideoHeight)
{
// Copy the frame to the buffer
// m_handle = pBuffer;
CopyMemory(mhandle, pBuffer, mstride * mvideoHeight);
// m_handle = pBuffer;
mbGotOne = true;//这里弹出错误。
// Picture is ready.
mpictureReady.Set();
}
}
else
{
mdropped++;
}
}
catch (System.Exception ex)
{
MessageBox.Show(ex.ToString());
&n