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

void Impala::Visualization::SegmentationDocumentGuiStills::UpdateFromMpg (  )  [inline, private]

Definition at line 139 of file SegmentationDocumentGuiStills.h.

References Impala::Visualization::ImagesWindow::AddImage(), Impala::atol(), Impala::Core::Database::DataDocument::CurFileId(), Impala::Core::VideoSet::SegmentationDocument::CurShot(), Impala::Core::Stream::RgbDataSrc::DataPtr(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::Core::VideoSet::Segmentation::GetEnd(), Impala::Core::VideoSet::SegmentationDocument::GetSegmentation(), Impala::Core::VideoSet::Segmentation::GetStart(), OglGui::StaticText::GetText(), Impala::Core::Database::DataDocument::GetThumbScale(), Impala::Core::VideoSet::VideoSet::GetVideo(), Impala::Core::VideoSet::SegmentationDocument::GetVideoSet(), Impala::Core::Stream::RgbDataSrc::GotoFrame(), Impala::MakeString(), mDoFullSize, mFrameSkipField, mImagesSet, mNrIm, mSegDoc, Impala::Core::Geometry::NEAREST, Impala::Core::Array::Scale(), Impala::Core::Array::Set(), and Impala::Core::Stream::RgbDataSrc::SetInterval().

Referenced by HandleNewFile().

00140     {
00141         int shot = mSegDoc->CurShot();
00142         int vidId = mSegDoc->CurFileId();
00143         Core::VideoSet::Segmentation* shots = mSegDoc->GetSegmentation();
00144         int startF = shots->GetStart(shot) + 1;
00145         int endF = shots->GetEnd(shot);
00146         Core::Stream::RgbDataSrc* src = mSegDoc->GetVideoSet()->GetVideo(vidId);
00147         if (!src)
00148             return;
00149         int skipFr = 15;
00150         if (mFrameSkipField)
00151             skipFr = atol(mFrameSkipField->GetText());
00152         int interval = (endF - startF) / (mNrIm - 1);
00153         if (interval < skipFr)
00154             interval = skipFr;
00155 #ifdef unix
00156 #define NO_PLAYER
00157 #endif
00158 #ifdef NO_PLAYER
00159 /* Ork: WARNING: RgbDataSrcDX not yet ready for unixes */
00160 /* TODO: verify and fix this. */
00161 #else
00162         src->SetInterval(interval);
00163         while (startF < endF)
00164         {
00165             src->GotoFrame(startF);
00166             Array2dVec3UInt8* im = Core::Array::ArrayCreate<Array2dVec3UInt8>
00167                 (src->FrameWidth(), src->FrameHeight(), 0, 0,
00168                  src->DataPtr(), true);
00169             Array2dVec3UInt8* sc = 0;
00170             if (mDoFullSize)
00171                 Core::Array::Set(sc, im);
00172             else
00173                 Core::Array::Scale(sc, im, mSegDoc->GetThumbScale(),
00174                                    mSegDoc->GetThumbScale(),
00175                                    Core::Geometry::NEAREST, true);
00176             std::string cap = std::string("frame ") + MakeString(startF);
00177             mImagesSet->AddImage(sc, std::string("Direct"), cap, true);
00178             delete im;
00179             startF += interval;
00180         }
00181 #endif
00182     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:47:27 2010 for ImpalaSrc by  doxygen 1.5.1