diff options
author | James McDonnell <jmcdonnell@blackberry.com> | 2017-04-03 16:36:46 -0400 |
---|---|---|
committer | James McDonnell <jmcdonnell@blackberry.com> | 2017-11-14 17:03:28 +0000 |
commit | c16ce50f2b3362c70d9e1cdf6382b9950e552509 (patch) | |
tree | 07fcc4965bb2f517642180f2f5052c166a04f3b7 /examples/multimediawidgets/player/main.cpp | |
parent | 1cb4027e0a59e1875db88b72afb5833aafbd87eb (diff) |
Implement QCustomAudioRoleControl for QNX
Change-Id: I95202ffabbeae36dbb2f2fa43871e0bceed53cae
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples/multimediawidgets/player/main.cpp')
-rw-r--r-- | examples/multimediawidgets/player/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/multimediawidgets/player/main.cpp b/examples/multimediawidgets/player/main.cpp index 9e6d9358c..a20fb1c4f 100644 --- a/examples/multimediawidgets/player/main.cpp +++ b/examples/multimediawidgets/player/main.cpp @@ -63,14 +63,21 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationName("QtProject"); QCoreApplication::setApplicationVersion(QT_VERSION_STR); QCommandLineParser parser; + QCommandLineOption customAudioRoleOption("custom-audio-role", + "Set a custom audio role for the player.", + "role"); parser.setApplicationDescription("Qt MultiMedia Player Example"); parser.addHelpOption(); parser.addVersionOption(); - parser.addPositionalArgument("url", "The URL to open."); + parser.addOption(customAudioRoleOption); + parser.addPositionalArgument("url", "The URL(s) to open."); parser.process(app); Player player; + if (parser.isSet(customAudioRoleOption)) + player.setCustomAudioRole(parser.value(customAudioRoleOption)); + if (!parser.positionalArguments().isEmpty() && player.isPlayerAvailable()) { QList<QUrl> urls; for (auto &a: parser.positionalArguments()) |