Seperate command opts by app
This commit is contained in:
1 parent
e924a06a9e
commit
40aa4f95f3
4 files changed
+42
-24
No files matched your search
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "CommandLineHandle.h"
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
@@ -37,5 +38,39 @@ CommandLineHandle::~CommandLineHandle()
|
||||
|
||||
}
|
||||
|
||||
Int CommandLineHandle::ParseToolsArgs()
|
||||
{
|
||||
Int iRet = 0;
|
||||
|
||||
po::options_description qualityOpts( "Quality" );
|
||||
qualityOpts.add_options() /**/
|
||||
( "quality", po::value<std::string>(), "select a quality metric" ) /**/
|
||||
( "quality_metrics", "list supported quality metrics" );
|
||||
|
||||
po::options_description moduleOpts( "Module" );
|
||||
moduleOpts.add_options() /**/
|
||||
( "module", po::value<std::string>(), "select a module" ) /**/
|
||||
( "module_list", "list supported modules" );
|
||||
|
||||
addOptions( qualityOpts );
|
||||
addOptions( moduleOpts );
|
||||
|
||||
if( !parse() )
|
||||
{
|
||||
iRet = 1;
|
||||
}
|
||||
|
||||
if( getOptionsMap().count( "quality_metrics" ) )
|
||||
{
|
||||
printf( "PlaYUVer supported quality metrics: \n" );
|
||||
for( UInt i = 0; i < PlaYUVerFrame::supportedQualityMetricsList().size(); i++ )
|
||||
{
|
||||
printf( " %s\n", PlaYUVerFrame::supportedQualityMetricsList()[i].c_str() );
|
||||
}
|
||||
iRet = 1;
|
||||
}
|
||||
|
||||
return iRet;
|
||||
}
|
||||
|
||||
} // NAMESPACE
|
||||
Reference in new issue
Block a user