MythTV  master
mythavtest_commandlineparser.cpp
Go to the documentation of this file.
1 // Qt
2 #include <QString>
3 
4 // MythTV
7 
10 {
12 }
13 
15 {
16  return "MythAVTest is a testing application that allows direct access \n"
17  "to the MythTV internal video player.";
18 }
19 
21 {
22  allowArgs();
23  addHelp();
25  addVersion();
26  addWindowed();
27  addGeometry();
28  addDisplay();
29  addLogging();
30  addInFile();
31  addPlatform();
32  add(QStringList{"-t", "--test"}, "test", false,
33  "Test video performance.",
34  "Test and debug video playback performance."
35  "Audio, captions and the On Screen Display will all "
36  "be disabled and video will be displayed at the fastest possible rate. ")
37  ->SetGroup("Video Performance Testing")
38  ->SetRequiredChild("infile");
39  add(QStringList{"--nodecode"}, "nodecode", false, "After decoding a small nuber of frames, "
40  "the last presented frame will be displayed repeatedly to test "
41  "rendering speed.", "")
42  ->SetGroup("Video Performance Testing")
43  ->SetChildOf("test");
44  add(QStringList{"-d", "--decodeonly"},
45  "decodeonly", false, "Decode video frames but do not display them.",
46  "")
47  ->SetGroup("Video Performance Testing")
48  ->SetChildOf("test");
49  add(QStringList{"-gpu"}, "gpu", false, "Allow hardware accelerated video decoders", "")
50  ->SetGroup("Video Performance Testing")
51  ->SetChildOf("test");
52  add(QStringList{"--deinterlace"},
53  "deinterlace", false,
54  "Deinterlace video frames (even if progressive).",
55  "")
56  ->SetGroup("Video Performance Testing")
57  ->SetChildOf("test");
58  add(QStringList{"-s", "--seconds"}, "seconds", "",
59  "The number of seconds to run the test (default 5).", "")
60  ->SetGroup("Video Performance Testing")
61  ->SetChildOf("test");
62  add(QStringList{"-vrr", "--vrr"}, "vrr", 0U,
63  "Try to enable (1) or disable (0) variable refresh rate (FreeSync or GSync)","");
64 }
65 
MythCommandLineParser::addDisplay
void addDisplay(void)
Canned argument definition for -display.
Definition: mythcommandlineparser.cpp:2736
MythCommandLineParser::addGeometry
void addGeometry(void)
Canned argument definition for –geometry.
Definition: mythcommandlineparser.cpp:2614
MythCommandLineParser
Parent class for defining application command line parsers.
Definition: mythcommandlineparser.h:116
MythAVTestCommandLineParser::MythAVTestCommandLineParser
MythAVTestCommandLineParser()
Definition: mythavtest_commandlineparser.cpp:8
MythCommandLineParser::addPlatform
void addPlatform(void)
Pass through the platform argument to Qt for GUI applications.
Definition: mythcommandlineparser.cpp:2747
MythCommandLineParser::addVersion
void addVersion(void)
Canned argument definition for –version.
Definition: mythcommandlineparser.cpp:2534
MythCommandLineParser::addWindowed
void addWindowed(void)
Canned argument definition for –windowed and -no-windowed.
Definition: mythcommandlineparser.cpp:2544
CommandLineArg::SetRequiredChild
CommandLineArg * SetRequiredChild(const QString &opt)
Set argument as parent of given child and mark as required.
Definition: mythcommandlineparser.cpp:723
MythAVTestCommandLineParser::GetHelpHeader
QString GetHelpHeader(void) const override
Definition: mythavtest_commandlineparser.cpp:14
MythCommandLineParser::addLogging
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
Definition: mythcommandlineparser.cpp:2638
CommandLineArg::SetChildOf
CommandLineArg * SetChildOf(const QString &opt)
Set argument as child of given parent.
Definition: mythcommandlineparser.cpp:689
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.cpp:1760
MYTH_APPNAME_MYTHAVTEST
static constexpr const char * MYTH_APPNAME_MYTHAVTEST
Definition: mythcorecontext.h:31
MythCommandLineParser::allowArgs
void allowArgs(bool allow=true)
Specify that parser should allow and collect values provided independent of any keyword.
Definition: mythcommandlineparser.cpp:2468
mythcorecontext.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2521
MythAVTestCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythavtest_commandlineparser.cpp:20
MythCommandLineParser::addSettingsOverride
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
Definition: mythcommandlineparser.cpp:2585
mythavtest_commandlineparser.h
MythCommandLineParser::addInFile
void addInFile(bool addOutFile=false)
Canned argument definition for –infile and –outfile.
Definition: mythcommandlineparser.cpp:2727