[wip] test cancel images

parent 897c4221
Pipeline #12263 passed with stages
in 9 minutes and 3 seconds
......@@ -111,7 +111,7 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
TabWidth: 4
UseTab: Never
...
......@@ -836,8 +836,8 @@ int BufferCtrlObj::_xferImag()
}
// -----------------------------------------------------------------------------------------
// --------------- loop - process the N frames (dwFrameIdx <=
// dwRequestedFrames)
// loop - process the N frames
// (dwFrameIdx <= dwRequestedFrames)
// -----------------------------------------------------------------------------------------
bool bReadRAM = false;
......@@ -878,7 +878,7 @@ int BufferCtrlObj::_xferImag()
// -----------------------------------------------------------------------------------------
// ---------------------------------- find buffIdx associated with the
// next image dwFrameIdx
// next image dwFrameIdx PCO frame 1 ...
// -----------------------------------------------------------------------------------------
SHORT sBufNr;
DWORD dwBuffFrame;
......@@ -982,6 +982,14 @@ int BufferCtrlObj::_xferImag()
iLoopsPolled++;
} while (!(dwStatusDll & 0x00008000));
// 0x00008000 = Buffer event is set
// dwStatusDll DWORD *Pointer to a DWORD variable to get the status
// inside the SDK DLL :
// 0x80000000 = Buffer is allocated
// 0x40000000 = Buffer event created inside the SDK DLL
// 0x20000000 = Buffer is allocated externally
// 0x00008000 = Buffer event is set
if (dbgTraceFifo)
{
......@@ -1006,14 +1014,16 @@ int BufferCtrlObj::_xferImag()
DEB_ALWAYS() << msg;
}
// dwFrameIdx -> pco frame -> 1 ...
DWORD dwFrameIdx1 = dwFrameIdx + 1;
if ((dwFrameIdx + 1) >= dwRequestedFrames)
if ((dwFrameIdx) >= dwRequestedFrames)
{
int error;
// ------------- stop the recording and clear buffers
DEB_ALWAYS() << "\n ... _pco_SetRecordingState(0) when: "
<< DEB_VAR2(dwFrameIdx1, dwRequestedFrames);
<< DEB_VAR3(dwFrameIdx, dwFrameIdx1,
dwRequestedFrames);
m_cam->_pco_SetRecordingState(0, error);
}
......@@ -2410,21 +2420,21 @@ int BufferCtrlObj::_xferImagDoubleImage()
dwPcoFramesPerBuffer = m_cam->pcoGetFramesPerBuffer(); // for dimax = 1
DEB_TRACE()
<< "\n"
// << ">>> " << fnId << " (WaitForMultipleObjects) [
// ENTRY]:\n"
// << " " << DEB_VAR2(_iPcoAllocatedBuffNr,
//_dwPcoAllocatedBuffSize) << "\n"
// << " " << DEB_VAR2(_wArmWidth, _wArmHeight) << "\n"
// << " " << DEB_VAR1(roiNow) << "\n"
// << " " << DEB_VAR4(_wRoiWidth, _wRoiHeight,
//_uiBytesPerPixel, _wBitPerPixel) << "\n"
// << " " << DEB_VAR2( dwPcoFramesPerBuffer,
// dwFrameSize)
//<< "\n"
<< " "
<< DEB_VAR3(requested_nb_frames, dwPcoRequestedFrames, live_mode);
DEB_TRACE() << "\n"
// << ">>> " << fnId << " (WaitForMultipleObjects) [
// ENTRY]:\n"
// << " " << DEB_VAR2(_iPcoAllocatedBuffNr,
//_dwPcoAllocatedBuffSize) << "\n"
// << " " << DEB_VAR2(_wArmWidth, _wArmHeight) << "\n"
// << " " << DEB_VAR1(roiNow) << "\n"
// << " " << DEB_VAR4(_wRoiWidth, _wRoiHeight,
//_uiBytesPerPixel, _wBitPerPixel) << "\n"
// << " " << DEB_VAR2( dwPcoFramesPerBuffer,
// dwFrameSize)
//<< "\n"
<< " "
<< DEB_VAR3(requested_nb_frames, dwPcoRequestedFrames,
live_mode);
//----------------- traceAcq init
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment