MBOOL CamIOPipe:: start() { FUNCTION_LOG_START; MBOOL ret = MFALSE; // // (1) set buffer to current buffer ret = mpCamIOPipe->sendCommand((MINT32)NSImageio::NSIspio::EPIPECmd_SET_CURRENT_BUFFER, (MINT32)NSImageio::NSIspio::EPortIndex_IMGO, 0, 0 ); if (mfgIsYUVPortON) { ret = mpCamIOPipe->sendCommand((MINT32)NSImageio::NSIspio::EPIPECmd_SET_CURRENT_BUFFER, (MINT32)NSImageio::NSIspio::EPortIndex_IMG2O, 0, 0 ); } // // (2) start CQ ret = mpCamIOPipe->startCQ0(); // // ! let commond queue trigger mode as continuous mode ret = mpCamIOPipe->sendCommand(NSImageio::NSIspio::EPIPECmd_SET_CQ_CHANNEL, (MINT32)NSImageio::NSIspio::EPIPE_CQ_NONE, 0, 0 ); //[?] // ret = mpCamIOPipe->start(); // (3) sync vync ret = mpCamIOPipe->irq( ((mu4DeviceID == SENSOR_DEV_MAIN)||(mu4DeviceID == SENSOR_DEV_ATV)) ? (NSImageio::NSIspio::EPipePass_PASS1_TG1) : (NSImageio::NSIspio::EPipePass_PASS1_TG2), NSImageio::NSIspio::EPIPEIRQ_VSYNC ); // wait for the stable frame. if (mrSensorPortInfo.fgBypassDelay == MFALSE) { MUINT32 u4DelayFrame = 0; MUINT32 u4Mode = SENSOR_CAPTURE_DELAY; // mpSensorHal->sendCommand(static_cast<halSensorDev_e>(mrSensorPortInfo.u4DeviceID), static_cast<int>(SENSOR_CMD_GET_UNSTABLE_DELAY_FRAME_CNT), reinterpret_cast<int>(&u4DelayFrame), reinterpret_cast<int>(&u4Mode)); MY_LOGD(" Wait for stable frame:%d\n", u4DelayFrame); skipFrame(u4DelayFrame); } FUNCTION_LOG_END; return ret; }
/** \brief Decodes the next frame in the video stream **/ bool QVideoDecoder::skipNextFrame() { bool ret = skipFrame(); if(ret) DesiredFrameNumber++; // Only updates the DesiredFrameNumber if we were successful in getting that frame else LastFrameOk=false; // We didn't find the next frame (e.g. seek out of range) - mark we don't know where we are. return ret; }
static int getFrameTimingAndSeed() { if(params.FrequentTimerCheck && InterlockedIncrement(&timerHammeringCounter) == MAX_TIMERQUERY_PER_FRAME) { printLog("timing: application is hammering timer calls, advancing time. (frame = %d)\n",getFrameTiming()); skipFrame(); } int frame = getFrameTiming(); seedAllTimers(); return frame; }
MBOOL Ts_IT:: start() { MBOOL ret = MTRUE; MY_LOGD("E"); ret = mpCamIOPipe->sendCommand((MINT32)EPIPECmd_SET_CURRENT_BUFFER, (MINT32)EPortIndex_IMGO, 0, 0 ); if (mfgIsYUVPortON) { ret = mpCamIOPipe->sendCommand((MINT32)EPIPECmd_SET_CURRENT_BUFFER, (MINT32)EPortIndex_IMG2O, 0, 0 ); } MY_LOGD("mpCamIOPipe->startCQ0"); ret = mpCamIOPipe->startCQ0(); // ! let commond queue trigger mode as continuous mode #if 0 ret = mpCamIOPipe->sendCommand(EPIPECmd_SET_CQ_TRIGGER_MODE, (MINT32)EPIPE_PASS1_CQ0, (MINT32)EPIPECQ_TRIGGER_CONTINUOUS_EVENT, (MINT32)EPIPECQ_TRIG_BY_PASS1_DONE); #else ret = mpCamIOPipe->sendCommand(EPIPECmd_SET_CQ_CHANNEL, (MINT32)EPIPE_CQ_NONE, 0, 0 ); //[?] #endif ret = mpCamIOPipe->start(); MY_LOGD("mpCamIOPipe->irq(VSYNC)"); ret = mpCamIOPipe->irq(EPipePass_PASS1_TG1, EPIPEIRQ_VSYNC ); MY_LOGD("Wait for stable frame:%d", mu4SkipFrame); skipFrame(mu4SkipFrame); return ret; }
MBOOL CamIOPipe:: start() { FUNCTION_LOG_START; MBOOL ret = MFALSE; // // (1) set buffer to current buffer ret = mpCamIOPipe->sendCommand((MINT32)NSImageio::NSIspio::EPIPECmd_SET_CURRENT_BUFFER, (MINT32)NSImageio::NSIspio::EPortIndex_IMGO, 0, 0 ); if (mfgIsYUVPortON) { ret = mpCamIOPipe->sendCommand((MINT32)NSImageio::NSIspio::EPIPECmd_SET_CURRENT_BUFFER, (MINT32)NSImageio::NSIspio::EPortIndex_IMG2O, 0, 0 ); } // // (2) start CQ ret = mpCamIOPipe->startCQ0(); // // ! let commond queue trigger mode as continuous mode ret = mpCamIOPipe->sendCommand(NSImageio::NSIspio::EPIPECmd_SET_CQ_CHANNEL, (MINT32)NSImageio::NSIspio::EPIPE_CQ_NONE, 0, 0 ); //[?] // ret = mpCamIOPipe->start(); // (3) sync vync ret = mpCamIOPipe->irq( ((mu4DeviceID == SENSOR_DEV_MAIN)||(mu4DeviceID == SENSOR_DEV_ATV)) ? (NSImageio::NSIspio::EPipePass_PASS1_TG1) : (NSImageio::NSIspio::EPipePass_PASS1_TG2), NSImageio::NSIspio::EPIPEIRQ_VSYNC ); MY_LOGD(" Wait for stable frame:%d", mu4SkipFrame); skipFrame(mu4SkipFrame); handleNotifyCallback( ECamPipe_NOTIFY_MSG_SOF, 0, 0 ); FUNCTION_LOG_END; return ret; }
static unsigned int __stdcall stuckThreadProc(void *arg) { HANDLE handles[2]; handles[0] = endStuckEvent; handles[1] = stuckTimer; while(Real_WaitForMultipleObjects(2,handles,FALSE,INFINITE) != WAIT_OBJECT_0) { printLog("timing: frame %d timed out, advancing time manually...\n", currentFrame); skipFrame(); //nextFrame(); } return 0; }
void HHVM_FUNCTION(set_frame_metadata, const Variant& metadata) { VMRegAnchor _; auto fp = vmfp(); if (fp && fp->skipFrame()) fp = g_context->getPrevVMState(fp); if (UNLIKELY(!fp)) return; if (LIKELY(!(fp->func()->attrs() & AttrMayUseVV)) || LIKELY(!fp->hasVarEnv())) { auto const local = fp->func()->lookupVarId(s_86metadata.get()); if (LIKELY(local != kInvalidId)) { cellSet(*metadata.asCell(), *tvAssertCell(frame_local(fp, local))); } else { SystemLib::throwInvalidArgumentExceptionObject( "Unsupported dynamic call of set_frame_metadata()"); } } else { fp->getVarEnv()->set(s_86metadata.get(), metadata.asTypedValue()); } }