This patch allows the user to change the audio device while a video or
audio file is being played in the media player app.
Before this change, audio would start playing on operating system's
default audio device, but it would not switch to another audio device
even if the user selected another device while the media was playing.
This patch uses a MediaDevices QML element to listen to audio device
changes from the operating system, and will automatically switch to the
device that is set as default at any time.
Fixes: QTBUG-119282
Pick-to: 6.8
Change-Id: Id1acfe9e9025a81c4cc3fa0e4593292f287f7b9a
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Qt Multimedia's media player, and QtScXml's media player used the same
mediaplayer.png filename on their respective application screenshot,
which caused the QtScXml example image to incorrectly be used with the
Qt Multimedia example.
Renaming the media player image from mediaplayer.png to
mediaplayerapp.png. This way the filename matches the CMake target name
for the application.
Fixes: QTBUG-129444
Pick-to: 6.8 6.7
Change-Id: Ie4d93d2cc5100a42faeec7828775b62a56d3ff23
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor
Some examples had to be adapted manually, mostly those that build
additional qml modules / plugins.
documentviewer did not get the deployment api, because it's trickier.
Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I76322185fc824c112d77e077ee39e7ccbc193a4c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
There is an issue on Android where QFileDialog does not return real
filenames. Instead, it returns content URIs that do not seem appropriete
for displaying in playlist.
To ensure that filenames are displayed correctly, we need to use
QFileInfo. Since there is no QML type for QFileInfo, additional
FileNameProvider singleton type has been registered for QML use.
Fixes: QTBUG-122273
Pick-to: 6.7 6.5
Change-Id: Ib6bd152856a6979788bcbb203d58a38810ea0682
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The URL input field had a validation that limited the possible protocols
to only http, https, rtp, rtsp and udp.
This patch modifies the validation regular expression to allow for more
protocols supported by FFmpeg.
Pick-to: 6.7
Change-Id: I84861673a78d4317592f96b4a92d8e676b05660f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Add return type annotation to validateUrl() function to get rid of a
warning when running the MediaPlayer demo.
Pick-to: 6.7
Change-Id: I2e0ac48f111e90d37d46dc8cd39adb3bcd228ca5
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
MediaPlayer demo was using themed text colors but native base colors in
the File menu. This caused issues with visibility if the contrast
between the colors was too low, at least on Gnome.
This patch updates the demo to use themed colors in the File menu, as
well as using the highlight color more appropriately for better
visibility in both dark and light themes.
Additionally, the highlight color is added to the theming singleton.
Pick-to: 6.7
Change-Id: I7baf0ce217e24112c8daabfdeec76e069c867062
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
If we have only 1 file and trying to shuffle, we enter an infinite
loop, while trying to find an index not equal to the current one.
We need an additional check to avoid this.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-122178
Change-Id: I299ef0f66adc271be5921a6f16eabde9b2021499
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
The MediaPlayer demo had an issue in the track options list where nested
scrolling caused some options to be difficult to access.
This is fixed by positioning all track options in a Column instead of a
ListView.
Additionally modified the TracksOptions implicit height binding to size
the component based on the amount of options.
Fixes: QTBUG-119285
Pick-to: 6.7 6.6
Change-Id: Iaa1ed2c370118a5c0119b233a59c7f4d8c0c70eb
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Lars Sutterud <lars.sutterud@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Projects need install instructions to be usable on embedded platforms.
Fix existing instructions to put files into correct places.
Fixes: QTBUG-112024
Pick-to: 6.7
Change-Id: I6a3d84edc1c67281d5497e99144c159faf0f783c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Add metadata about build time / runtime dependencies in the form
of Qt documentation modules. This should allow Qt Creator to hide
examples where needed Qt modules are not installed (because they
are optional in the Qt Online Installer).
Pick-to: 6.7
Task-number: QTBUG-120759
Change-Id: I03d8d75b273fe497803b9af9783b90e397b0638d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
There is no need to keep the example in the title, see also
https://wiki.qt.io/Qt6/Example-Guideline .
Pick-to: 6.7
Change-Id: If173285c2e0f0ef7d21a113e4e0713aef84511dc
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In the Media player demo, when an audio file was played, the audio track
reverted to "No track". This was because the audio track index was set
to follow the selected video track index. This is now fixed.
Additionally fixed some warning spam caused by a missing function return
type.
Fixes: QTBUG-117647
Pick-to: 6.6 6.5
Change-Id: I3b8f331f23ff6a677785bc7456ee1cbc64f27842
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Playback control panel of Mediaplayer example did not fit to smaller
screen. It happened that playlist button goes outside of screen on
Android devices.
To make it fit, two icons (Rate_Icon and Mute_Icon) will be hidden on
smaller screens. Also some spacing will be smaller for portrait mode.
Pick-to: 6.6 6.5
Fixes: QTBUG-118043
Change-Id: Ic562ae7349f0b5d6b39b031dad9c4a4108027f7e
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Explicitly link to MediaPlayer module so it gets packaged to the APK.
* Allow the example to user nameFilters after the fix
0f4181919663e85ddc142456b357dcde3d0a4a7f.
Pick-to: 6.6
Change-Id: I16c2feccb90ce7448ae24d03868fbedf3c449e66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Move all icons in an "icon" folder of the respective module.
Rename Config.iconSource() to Config.iconName() and change it to just
return the icon name according to theme without any path.
Add 2 singletons to each module providing iconSource() functions
doing the lookup relative to their locations.
Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: I8e74ce633400ae170f0fdb467a2ae65f172319b8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Remove links to examples that no longer exist, and fix linking to
page/section titles that have changed.
Fix other minor issues in passing.
Pick-to: 6.5 6.6
Change-Id: I6420fd7319e021f8a31f1776b31fabd05631c145
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Establish a common file layout allowing
Python and C++ to use loadFromModule().
Add a manually created qmldir file for usage by Python and the qml tool
(note CMake will still generate its own).
Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: Idf2564ed84bd6c95e76dacdfbc0a9691c64e5f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Make it a required property which is always set with a check.
Pick-to: 6.6
Change-Id: I7771bcbe7b3ccc798b885682135d501e2d4d60ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
In addition to Application Example Media, Player is added to Mobile
category
Pick-to: 6.5.2 6.5 6.6
Change-Id: If4ba1813006fae626c6ea4a16f19bee34fc08f43
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
The same example exists in qtmultimedia, and it is using a similar
target name as well, which can breaks the top-level build, so we need a
new name for it. I thought since this is a demo project, and it's an
app, we can name it like the ToDoListApp.
Pick-to: 6.5 6.6
Change-Id: Ia91786f7a32e1263157091b10683cd5294c292a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add following examples to Application Examples category:
* Robot Arm Example
* Qt Quick Demo - RESTful Color Palette API client
* Media Player Example
* Document Viewer
Pick-to: 6.5 6.6
Change-Id: Ie36bb9a09d7fe868db07e02edcb1778f214494e9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add missing */ in external-resources.qdoc
* Remove linking to 3rd party attribution pages that no longer exist
* Fix Media Player Example documentation
* Remove duplicate \example command
* Fix \image file name
Pick-to: 6.6 6.5
Change-Id: Ie26e4cc9105a5c728de2ec18b514b5d5ba3d61b9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Design of MultimediaPlayer example was refreshed.
New icons, colors, application structure were provided.
Some new functionalities were introduced to the sample:
playlist, shuffle, loop, dark mode.
Tested on Windows, Android Emulator, macOs, iOS emulator.
Change-Id: I38a8e203021edc97b70a4ab8f0d8d83c6d5ae45b
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>