Definition at line 31 of file VideoAccessStrategyFactory.h. References Impala::Core::Stream::Lavc::VideoAccessObject::FormatNameShort(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), Impala::Core::Stream::Lavc::VideoAccessObject::IsValid(), Impala::Core::Stream::Lavc::VideoAccessObject::NativeIndexValid(), and Impala::Core::Stream::Lavc::VideoAccessObject::VideoCodecName(). Referenced by Impala::Core::Stream::RgbDataSrcLavc::Init(). 00032 { 00033 const Lavc::VideoAccessObject* vao = 00034 new Lavc::VideoAccessObject(videoAddress); 00035 if (vao == 0 || !vao->IsValid()) 00036 return 0; 00037 00038 // consider the user's preference and otherwise the default value: 00039 bool useNativeIndex = 00040 (CmdOptions::GetInstance().GetString("jmp") == "pts"); 00041 00042 const String formatName = vao->FormatNameShort(); 00043 if ((formatName == "avi") || 00044 (formatName == "mov,mp4,m4a,3gp,3g2,mj2")) 00045 { 00046 const String codecName = vao->VideoCodecName(); 00047 00048 // "mpeg1video" is troublesome with presentation timestamps, 00049 if (codecName != "mpeg1video") 00050 useNativeIndex = vao->NativeIndexValid(); 00051 } 00052 00053 // ownership of the VAO will be passed to the strategy object 00054 if (useNativeIndex) 00055 return new StrategyUsingNativeIndex(vao); 00056 else 00057 return new StrategyIgnoringNativeIndex(vao); 00058 }
Here is the call graph for this function:
|