summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/mediaplayer
Commit message (Collapse)AuthorAgeFilesLines
* Docs: Fix broken linksNicholas Bennett2022-05-131-3/+4
| | | | | | | | | | | | The muted and volume properties belong to the AudioOutput qml type, not the MediaPlayer type, so these were fixed. Added qtquickcontrols module dependency to qdoc project. Task-number: QTBUG-102306 Change-Id: Iac447482c27a10a2cdba204739f753ccecd88289 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit e4fb343f897718beee106e72df13b5063d71d402) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve examples CMakeLists.txt (II)Kai Köhne2022-03-221-26/+7
| | | | | | | | | | | | - Remove double newline at the end - Use unversioned Qt commands - Remove QtC specific hacks Amends b45ce023950d Change-Id: Ia6dc5dc801a9002f9f5740869651c343b714913b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 86d7c582dd0aa60005661ce4891d663a4b57f419)
* Docs: Update QML Mediaplayer Example DocumentationNicholas Bennett2022-03-1813-6/+168
| | | | | | | | | | | | Added a step through of the code and added images and animations to support the explanations. Large videos were uploaded to YouTube and embedded. Task-number: QTBUG-100512 Change-Id: Ie79de8e7af7908d8f2728c2af273ed5f4ae51a65 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 29eb3cc4d8a00f889b989730d65f8b7d074bef6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix missing main.qml in examplesSamuel Mira2022-03-092-15/+18
| | | | | | | | | | | | | | | | | These examples use resources files with qml files inside but the resource files were added in the project sources. That prevented the app to find and use the resource files. To fix the issue the resources were added using qt6_add_resources macro. Note that adding the cmake flag set(CMAKE_AUTORCC ON) would also work, but the qt6_add_resources macro is more consistent with the rest of the examples. Fixes: QTBUG-101518 Change-Id: I5fb2481d5576683171a2292bdc35e417ee6d8fab Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit bdacf2b290e9d341ffc5d96e7bcc696ef3b7add7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve examples CMakeLists.txtKai Köhne2022-02-171-6/+2
| | | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Change-Id: I9f60da23df1547d685439b0263fa5bf533b7c69e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 236eec9cbe35f018f0c0617d4a0d707dea85b0ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: add install command for examplesSamuli Piippo2022-01-191-0/+12
| | | | | | | | Add install command to deploy the examples correctly. Change-Id: If9c24c4267a801078a4bf3f783587afeeb734be0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit a0437e324bad99685072aa7f7a5fc4d20846bb12)
* MediaPlayer example: Display track-specific metadataDoris Verria2021-12-092-8/+23
| | | | | | | | | | Update the metadata information to show track-specific metadata for the active tracks, besides the media's metadata. Add a missing signal emmission on darwin's mediaplayer. Pick-to: 6.2 Change-Id: I0513d3ab0c2b62cf74ef060bc1367e2589f68bcd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix the example imagesLars Knoll2021-09-221-0/+0
| | | | | | | | | They contained some ugly borders from the capturing tool. Remove those. Pick-to: 6.2 6.2.0 Change-Id: I75c8a5b85ff856144eb7611dda5d9e0840706f0b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add some basic docs for the media player and recorder examplesLars Knoll2021-09-202-0/+48
| | | | | | | | | | | Hook up those examples in the correct places, remove a stale link to the qmlvideofx example and fix the highlighted examples list to include four examples, showing playback and capture for both C++ and QML. Pick-to: 6.2 6.2.0 Change-Id: I79177b7f398c418ab3ba723e9ff2cd5ef3de1cf6 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Hide the metadata and tracks side bar when videoOutput is tappedAssam Boudjelthia2021-09-171-0/+6
| | | | | | | | Pick-to: 6.2 6.2.0 Change-Id: I7ec3e321335877831930b7ffa1076b79c87fcdef Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do not discard track that do not have language informationPiotr Srebrny2021-09-092-9/+6
| | | | | | | | | | | | | Many track do not have the languange information or it may be not relevant, like in the case of video content. Instead of discarding these tracks give them a default track_x name. Fix how track indexes are handled. Pick-to: 6.2 6.2.0 Change-Id: Ic8a3cf6feb6d00e05f317e4085ee852f71e4352d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Samuel Mira <samuel.mira@qt.io>
* Do not hide playback control bar since HoverHandle is brokenPiotr Srebrny2021-09-062-2/+2
| | | | | Change-Id: Ia67ba3c0611cebd49a9e5ed072c2bb07739312fa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow passing a media file as command line argument to the mediaplayerLars Knoll2021-09-062-6/+22
| | | | | | | | | It's often convenient to be able to pass the file to play back on the command line to the QML based mediaplayer. Pick-to: 6.2 Change-Id: I1b77184a614cb6a32a7243e242b99fcdc1bae300 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add Track Selection from QML and updated exampleSamuel Mira2021-08-315-1/+205
| | | | | | | | | | Added Q_PROPERTY in QMediaPlayer.h for the obtaining track metadata and for setting active track Changed mediaplayer QML example to add track information and change. Pick-to: 6.2 Change-Id: I1ff228a858079a87b1253d3c7a1ff24d815f2182 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix mediaplayer QML example's layout and iconsAssam Boudjelthia2021-08-254-15/+28
| | | | | | | | | | | | | The play control buttons were overlaying the rate seekbar and have wrong layout on both portrait and landscape. Also make sure QtSvg is added to the project because mute/unmute button is an svg image and it's not being loaded properly without the fix. Pick-to: 6.2 Change-Id: I98e26273ca5a2496d624c378d868ac497dd19741 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-171-1/+1
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I67a136d4437269f9afea9bf71d424d46132f4fa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove QT_VERSION_CHECK from examplesKai Köhne2021-08-121-5/+0
| | | | | | | | | | We can always assume that the example is built with at least the current Qt version it is shipped with. Everything else is not supported. Pick-to: 6.2 Change-Id: I1cd58c976f6916de7bc4465741f2820c30d73b33 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix media player position handling after seeking on gstreamerLars Knoll2021-07-301-20/+6
| | | | | | | | | | | | | | | | After calling setPosition() while being paused, gst_element_query_position() can return false while the pipeline is still prerolling the new position. So simply return the last position in that case instead of 0. Also moved some methods that are only used on the pipeline from QGstElement to QGstPipeline so that we can cache the position there without having to add data to every element. Fixes: QTBUG-95251 Change-Id: Ice56975fcf7d519f0dd54db75103b97b025cd085 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QMediaPlayer::isSeekable() on gstreamerLars Knoll2021-07-301-6/+1
| | | | | | | | | | Properly determine whether seeking is allowed on the given source. Add an auto test. Fixes: QTBUG-95246 Change-Id: I6a81a4690c6f9d53ef1ef9c217a3077fa63c05d0 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix audio handling in the media player exampleLars Knoll2021-06-283-13/+11
| | | | | | | | | | Adapt to recent API changes that broke that volume/muted handling in this example. Change-Id: I7a3d151fe0ffcc6f937418703bf815b2f75323a5 Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QAudioOutput in QMediaPlayerLars Knoll2021-06-111-0/+3
| | | | | | | | | | | | | | Adjust QMediaPlayer to the new audio output architecture. One now needs to explicitly add a QAudioOutput to the media player to get audio playback. While this requires two more lines of code to set up the media player, it does make the API consistent between audio and video and also consistent with what we have in QMediaCaptureSession. Adjusted auto tests where required and ported all platforms. Change-Id: I247e915e4862dee6d6bce367b83664b1d1d69726 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add an example media player written in QMLPiotr Srebrny2021-06-0312-0/+993
Change-Id: I98c35b3888701f94efaf58b3ab6c08c39943bdf8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>