| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "MulticamControl.h" |
| | | #include "Global_Define.h" |
| | | #include "FrameBufferController.h" |
| | |
| | | if (nYStart + nYSize > nBufSizeY* GetEndFrameIdx()) |
| | | return FALSE; |
| | | |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | if(m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | if(m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | { |
| | | m_nSetBufferIdx = 0; |
| | | |
| | |
| | | m_nEndFrameIdx++; //Count |
| | | m_nSetBufferIdx++; //index |
| | | |
| | | if (m_nEndFrameIdx > g_pStatus->GetGrabFrameCount(m_nScanIndex)) |
| | | int nCameraIdx = m_Param.nCameraIdx; |
| | | if (m_nEndFrameIdx > g_pStatus->GetGrabFrameCount(nCameraIdx, m_nScanIndex)) |
| | | { |
| | | GrabScanStop(); |
| | | g_pStatus->SetGrabEnd(m_nScanIndex); |
| | | g_pLog->DisplayMessage(_T("%d Over Grab Count : Stop Grab[%d][%d] - %d"), m_nBoardID, m_nScanIndex, m_nEndFrameIdx,g_pStatus->GetGrabFrameCount(m_nScanIndex)); |
| | | g_pStatus->SetGrabEnd(nCameraIdx, m_nScanIndex); |
| | | g_pLog->DisplayMessage(_T("%d Over Grab Count : Stop Grab[%d][%d] - %d"), m_nBoardID, m_nScanIndex, m_nEndFrameIdx,g_pStatus->GetGrabFrameCount(nCameraIdx, m_nScanIndex)); |
| | | return TRUE; |
| | | } |
| | | |
| | | if (m_nSetBufferIdx > m_pFrameBuffer->GetFrameCount()) |
| | | { |
| | | GrabScanStop(); |
| | | g_pStatus->SetGrabEnd(m_nScanIndex); |
| | | g_pStatus->SetGrabEnd(nCameraIdx, m_nScanIndex); |
| | | g_pLog->DisplayMessage(_T("%d Over Grab Buffer Stop Grab[%d][%d] - %d"), m_nBoardID, m_nScanIndex, m_nEndFrameIdx,m_pFrameBuffer->GetFrameCount()); |
| | | return TRUE; |
| | | } |
| | |
| | | int buffer_pitch_value; |
| | | driver_status |= McGetParamInt(m_hGrabChannel, MC_BufferPitch, &buffer_pitch_value); |
| | | |
| | | ///// Time out 5 檬.... |
| | | ///// Time out 5 檬.... |
| | | driver_status |= McSetParamInt(m_hGrabChannel, MC_AcqTimeout_ms, -1); |
| | | |
| | | driver_status |= McSetParamInt(m_hGrabChannel, MC_SurfaceCount, 25); |