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

Impala::Core::VideoSet::ExportKeyframes::ExportKeyframes ( Reporter reporter,
CmdOptions options,
VideoSet vs 
) [inline]

Definition at line 29 of file ExportKeyframes.h.

References Impala::atof(), Impala::atol(), Impala::CmdOptions::GetArg(), Impala::CmdOptions::GetNrArg(), Impala::Core::Array::gWriteJpgQuality, ILOG_ERROR, Impala::Core::ImageSet::MakeImageSet(), mArchive, mBuf, mBufSize, mForcePng, mImSet, mKeyframes, mReporter, mScale, mSplitArchive, and Impala::Core::VideoSet::Reporter::SetReportArray().

00030     {
00031         mReporter = reporter;
00032         mKeyframes = 0;
00033         if (options.GetNrArg() < 6)
00034         {
00035             ILOG_ERROR("Missing argument");
00036             return;
00037         }
00038         // assumes that dirs in VideoSet and ImageSet are in "sync"
00039         // ImageSet is used for naming only
00040 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00041         mImSet = Core::ImageSet::MakeImageSet(options.GetArg(2),
00042                                               vs->GetDatabase());
00043 #else // REPOSITORY_USED
00044         mImSet = Core::ImageSet::MakeImageSet(options.GetArg(2));
00045 #endif // REPOSITORY_USED
00046         if (!mImSet)
00047         {
00048             ILOG_ERROR("Image set was not constructed");
00049             return;
00050         }
00051 
00052         mScale = atof(options.GetArg(3));
00053 
00054         mArchive = false;
00055         mSplitArchive = false;
00056         if (options.GetArg(4) == "archive")
00057             mArchive = true;
00058         else if (options.GetArg(4) == "split")
00059             mSplitArchive = true;
00060         else if (options.GetArg(4) != "file")
00061             ILOG_ERROR("arg 4 should be file|archive|split");
00062 
00063         mForcePng = false;
00064         if (options.GetArg(5) == "png")
00065             mForcePng = true;
00066         else if (options.GetArg(5) != "jpg")
00067             ILOG_ERROR("arg 5 should be jpg|png");
00068 
00069         if (options.GetNrArg() > 6)
00070             Core::Array::gWriteJpgQuality = atol(options.GetArg(6));
00071 
00072         mBuf = 0;
00073         if (mArchive || mSplitArchive)
00074         {
00075             mBufSize = 10000000;
00076             mBuf = new char[mBufSize];
00077             mReporter->SetReportArray(false); // we will cause a "memory leak"
00078         }
00079     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:29:03 2010 for ImpalaSrc by  doxygen 1.5.1