summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix up audiosource example pro fileLorn Potter2022-07-122-13/+13
| | | | | | | | | Must have been missed in the rename Change-Id: I7f23b5b8889edb99b28f2243084056b12b814002 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit d5f6155c3a854951d742b18e27faea792155399c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Polish the audiopanning exampleFriedemann Kleint2022-06-281-149/+202
| | | | | | | | | | | | - Move the members out of the class - Use QFormLayout for convenience - Improve the QFileDialog handling - Add QCommandLineParser Change-Id: I017e2111105907c870a85ffcc0ab70a6cc222f5d Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit 4bcf25dde4dabe068aa2741bef03e14ee12370a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-06-28179-8394/+358
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Ida08dfe6c84778656e942178c3d39042c9ef1ed2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit e9abd242abfbc368478f7be3e2923e7b100a9386) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Update spatial audio examplePaul Olav Tvete2022-06-161-0/+21
| | | | | | | | | Always loop the sound, and add an option to animate the position. Change-Id: Ib5b4fd230af27b74ce15285625e4c9bbf5ef3f7a Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 995376a8894c59d29b27c0b80f0adb91486d954e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Split spatial audio out into a lib of its ownLars Knoll2022-06-1627-54/+58
| | | | | | | | | | | | | | | | | | | | | | Move the classes from src/multimedia/spatial into its own QtSpatialAudio library. This is required to keep Qt Multimedia compatible with the requirements from the KDE Free Qt Foundation agreement, as well as to keep license compatibility with existing applications licensed under GPLv2 that are using Qt Multimedia. Moving the classes into a module of their own required a few additional changes to ensure we generate proper documentation for the new spatial audio module. To align the API between C++ and QML, the QML import was also renamed to QtQuick3D.SpatialAudio. Change-Id: Ia3f9ac5e1edac4b1e07d3302d7a229ada5bdc038 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit c403e775f60a5d02e761904342ac243be1f22597) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove old Digia organization identifier from example Info.plistsTor Arne Vestbø2022-06-022-3/+3
| | | | | | | | The PRODUCT_BUNDLE_IDENTIFIER variable already contains an appropriate value based on the organization and product name. Change-Id: I089582a95bedd00712c5a0994129a6c825d0d411 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a Surround mode to QAudioEngineLars Knoll2022-05-311-10/+12
| | | | | | | | | So far, we only had a Normal and Headphone mode here. Extend this to cover Surround configurations, and explicit Stereo mode and the Headphone mode. Change-Id: I086d02157d4edfd92e5b24076bee9a51bb5cc68a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Document the coordinate system being used by QAudioEngineLars Knoll2022-05-311-4/+4
| | | | | | | | And fix the example to correctly position the sound source around the listener. Change-Id: I66035e22a47902552f08e3dac0cb1ee31608bb59 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add missing qmake files for multimedia examplesPaul Olav Tvete2022-05-273-2/+24
| | | | | Change-Id: I7442b1e2bac663c560f37e35cb71a6aa6984d8b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* API cleanups for spatial/3D audioLars Knoll2022-05-241-14/+14
| | | | | | | | | Naming changes for the spatial audio API after reviewing it. Most of the names are now both shorter and better reflect the function they serve. Change-Id: I07347826f2fadf3d1705c597f35c168b19afe137 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* spatial audio: Use centimeters by defaultLars Knoll2022-05-231-12/+11
| | | | | | | | | | | | | | | Qt Quick 3D uses a centimeters by default for positions and distances. Align our API with that choice. Add a distanceScale property to enable the user to choose a different scale. Store all our data internally in meters, to be aligned with the data expected by resonance audio and to make sure we don't mess up the existing configuration when the distance scale changes. Change-Id: Id06cb49bd152bfa7920c096c662ff103041261e0 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Some smaller API fixes to QSpatialAudioSoundSourceLars Knoll2022-05-161-3/+3
| | | | | | | | Try to improve/clarify naming of properties. Change-Id: Idd610a95a196c127bfa0922f5a711ab2e483dcbf Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* API fixes for QSpatialAudioRoomLars Knoll2022-05-161-7/+8
| | | | | | | | Rename setWall() to setWallMaterial() for more clarity. Change-Id: I54dc7095e75bc520017fb394e552a87348d4cb8d Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* 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 Pick-to: 6.2 6.3 Change-Id: Iac447482c27a10a2cdba204739f753ccecd88289 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Smaller updates on the occlusion property for sound sourcesLars Knoll2022-05-111-2/+2
| | | | | | | | | Adjustments to the example and some doc clarifications. Change-Id: I1c6c1f6451949200cac09b9d4beeed80cf12a715 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
* Add overview and example docs for spatial audioLars Knoll2022-05-112-0/+51
| | | | | | | | Add a short description of the spatialaudio example and some overview docs for that part of the API. Change-Id: I7ee7b61c00f82f3bd4ca438e96b01a7c5e9889ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for rooms to the spatial audio engineLars Knoll2022-05-111-8/+54
| | | | | | | | | | | | | | | | | | The new QSpatialAudioRoom class allows defining a room. If the listener is inside the room, the properties of that room will get enabled, giving us first order reflections and reverb. Multiple rooms can be defined and the engine will automatically update the room to be used when the listener position changes. If the listener is inside multiple rooms, the room with the smallest volume will get chosen. Updated the spatialaudio example to allow modifying some of the room properties for testing. Change-Id: I94ffe0a6b7e570c4ea77898e021d7fe042fb9b52 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup the spatial audio sound source implementationLars Knoll2022-05-111-1/+2
| | | | | | | | Unify code that can be shared between the sound and stereo sources and move implementation details out of the public API. Change-Id: I28b7ac86aef640f6b2f509004348fb314d4d77f3 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Add some minimal documentation for the spatial audio classesLars Knoll2022-05-111-1/+1
| | | | | | | Rather minimal docs for the spatial audio C++ classes. Change-Id: I42d68b9ec571eb26f2388dbfcc156cba64f4a724 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Add example for spatial audioLars Knoll2022-05-113-0/+195
| | | | | | | | A simple widget based example that lets you pan one sound source around in space. Change-Id: I09e66fd217a136ef5bacaf7c3bb46af462993736 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Improve examples CMakeLists.txt (II)Kai Köhne2022-03-216-45/+17
| | | | | | | | | | | | - Remove double newline at the end - Use unversioned Qt commands - Remove QtC specific hacks Amends 236eec9cbe3 Pick-to: 6.3 Change-Id: Ia6dc5dc801a9002f9f5740869651c343b714913b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* 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 Pick-to: 6.3 Change-Id: Ie79de8e7af7908d8f2728c2af273ed5f4ae51a65 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the code-signing step from examplesDoris Verria2022-03-1714-131/+0
| | | | | | | | | | | | Codesigning with entitlements is not needed unless the hardened-runtime option is enabled, so we can remove this post-build step. Fixes: QTBUG-101719 Pick-to: 6.3 6.2 6.2.4 Change-Id: I35181220dbe4ef6b59072dcd3e76f066ab85db60 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix missing main.qml in examplesSamuel Mira2022-03-094-34/+42
| | | | | | | | | | | | | | | | 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 Pick-to: 6.3 Change-Id: I5fb2481d5576683171a2292bdc35e417ee6d8fab Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-02-1724-170/+68
| | | | | | | | | | | | | | | | | - 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 Pick-to: 6.3 Change-Id: I9f60da23df1547d685439b0263fa5bf533b7c69e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Declarative-camera: improve camera selectorTasuku Suzuki2022-02-171-0/+1
| | | | | | | Camera list was shown outside of the popup Change-Id: Ib3b73b092293485271919668b5ce767b935601c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Switch examples to build as isolated sub-builds part 2Alexandru Croitor2022-02-051-1/+1
| | | | | | | | | | | | | | | qt_examples_build_begin needs the EXTERNAL_BUILD flag to know that it's safe to build examples as ExternalProjects. It still won't do it in CI until we enable building examples as ExternalProjects for prefix builds. This is preparation for that. Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: Ie7b3be8d74c1eb9e5f09dbe1819d56c2a42653fc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Android: Fix qmlvideo metadata issuePekka Gehör2022-01-242-14/+17
| | | | | | | | | After the fix, metadata of the video shown correctly on MetaData page. Task-number: QTBUG-99038 Pick-to: 6.2 6.3 Change-Id: I3ef2d90c237d1740c550ff4537fe5184a88bea5f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Start of an FFmpeg backendLars Knoll2022-01-191-0/+5
| | | | | | | Nothing working, just trying to enumerate devices and formats. Change-Id: I8dddfe823a13d166f5d3c36030fd6e9882a6815d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: add install command for examplesSamuli Piippo2022-01-182-0/+24
| | | | | | | | Add install command to deploy the examples correctly. Pick-to: 6.3 6.2 Change-Id: If9c24c4267a801078a4bf3f783587afeeb734be0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNX: Instantiate the QNX backendLars Knoll2022-01-171-1/+1
| | | | | | | | And fix a few smaller issues. Change-Id: I8336820832810102329e97d225d09d0c8fdae8b1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
* Don't crash if system has no audio deviceDoris Verria2022-01-131-0/+3
| | | | | | | Fixes: QTBUG-97838 Pick-to: 6.2 6.3 Change-Id: I355958b99f62fc85228b3dd3afd06aa01005008c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Fix qmlvideo seek issuePekka Gehör2022-01-132-2/+2
| | | | | | | | After the fix, seek works s it should be. Task-number: QTBUG-99038 Change-Id: I6658dd3e860e88c9fee8e457d7cdcd31df840426 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix the camera format used by the camera exampleLars Knoll2022-01-051-12/+12
| | | | | | | | | | | | | The camera example was simply trying to get the format with the highest possible resolution. But that often lead to formats with a very low frame rate being chosen. Change the algorithm to find the highest resolution format with at least 30FPS. Fixes: QTBUG-97817 Pick-to: 6.2 6.3 Change-Id: I5e043188a4ed3d4acd72190b96fba4095a3f9aa2 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* audiosource example: Refactor push modeFriedemann Kleint2021-12-222-10/+16
| | | | | | | | | | | Factor out a function to calculate the level from the data to make it clearer that push does not require reimplementing a QIODevice. Complements a71362d9ef7098c1d7869b3768a0990a61474980. Pick-to: 6.3 6.2 Change-Id: I4899b96d1e8d0336f960e514bfd355a894522aa8 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Polish the audiosource exampleFriedemann Kleint2021-12-203-51/+42
| | | | | | | | | | | | | - Use a QWidget instead of a QMainWindow since no QMainWindow functionality is used and the controls are wrongly parented - Change the update signal of AudioInfo to levelChanged(level), removing the need for a lamba - Streamline the code Pick-to: 6.3 Pick-to: 6.2 Change-Id: Ic03a5414ee5da4841532ad23db112d0594f458e5 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Multimedia examples: Add camera and audio input entitlementsDoris Verria2021-12-1714-0/+136
| | | | | | | | | | | | | | | Apple needs apps to specify proper entitlements in order to grant the executable permissions to use services like camera and microphone. The multimedia examples using microphone and camera were sometimes crashing because of missing entitlements. To fix, add an entitlement file to all examples using these services, and add a post-build command to codesign the executables with the specified entitlements. Task-number: QTBUG-98419 Pick-to: 6.3 6.2 Change-Id: I6a578def1f6a41b4d106ee49c0c32fad304ef3cb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-153-15/+15
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: I7b3fe87c4dc9b3ed71c97598d07c592c7e707db8 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Fix Declarative Camera issues on video sidePekka Gehör2021-12-142-3/+7
| | | | | | | | | After the fix, the buttons on video side will behave as they should and preview plays the video. Fixes: QTBUG-99134 Pick-to: 6.2 6.3 Change-Id: I593aad3f37b93b3699781c6b143e7e0c9a157ec3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* 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>
* Declarative-camera facelift for mobilePekka Gehör2021-11-225-84/+358
| | | | | | | | | After patch, you can use the camera in portrait and landscape mode on mobile devices. Task-number: QTBUG-96077 Change-Id: Idd46498e1166bab09a27d182ce707d8bb4528c24 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix 'devices' example to build with MinGWAlexandru Croitor2021-11-101-1/+4
| | | | | | | | | | | | | | | | | | src/gui/kernel/qwindowdefs.h #defines main to qMain and qtentrypoint_win.cpp expects qMain to have 2 parameters in its signature: argc and argv. The 'devices' example was missing the parameters, which caused the app to fail at link time with qtentrypoint_win.cpp:97: undefined reference to `qMain(int, char**)' Add the parameters to the example signature. Pick-to: 6.2 Task-number: COIN-762 Change-Id: I8baa4e84abf4c08f462f041a30d261023282a0b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Fix for crashes issue of the Spectrum examplePekka Gehör2021-11-094-5/+51
| | | | | | | | | | The Spectrum app does not crash anymore after the fix. Fixes: QTBUG-96953 Pick-to: 6.2 Change-Id: Ia555bdd21c3bc1ab0ada585c49441d6f8f548f8d Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Fix for Content uri issuesPekka Gehör2021-11-092-4/+17
| | | | | | | | | After fix file name and file extension will pass as a initial name to the file name field of the QFileDialog. Fixes: QTBUG-96957 Pick-to: 6.2 Change-Id: Iea97b1249195fee1021163beb23130141093c3a4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove some dead codeLars Knoll2021-11-031-10/+0
| | | | | | | | | WinRT doesn't exist anymore as a platform we support. Pick-to: 6.2 Change-Id: I85ebb73b5c24d5415847925b0f3462b29232c6c9 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update the matching formats in the audiorecorder and camera examplesLars Knoll2021-11-034-38/+99
| | | | | | | | | | | The combo boxes should show a list of matching formats/codec that we can handle give the constraints from the other combo boxes. Fixes: QTBUG-97839 Pick-to: 6.2 Change-Id: I1a3f66c27f3ede06f188b9320600dde7c561a409 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Camera example: Don't crash is the system doesn't have a cameraLars Knoll2021-11-011-8/+10
| | | | | | | | | Don't assume the list of camera formats is non empty. Pick-to: 6.2 Change-Id: Id64772b8db165357d350456df9174a6659f7c8d8 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* player example: Use msec precision on the position sliderLars Knoll2021-11-012-6/+6
| | | | | | | | | | Improves look and feel of the position slider significantly for short videos. Pick-to: 6.2 Change-Id: I3b2cf3e66317cffcb1ffaec26bf3f5787b4264b4 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Camera example: Fix .plist file to build in iOS/macOS with qmake and cmakeDoris Verria2021-10-284-9/+110
| | | | | | | | | | | | | | | - Fix format error in .plist.in file which was causing the permission dialog to not show up. - Provide separate .plist.in files for iOS and macOS so we can set needed keys specific to the platforms. - For qmake builds, fix the shared.pri to provide an INFOPLIST dictionary for macOS. The provided one has iOS specific keys. Fixes: QTBUG-97408 Pick-to: 6.2 Change-Id: Idd8e00c91b935328352cc513f419205303d9356d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Fix for List of available devices issuePekka Gehör2021-10-152-0/+10
| | | | | | | | | | After fix the list of output devices will be update. Pick-to: 6.2 Fixes: QTBUG-96956 Change-Id: Iaae3e1098ed11fb21477cd7dcf2a6054f169ddea Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>