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

Impala::Core::VideoSet::RgbDataSrcKeyframes::RgbDataSrcKeyframes ( VideoSet videoSet,
Keyframes keyframes,
int  videoId 
) [inline]

Definition at line 23 of file RgbDataSrcKeyframes.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Core::Database::RawDataSet::GetContainerFile(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetFilePathFrames(), Impala::Core::VideoSet::Keyframes::GetFirstKeyframeVideo(), Impala::Core::VideoSet::Keyframes::GetFrameNr(), Impala::Core::Database::RawDataSet::GetLocator(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesVideo(), ILOG_ERROR, mArchive, mCurIm, Impala::Core::Stream::RgbDataSrc::mFrameHeight, Impala::Core::Stream::RgbDataSrc::mFrameWidth, mKeyframes, Impala::Core::Stream::RgbDataSrc::mLastFrame, mUseFileArchive, mVideoId, mVideoSet, and ReadImage().

00024         : RgbDataSrc(-1, videoSet->GetFile(videoId))
00025     {
00026         mVideoSet = videoSet;
00027         mKeyframes = keyframes;
00028         mVideoId = videoId;
00029         mUseFileArchive = false;
00030         mCurIm = 0;
00031         mArchive = 0;
00032 
00033 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00034         String fName = mVideoSet->GetFilePathFrames(mVideoId, "images.raw",
00035                                                     false, true);
00036         if (!fName.empty())
00037         {
00038             mUseFileArchive = true;
00039             mArchive = new Array::ImageArchiveFile(fName, false,
00040                                                    mVideoSet->GetDatabase());
00041         }
00042 #else // REPOSITORY_USED
00043         String container = mVideoSet->GetContainerFile(mVideoId);
00044         Persistency::ImageArchiveLocator loc(mVideoSet->GetLocator(), true,
00045                                              container, "images.raw", 0);
00046         mArchive = Persistency::ImageArchiveRepository().Get(loc);
00047         if (mArchive)
00048             mUseFileArchive = true;
00049 #endif // REPOSITORY_USED
00050 
00051         int firstK = mKeyframes->GetFirstKeyframeVideo(videoId);
00052         Array::Array2dVec3UInt8* im = ReadImage(mKeyframes->GetFrameNr(firstK));
00053         if (im == 0)
00054         {
00055             ILOG_ERROR("Unable to read image");
00056             return;
00057         }
00058         // this only works in case all images have the same size
00059         mFrameWidth = im->CW();
00060         mFrameHeight = im->CH();
00061         int lastKey = firstK + mKeyframes->GetNrKeyframesVideo(videoId) - 1;
00062         mLastFrame = mKeyframes->GetFrameNr(lastKey);
00063         delete im;
00064     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:31:15 2010 for ImpalaSrc by  doxygen 1.5.1