Reimplemented from OglGui::Window. Definition at line 353 of file SurveillanceApp.cpp. References Impala::Application::SDash::TimeSlider::CurrentTime(), OglGui::Window::DisplayFunc(), OglGui::AlertTimeLine::GetCurrentTime(), OglGui::AlertTimeLine::GetStartTime(), Impala::Visualization::VideoJpgPlayer::GetTimePast(), OglGui::OglWindow::GetVisible(), HandleSubmitButtonState(), mApplicationEnding, mCamEventSchedule, mCamEventSchedulePosition, mExitButton, mInspectVideoId, mTimeLine, mVideoPlayer, mVideoTimeSlider, Impala::Application::SDash::RESTART_TIME, Impala::Visualization::VideoJpgPlayer::SetShowMaxFrame(), ShowEvent(), Impala::Application::SDash::ApplicationEnding::StartApplicationEnding(), Impala::Application::SDash::TIMES_PER_FRAME, and Impala::Application::SDash::TimeSlider::TimeSpan(). 00354 { 00355 static bool initialized = false; 00356 00357 // Here events should be generated based on the current time 00358 long startTime = mTimeLine->GetStartTime(); 00359 long currentTime = mTimeLine->GetCurrentTime(); 00360 int runTime = (currentTime - startTime); 00361 00362 mVideoPlayer->SetShowMaxFrame(runTime/TIMES_PER_FRAME[mInspectVideoId]); 00363 mVideoTimeSlider->TimeSpan(runTime); 00364 //mVideoTimeSlider->TimeSpan(30*60); 00365 long timePast = mVideoPlayer->GetTimePast(); 00366 mVideoTimeSlider->CurrentTime(startTime+timePast); 00367 00368 // SK: no longer random events 00370 //if (!initialized) 00371 //{ 00372 // if (runTime >= 1) 00373 // initialized = true; 00374 //} 00375 //else if (ABSRND(2000)>1997) 00377 //{ 00378 // int id = 1 + ABSRND(NR_OF_CAMERAS); 00379 // int type = 1 + ABSRND(4); 00380 // CameraEvent* cameraEvent = 00381 // new CameraEvent(id,type,currentTime,"random"); 00382 // ShowEvent(*cameraEvent); 00383 //} 00384 00385 // show scheduled events; note that the map is ordered by scheduled time (secs) 00386 while (mCamEventSchedulePosition != mCamEventSchedule.end()) 00387 { 00388 const int nextEventTime = mCamEventSchedulePosition->first; 00389 if (nextEventTime > runTime) 00390 break; 00391 std::vector<CameraEvent>& scheduledEvents = mCamEventSchedulePosition->second; 00392 const int nrOfEvents = scheduledEvents.size(); 00393 for (int i = 0; i < nrOfEvents; i++) 00394 { 00395 CameraEvent& camEvent = scheduledEvents[i]; 00396 const long virtualSecs = startTime + nextEventTime; 00397 camEvent.SetSeconds(virtualSecs); 00398 ShowEvent(camEvent); 00399 } 00400 mCamEventSchedulePosition++; 00401 } 00402 00403 HandleSubmitButtonState(); 00404 Window::DisplayFunc(); 00405 00406 static int cnt = 0; 00407 #ifdef PRINT_JPG_READ 00408 printf("FR:%d\n", cnt++); 00409 #endif 00410 00411 if (!mExitButton->GetVisible() && runTime >= RESTART_TIME) 00412 mApplicationEnding->StartApplicationEnding(); 00413 }
Here is the call graph for this function:
|