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

virtual void Impala::Core::VideoSet::IndexSegmentation::HandleNewFile ( VideoSet vs,
int  fileId,
Stream::RgbDataSrc src 
) [inline, virtual]

Arrived at given DB_FILE in a "normal" walk.

Reimplemented from Impala::Core::VideoSet::Listener.

Definition at line 37 of file IndexSegmentation.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::VideoSet::Mpeg7Doc::EndFrame(), Impala::Core::Stream::RgbDataSrc::FrameRateDen(), Impala::Core::Stream::RgbDataSrc::FrameRateNum(), ILOG_ERROR, Impala::Core::VideoSet::Mpeg7Doc::KeyframeFrame(), Impala::Core::VideoSet::Mpeg7Doc::KeyframeName(), mKeyframes, Impala::Persistency::Mpeg7DocLocator::MPEG7_SHOT, mSegmentation, Impala::Core::VideoSet::Mpeg7Doc::NrKeyframes(), Impala::Core::VideoSet::Mpeg7Doc::NrShots(), Impala::Core::VideoSet::Mpeg7Doc::ShotName(), Impala::Core::Table::Table::Size(), and Impala::Core::VideoSet::Mpeg7Doc::StartFrame().

00038     {
00039         if ((!src) || (src->FrameRateNum() < 0) || (src->FrameRateDen() < 0))
00040         {
00041             ILOG_ERROR("Need src with known frame rate");
00042             return;
00043         }
00044 
00045         String container = vs->GetContainerFile(fileId);
00046         String name = vs->GetFileBase(fileId) + ".xml";
00047         const int MPEG7_SHOT = Persistency::Mpeg7DocLocator::MPEG7_SHOT;
00048         Persistency::Mpeg7DocLocator loc(vs->GetLocator(), MPEG7_SHOT,
00049                                          container, name);
00050         loc.SetFrameRateNum(src->FrameRateNum());
00051         loc.SetFrameRateDen(src->FrameRateDen());
00052         Mpeg7Doc* mp7 = Persistency::Mpeg7DocRepository().Get(loc);
00053         for (int s=0 ; s<mp7->NrShots() ; s++)
00054         {
00055             mSegmentation->Add(fileId, mp7->StartFrame(s), mp7->EndFrame(s),
00056                                mp7->ShotName(s));
00057             int shotId = mSegmentation->Size() - 1;
00058             for (int k=0 ; k<mp7->NrKeyframes(s) ; k++)
00059             {
00060                 String name = mp7->KeyframeName(s, k) + ".jpg";
00061                 mKeyframes->Add(fileId, shotId, mp7->KeyframeFrame(s, k), name);
00062             }
00063         }
00064         delete mp7;
00065     }

Here is the call graph for this function:


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