Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::VideoJob::Manager::EvaluateStage (  )  [inline, private]

Definition at line 326 of file Manager.h.

References CreateInitialStageJobs(), flagVideoUpdated, ILOG_DEBUG, ILOG_INFO, Impala::Core::VideoJob::Data::IsValid(), mCurrentStage, mData, Impala::Core::VideoJob::Data::mProcessDef, mProcessDone, Impala::Core::VideoJob::Data::mVideos, Impala::Core::VideoJob::Data::mVideoSetSize, Impala::Core::VideoJob::ProcessDefinition::StageCount(), Impala::Job::State::TERMINATED_ABNRM, Impala::Job::State::TERMINATED_NRM, UpdateMaskFile(), and Impala::Core::VideoJob::Data::VideoSetSize().

Referenced by JobDone().

00327     {
00328         int nrOfInvalid = 0;
00329         for (int v = 0; v < mData.mVideoSetSize; v++)
00330         {
00331             if (mData.IsValid(v))
00332             {
00333                 VideoMeta& video = mData.mVideos[v];
00334                 VideoJob* mostRecentJob = video.jobs.back();
00335                 if (mostRecentJob->state != Job::State::TERMINATED_NRM &&
00336                     mostRecentJob->state != Job::State::TERMINATED_ABNRM)
00337                     return; // current stage not complete yet
00338             }
00339             else
00340             {
00341                 nrOfInvalid++;
00342             }
00343 
00344             // added by Jun Wu, 2009/09/15    
00345             if (flagVideoUpdated == "1")
00346             {
00347                 // update once each video is processed
00348                 UpdateMaskFile();
00349             }
00350         }
00351 
00352         // ok, we're at end of stage 
00353 
00354         UpdateMaskFile();
00355 
00356         ILOG_INFO("Stage " << mCurrentStage + 1 << " completed");
00357         if (mCurrentStage + 1 < mData.mProcessDef->StageCount())
00358         {
00359             if (nrOfInvalid < mData.VideoSetSize())
00360             {
00361                 mCurrentStage++;
00362                 ILOG_INFO("Advancing to stage " << mCurrentStage + 1);
00363                 CreateInitialStageJobs();
00364                 return;
00365             }
00366             else
00367             {
00368                 ILOG_DEBUG("Will not advance stage since no valid videos left");
00369             }
00370         }
00371 
00372         mProcessDone = true;
00373     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:40 2011 for ImpalaSrc by  doxygen 1.5.1