summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/audiodevices
Commit message (Collapse)AuthorAgeFilesLines
* Examples: fix unit testTim Blechmann2024-05-141-4/+3
| | | | | | | | | Sample type / rate and channel count were place into the wrong columns. Pick-to: 6.5 6.7 Change-Id: Ia63f1df3fa39a3ba1513e287b746d420a4c8291d Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Replace `QString` with `QStringLiteral` when wrapping a string literalTim Blechmann2024-04-081-4/+4
| | | | | | | | | Instantiates the utf-16 string at compile time rather performing a unicode conversion at run-time Pick-to: 6.5 6.6 6.7 Change-Id: I7c2e89437ad7f6c80022ac0dbb62c8dd46906ed5 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Correct license for example and snippet filesLucie Gérard2024-03-261-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all example and snippet files should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I16a226b797329a9ce962732a97fd1af84ab22cda Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Create separate 'Graphics', 'Multimedia' example categoriesJaishree Vyas2024-01-161-1/+1
| | | | | | | Fixes: QTBUG-117884 Pick-to: 6.6 6.7 Change-Id: Id718b09af348c042faa9fa72cf6295f731b7573d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add \examplecategory for Qt MultimediaVenugopal Shivashankar2023-07-211-0/+1
| | | | | | | | | | | Categorized the examples based on the categories listed in https://wiki.qt.io/Qt6/Example-Guideline#Categorisation. Task-number: QTBUG-115301 Pick-to: 6.5 6.6 Change-Id: I44ff60e0400558c451a5f2ce5be246172341f734 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Adjust multimedia examples to use new QPermission APIIvan Solovev2023-02-082-0/+36
| | | | | | | | | | | | | | | | Now when the library itself does not request permissions, that needs to be done on the user application level. This patch updates all examples to query the required permissions. As there is no QML API yet, the QML examples do it directly from main. Note: the WRITE_EXTERNAL_STORAGE Android permission is not handled by this patch, because it's currently not supported by the QPermission API. Task-number: QTBUG-109965 Change-Id: Iaeb09f9e32fced0ecb0f5ffc63d40c64ec386cfb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Include moc_*.cpp files in QtMM examplesArtem Dyomin2022-12-131-0/+2
| | | | | | | | | | | | | | | | The reason of the refactoring is following the common approach that leads to reducing compilation time and binary size. - logic hasn't been touched - some headers have been decoupled into header and cpp or renamed - the same refactorings of main QtMM code, tests, plugins are coming in the next commits Task-number: QTBUG-103290 Pick-to: 6.5 6.4 Change-Id: I5ec4c7b651ebb81879b8a7be8659e66d52af0d90 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Doc: Better integrate Qt Spatial Audio into multimedia documentationTopi Reinio2022-09-281-0/+1
| | | | | | | | | | | | | | Instead of just a single mention of the Spatial Audio module, list its types on the top-level module pages, and link to it from the overviews. List the spatialaudio example(s) as part of the main example group for multimedia. Mark Qt Spatial Audio as a Tech. Preview. Pick-to: 6.4 Change-Id: I9d5bf0482aadc8516c9b79ab9acda5fbd898f1cb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Examples: C++ style cleanupKai Köhne2022-09-073-31/+30
| | | | | | | | | | | | | Run clang-format on all files. Unify the headers to use the canonical include variants: single class includes instead of #include <QtGui>. Finally, using signals and slots instead of Q_SIGNALS and Q_SLOTS. Pick-to: 6.4 Change-Id: I033dad85a4a25600ec4e3171bede8b98e584cf5d Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Iaf0950f30b9332ec7f04113971bc58547e31a2b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: If5c61e7ebea0452847d411ea230438095111e030 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-244-173/+8
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ida08dfe6c84778656e942178c3d39042c9ef1ed2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Split spatial audio out into a lib of its ownLars Knoll2022-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | 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. Pick-to: 6.4 Change-Id: Ia3f9ac5e1edac4b1e07d3302d7a229ada5bdc038 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-02-171-12/+5
| | | | | | | | | | | | | | | | | - 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>
* 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>
* 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>
* Restore qmake project files for examplesJoerg Bornemann2021-08-061-0/+17
| | | | | | | | | | | | We regression-test in the CI by building examples with qmake. This partly reverts commit 7b28765dd0898e0638555e990308dc2fa09b79da. Pick-to: 6.2 Fixes: QTBUG-95065 Change-Id: Ib146eeb974d4e94d580597dbaae93378aa5561a9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Tag Qt Multimedia Widgets examples with 'widgets'Kai Köhne2021-08-021-0/+1
| | | | | | | | | | | The QML examples have QML in the name, and therefore are tagged with 'qml'. Make sure that the examples using MultimediaWidgets are also tagged with 'widgets'. Pick-to: 6.2 Change-Id: I02495f6d08b24e1f84a975d1d7bd9118bf1c4e7a Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move the QAudio::Mode enum inside QAudioDeviceLars Knoll2021-06-162-3/+3
| | | | | | | | QAudioDevice is the only class using that enum, so it makes more sense for the enum to live there. Change-Id: I11e6768d1114d63e68d1956f7d6e62786524c291 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QCameraInfo/QAudioDeviceInfo to QCamera/AudioDeviceLars Knoll2021-06-082-3/+3
| | | | | | | | | Those classes represent the physical device and it's properties, thus that name fits best. Change-Id: I0f45fc875ae6110452c1f2fb17f32adbe5155d01 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a number of compiler warnings/errors when using gccLars Knoll2021-05-141-3/+2
| | | | | | Change-Id: Ifa7bcd4507948cd61909a11af203852ee1586787 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QMediaDeviceManager to QMediaDevicesVolker Hilsheimer2021-05-072-7/+7
| | | | | | | | | | Reflect that also in the plugins, where classes are renamed from e.g. QXXXDeviceManager to QXXXMediaDevices. This is for consistency with QPlatformMediaDevices, and because QDarwinDevices would be too generic. Change-Id: I78f63f0b8c2aa68aa3f8fb4936e0838281b3222a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation on LinuxLars Knoll2021-05-071-1/+1
| | | | | Change-Id: Id058ad0ba34bf3810a09591dd51cddedbda7c2e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QAudioDeviceInfo: drop Range type, simplify APIVolker Hilsheimer2021-05-071-12/+12
| | | | | | | Adjust platform implementations accordingly. Change-Id: I51a74c62d37d681ef3b604ac6742b1f0f489aa74 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove qmake files from the repositoryLars Knoll2021-04-231-17/+0
| | | | | | Change-Id: I1131b555014a57e3224a8871de4cb1d01c406fd1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Make QMediaDeviceManager available to QMLLars Knoll2021-04-192-5/+7
| | | | | | | | | | | | This required some changes to the QMediaDeviceManager API, namely that it can be instantiated itself. Add required API as properties to QMediaDeviceManager and expose QAudioDeviceInfo and QCameraInfo as well. Change-Id: I4f7ef04d703f84cc6caefd62ad453f166e3b1c9b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modernize code baseLars Knoll2021-03-021-3/+3
| | | | | | | | | | | Use clang-modernize to modernize the code base * Use = default where applicable * Use nullptr Change-Id: I88b307e76b7f7dde090354ff4b292cea76f5c60c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup QAudioFormat and friendsLars Knoll2021-02-093-253/+130
| | | | | | | | | | | | Reduce the amount of available formats, and always use host endianness. Return both sample rate and channel count as a range, not a list of values. Change-Id: I88389b49ace077764fb647f50834236448e55c0e Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove codec property from QAudioFormat and relatedLars Knoll2021-01-293-173/+111
| | | | | | | | | | We only ever supported audio/x-raw (ie. unencoded PCM). Remove the codec properties from QAudioBuffer and QAudioDeviceInfo. Those deal with raw unencoded data and nothing else. Change-Id: I772d1bf624c8515b1d2f696da3f8e5bd5f0cc2f1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for notification when audio devices change on macOSLars Knoll2021-01-292-6/+13
| | | | | | | | | This required some deep digging, as apparently the AVAudioSession doesn't exist on macOS. Change-Id: Ic47c6bacbfc1b0eb1f9f451fc63f7e910ac2953d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the static methods from QAudioDeviceInfoLars Knoll2021-01-221-1/+3
| | | | | | | | QMediaDeviceManager now has the information. Change-Id: Iadba41d14c2a8d02d3e8eb3024e30a525ea0e14c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a QMediaDeviceInfo class to enumerate input/output devicesLars Knoll2021-01-221-0/+3
| | | | | | | | | | | | | | | | | Use this as the starting point for a new QPA like backend infrastructure. Refactor places that use the device information to use the new infrastructure. Cleanup the audio subsystem part and port it over to the new infrastructure. Android and QNX are not ported yet. Change-Id: I99c459c998f1f05e1c40ad30c700011e41cef533 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Provide a proper descriptive name for audio devicesLars Knoll2021-01-221-1/+1
| | | | | | | | deviceName() should probably go and be renamed to id(). Change-Id: I9e04f9194d21036adf21108e3206e77d608cc991 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Coding style cleanupsLars Knoll2021-01-211-7/+6
| | | | | | | | Do some coding style fixes proposed by clang-tidy. Change-Id: I62584767fd7af2f98ac02653c1105d64188f5554 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Initial Cmake port for qtmultimediaDoris Verria2021-01-201-0/+48
| | | | | | Fixes: QTBUG-89540 Change-Id: I2cf8d0edae2769a53cadd667ab5ac4f9cb754a50 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix deprecation warnings about QVariant APIFriedemann Kleint2019-04-051-1/+1
| | | | | | | | | | | | | | Fix warnings like: video/qvideosurfaceformat.cpp:522:47: warning: 'QVariant qVariantFromValue(const T&) [with T = QAbstractVideoBuffer::HandleType]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:524:48: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoFrame::PixelFormat]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:534:54: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoSurfaceFormat::Direction]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:536:46: warning: 'QVariant qVariantFromValue(const T&) [with T = double]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:538:53: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:542:52: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoSurfaceFormat::YCbCrColorSpace]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] Task-number: QTBUG-74043 Change-Id: I95f3bba4e63d83d02183a76be41d3819e0f400d8 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Move shared example folder to examples/multimedia/sharedFrederik Gladhorn2018-08-071-1/+1
| | | | | | | | | | | | The root examples directory should not contains shared folders. In the past multimedia was the only module installing things there, now the qtdoc module started doing the same. Let's clean up both. Task-number: QTBUG-69784 Change-Id: I8ff9d1b899fd589c1f3ec83e11b603431c2e4950 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-274-12/+42
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/multimedia/declarative-radio/view.qml src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h Change-Id: I97b507878b6de04ec38ddd13530e58b8f72390e4
| * Fix outdated BSD license headerKai Koehne2017-10-183-9/+39
| | | | | | | | | | Change-Id: I386d30a54819bae016cb50cf5892a5ac380288f9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Fix outdated FDL license headerKai Koehne2017-10-181-3/+3
| | | | | | | | | | Change-Id: I9cd7043058352ba2aeded74f86d863fca29bd37d Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Modernize the Audio Devices exampleVaL Doroshchuk2017-09-282-61/+48
|/ | | | | | | | | | | Changed the style of member initialization. Provided small cleanup. Changed 0 to nullptr. Changed to new signal/slot style if possible. Task-number: QTBUG-60627 Change-Id: I995d62b8d3741c719565f5b203b1046e8701d238 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* iOS: Add Info.plist files to indicate camera and microphone usageAndy Shaw2017-04-281-0/+1
| | | | | | | | | | Since iOS 10 the Info.plist file needs to indicate that it requires the usage of the camera and microphone in any application that requests them. So this adds Info.plist files to be used by the examples in that capacity. Change-Id: I16c6607366f57f4e950e53e1de1fbc0ac224df10 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Doc: Fix documentation warningsTopi Reinio2016-01-081-1/+1
| | | | | | | | | | - Fix incorrect paths passed to \example command - Fix resulting linking issues - Fix examplesinstallpath in .qdocconf - Remove unnecessary group definition Change-Id: I72a437ac6d297f3c63d4f29a0e3110971d1e330f Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Fix BSD license headersSergio Ahumada2015-02-173-9/+9
| | | | | | Change-Id: I639ed933b789393fa50630af133e51abe3d7fae3 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-124-21/+21
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix some typos in strings.Dmitry Shachnev2014-12-251-1/+1
| | | | | | | | s/Endianess/Endianness/ s/changable/changeable/ Change-Id: I91a43ff6e6143f2d3fc0a93aa8bbf34a415eea90 Reviewed-by: Andrew Knight <qt@panimo.net>
* Doc: Updated the \brief statementsVenu2014-10-241-5/+4
| | | | | | | Most of them were unnecessarily long. Change-Id: I8942254c2211adb268e399056435e6acc940616f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: Improved example documentationJerome Pasion2014-04-141-5/+4
| | | | | | | | | | | | | | | -added instructions on how to run the example (using \include to insert a section from qtbase/doc/global/) -updated copyright year -removed links to Qt 4 API -rearranged some of the sections -created links from the example pages to Qt Multimedia -fixed QDoc warnings related to the example pages Task-number: QTBUG-33597 Change-Id: Id45ce5cbd40dbfa384abd7260a316f6f6837c186 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Doc: Fix example paths referred in documentationTopi Reinio2013-04-301-1/+1
| | | | | | | | | | | qdocconf files for both Qt Multimedia and Qt Multimedia Widgets already define the correct example path. This change fixes also the example documentation to use the correct path, as well as the link to examples in Multimedia Overview. Change-Id: I72d75027ee18f6398eb76dc40bcc3d122541b1c9 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-104-4/+4
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>