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

int Impala::Application::mainPlay ( int  argc,
char *  argv[] 
)

Definition at line 155 of file mainPlay.cpp.

References Impala::CmdOptions::AddOption(), Impala::Core::Stream::RgbDataSrcFactory::Construct(), Impala::Core::Stream::RgbDataSrc::DumpInfo(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::CmdOptions::GetArg(), Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, Impala::CmdOptions::Initialise(), Impala::Core::Stream::RgbDataSrcFactory::Instance(), Impala::Core::Stream::RgbDataSrc::LastFrame(), Impala::Core::Stream::RgbDataSrc::LastFrameAsTime(), Impala::Application::DemoCamera2d::oglWnd, Impala::CmdOptions::ParseArgs(), OglGui::OglWindow::Valid(), and Impala::Core::Stream::RgbDataSrc::Valid().

Referenced by main().

00156 {
00157     OglInit(&argc, &argv[0]);
00158     CmdOptions& options = CmdOptions::GetInstance();
00159     options.Initialise(true, false, true);
00160     options.AddOption(0, "noZoom", "", "0");
00161     options.AddOption(0, "3d", "", "0");
00162 
00163     if (Link::DiskImage::DiskImageUsed())
00164         options.AddOption(0, "javacp", "classpath", "");
00165 
00166     if (! options.ParseArgs(argc, argv, "camera|filename", 1))
00167         return 1;
00168 
00169     ILOG_VAR(Application.mainPlay);
00170 
00171     String srcName = options.GetArg(0);
00172     bool doZoom = ! options.GetBool("noZoom");
00173     bool is2d = ! options.GetBool("3d");
00174 
00175     RgbDataSrcFactory& factory = RgbDataSrcFactory::Instance();
00176     Persistency::RgbDataSrcLocator loc("dot", srcName, options);
00177     RgbDataSrc* src = factory.Construct(loc, options.GetString("src"));
00178     if (! src->Valid())
00179     {
00180         ILOG_ERROR("RgbDataSrc failed");
00181         return 0;
00182     }
00183     ILOG_INFO(src->LastFrame()+1 << " frames of " << src->FrameWidth() 
00184               << " x " << src->FrameHeight());
00185     ILOG_INFO("length " << src->LastFrameAsTime());
00186 
00187     src->DumpInfo();
00188 
00189     WindowPlay* oglWnd = new WindowPlay(0, 0, doZoom, true, is2d, src);
00190     if (! oglWnd->Valid())
00191     {
00192         ILOG_ERROR("WindowPlay failed");
00193         return 0;
00194     }
00195     return 1;
00196 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:36:29 2010 for ImpalaSrc by  doxygen 1.5.1