summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Add Info.plist with NSCameraUsageDescription to qmlvideo exampleLars Sutterud2023-02-102-0/+28
| | | | | | | | | | Created Info.plist containing NSCameraUsageDescription. Without it the example crashes when trying to use the camera on macOS. Also included the new file in qmlvideo.pro. Task-number: QTBUG-110015 Change-Id: I6ab57b690bc99fc0b63d5447f54f78d4b8351636 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use the right enum for the loops propertyAndy Shaw2022-12-232-2/+2
| | | | | | | | | Changed Audio.Infinite to MediaPlayer.Infinite, this fixes a problem on QNX where it would cause a crash when using the wrong enum. Change-Id: I01ae2feeea1a60e5771207320fb7caca1ed315f5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Doc: minor fixes re the camera documentationAndy Shaw2020-06-152-0/+2
| | | | | | | Change-Id: I8fbff45f5ebae681ab37cfd0ab0acb79eec88864 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> (cherry picked from commit f730fa8d3eaefdcd44f57c49c468344da56bb041) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove deprecated QTextStream operators from examplesTopi Reinio2020-04-032-17/+17
| | | | | | | | Use '\n' instead. Task-number: QTBUG-82532 Change-Id: I01bf8cc3254469514cb0f56f3055b944bac578a2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Examples: request Android storage permissions when using QStandardPathsAssam Boudjelthia2020-02-274-0/+50
| | | | | | | | | | Some examples uses QStandardPaths, on Android permissions might need to be explicitly requested to read/write to those paths. Task-number: QTBUG-80717 Change-Id: Ifb52e1c13ed99dcc82fb79a305b64e538596db7c Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove usage of QGL* APIsVaL Doroshchuk2020-02-181-2/+2
| | | | | | | | | QOpenGL API should be used instead. Task-number: QTBUG-74409 Fixes: QTBUG-81902 Change-Id: I80d09cba79248451cf211eabd87651301ae18b63 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* spectrum example: Fix warnings about deprecated QList<T>::toSet()Friedemann Kleint2019-11-251-2/+4
| | | | | | | | | Use std::unique() to obtain a sorted, unique list, fixing: engine.cpp:572:49: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] engine.cpp:579:43: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] Change-Id: I7bc1b5ed4f3bf56897cc1e187833c11cb8560500 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* GStreamer: Add support of Androidv5.14.0-beta2Val Doroshchuk2019-10-186-0/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since for Android GStreamer is distributed in archives, and should be staticlly linked, so by default it is not built and should be explicitly enabled within configuring by -gstreamer option. (currently it is auto and enabled if gstreamer exists) ("libs" of the gstreamer library in configure.json is empty to prevent any libs to be added while building any code that uses gstreamer library) Some base gst archives are fully included to Qt5MultimediaGstTools. Users would need to just use: QT += multimediagsttools-private Before building, GSTREAMER_ROOT_ANDROID env var should be set to point to gst binaries. Also all necessary plugins must be registered in user's code by GST_PLUGIN_STATIC_DECLARE/GST_PLUGIN_STATIC_REGISTER macros after QGstUtils::initializeGst(). and e.g. project file might contain: INCLUDEPATH += $$(GSTREAMER_ROOT_ANDROID)/armv7/include/ \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include LIBS += -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ \ -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \ __here_list_of_plugins__ See video/android/gstreamer example Change-Id: Ie4e586fa8489f1bd23622763f5578abed1729272 Task-number: QTBUG-72125 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Remove usages of deprecated APIsSona Kurazyan2019-08-087-7/+7
| | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives. - Made the tests for deprecated APIs to compile conditionally, based on the deprecation version. Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: Ifd397dae9b3ebc2ba2504db7baa2d8ff21bfb3a7 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Eradicate all but one Q_FOREACH loopMarc Mutz2019-07-113-12/+6
| | | | | | | | | | | | | | | | Q_FOREACH is going to be deprecated, or at the very least banned from use in Qt code. All these are trivial in the sense that the loop body clearly doesn't modify the container over which we iterate, and that the container is const, or trivially marked as such. In one case, replaced Q_FOREACH + delete + clear() with qDeleteAll(qExchange()), in three others, replaced Qt containers with statically-known content with plain C arrays. Change-Id: I718821811370f0cfefac3893283572d39a7d957d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Remove usages of deprecated qSortSona Kurazyan2019-06-201-2/+2
| | | | | | Task-number: QTBUG-76491 Change-Id: I7a22d6612848e25bb780d205c6cdbb314cd4762d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-131-3/+3
| | | | | | | | It was deprecated by qtbase/ed99a591a83a399458f12341d0a1c0b3152f247a. Change-Id: I87bf219c05a62e1deeb9d3df558e5084318a2a69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-181-2/+4
|\ | | | | | | Change-Id: I82d63ba32a0c9f8b883d00ef1bd68df3a10da96c
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-141-2/+4
| |\ | | | | | | | | | Change-Id: I03225f5e980a69246b046351f7d7d8e84f102ca0
| | * AVFoundation: Use $PRODUCT_NAME in Info.plist only for macx-xcode specVaL Doroshchuk2019-05-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Info.plist is handled only in ProjectBuilderMakefileGenerator which is used only if MAKEFILE_GENERATOR == XCODE. Using -spec macx-clang uses UnixMakefileGenerator. Change-Id: Ie6a8e6a0b133da1e0e7d556b32693c56d8cbf294 Fixes: QTBUG-75285 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Deprecate canonicalUrl and canonicalRequest in QMediaContentVaL Doroshchuk2019-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QMediaContent can contain only one content and media resources are already deprecated, canonicalUrl and canonicalRequest are a bit confusing and outdated. Deprecated and replaced by QMediaContent::request() which already contains the url. Change-Id: I418006e112f49466b0129bf1e6e1ae629c714538 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-202-53/+39
|\| | | | | | | | | | | Change-Id: I1d3e0dfb1759426171d8a8a93c8191cfb798b410
| * | Doc: Fix multiple documentation issuesv5.13.0-beta3Topi Reinio2019-04-162-53/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GstTools has some (internal) documentation, but was causing a number of warnings with QDoc's clang parser - exclude it from the documentation build. - Remove direct links from example documentation to individual example files; they no longer work. - Fix navigation for QML types; The main QML types pages did not list types for QtAudioEngiine. - Use \QtMinorVersion macro to make the documented import versions follow the minor Qt version. - Fix \since usage to be consistent throughout. - Fix linking issues for QML properties/methods - Minor language fixes Change-Id: I735cd13fa6dedd6bf06d6b6ef50ce2e0d69a545b Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-061-2/+2
|\| | | | | | | | | | | Change-Id: I5d8d370a4da0a155914cd0e07610a1dcbd737f67
| * | Fix some deprecation warningsv5.13.0-beta2Friedemann Kleint2019-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | tst_qvideoframe.cpp:736:68: warning: 'int QImage::byteCount() const' is deprecated: Use sizeInBytes [-Wdeprecated-declarations] videowidget.cpp:103:49: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] videowidget.cpp:111:62: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: If6ba7de74c695cb5405ef7d3f9c5be8f94e3e522 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Fix deprecation warnings about QVariant APIFriedemann Kleint2019-04-053-5/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | GStreamer: support video orientationAlexander Volkov2019-02-011-0/+4
| | | | | | | | | | Change-Id: I233c45824f517c185cb245d8a7d77cab8551fc51 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-4/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Icf8b9f73c50b16d6f5765040eb7bd918231df94a
| * WavFile example: drop needless includesRolf Eike Beer2019-01-171-3/+0
| | | | | | | | | | Change-Id: I26033a3d853dca8023fe4ec5f1eb7c53ef5d013f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * WavFile example: fix indentationRolf Eike Beer2019-01-171-1/+1
| | | | | | | | | | Change-Id: Ibc117caf24daef75cf2e71f04b058ffadd30c273 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Fix warnings about deprecated QPalette enumerations and functionsFriedemann Kleint2019-01-141-1/+1
|/ | | | | | | | | | videowidget.cpp:625:32: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:56:36: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:56:36: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:83:55: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: Ieb55a57c5672d3023a48461ec347fbb30210fd1e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Gstreamer: Fix camera example to apply video settingsVaL Doroshchuk2018-11-051-0/+3
| | | | | | | | | To apply custom video settings it requires to reload the camera. Task-number: QTBUG-51769 Task-number: QTBUG-69895 Change-Id: Ib01cbe8bb1d022a66c57b7f8fb9bd06ebb0393c8 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Move shared example folder to examples/multimedia/sharedFrederik Gladhorn2018-08-077-6/+6
| | | | | | | | | | | | 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>
* Doc: Add missing dots (qtmultimedia)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: Ieed8aba484c17aa56bb688fdcc9cafdb8e638fa2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QNX 7.0.0 audio management supportJames McDonnell2018-01-162-12/+41
| | | | | | | [ChangeLog][QNX] Added support for QNX 7.0.0 audio management. Change-Id: Ia9f1740577527126bf666627647084382e4d7ce9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-0617-140/+156
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * examples: use Qt5-style connects where possibleJochen Seemann2017-12-1916-140/+145
| | | | | | | | | | | | | | | | | | Additionally, remove obsolete CHECKED_CONNECT macro from the spectrum example. Change-Id: Id6fe01718679463c2b025d688c970583d64d60e9 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * winrt: Store output to cache locationMaurice Kalinowski2017-12-121-0/+11
| | | | | | | | | | | | | | | | | | By default sandboxing does not allow to store a file outside the package. Task-number: QTBUG-60904 Change-Id: I586616713315eadafd6bb24a8f8c12eb794557f6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Port away from QRegion::rects()Marc Mutz2017-12-041-1/+1
| | | | | | | | | | | | | | Use begin()/end() instead. Change-Id: Ifa17458190186b987533bd705717ddaec5fc94d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-2/+12
|\| | | | | | | Change-Id: Icaf645e271b21320c4cb6269178d9e722092a263
| * Fix outdated BSD license headerLiang Qi2017-11-161-2/+12
| | | | | | | | | | Change-Id: I5b952a41be87f250810419674f52486acad34e07 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Implement QCustomAudioRoleControl for QNXJames McDonnell2017-11-143-1/+14
| | | | | | | | | | Change-Id: I95202ffabbeae36dbb2f2fa43871e0bceed53cae Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-27118-354/+1394
|\| | | | | | | Change-Id: Ib509a8c90dd6c7229510a400612cc27a4957d015
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-27118-354/+1394
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-18104-313/+1353
| | | | | | | | | | | | | | | Change-Id: I386d30a54819bae016cb50cf5892a5ac380288f9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * Fix outdated FDL license headerKai Koehne2017-10-1814-42/+42
| | | | | | | | | | | | | | | Change-Id: I9cd7043058352ba2aeded74f86d863fca29bd37d Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-1931-1010/+842
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h Change-Id: Ic6e27742ef6d1af0532ad05902a1431ebd5f449d
| * | Modernize the Declarative Radio exampleVaL Doroshchuk2017-10-054-101/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added responsive UI. Added Button type. Task-number: QTBUG-60627 Change-Id: I69d10ad735706538b31c7bf1810e90d5a884a382 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Modernize the Video Widget exampleVaL Doroshchuk2017-09-282-49/+42
| | | | | | | | | | | | | | | | | | | | | | | | Changed initialization style, 0 -> nullptr, made some cleanup. Task-number: QTBUG-60627 Change-Id: I3443b4ed4ea1d118aadb777df07921505dd29844 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Modernize the Camera exampleVaL Doroshchuk2017-09-282-89/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changed style of members. Applied QScopedPointer. Task-number: QTBUG-60627 Change-Id: Id36f3f9d268956471c606293fb651d6aa9a4dec7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Modernize the Audio Recorder exampleVaL Doroshchuk2017-09-285-75/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Foreach to for. Changed initialization style. Renamed QAudioLevel -> AudiLevel. Changed connection signal/slot style. Task-number: QTBUG-60627 Change-Id: I3538433680086a2c4ee52ee22a5180c6d824b897 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Modernize the Audio Output exampleVaL Doroshchuk2017-09-282-165/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed initialization style. Recoded toggleMode. Removed unneeded defines, function members. Changed signal/slot connection style. Changed foreach to c++11 style. Fixed bug with wrong duration seconds. Task-number: QTBUG-60627 Change-Id: Ib62f7979f2a32d629482026e0d954612b2665d66 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Modernize the Audio Input exampleVaL Doroshchuk2017-09-282-133/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed unneeded defines. Removed unneeded members. Removed using QScopedPointer where is not needed. Changed some member functions to lambdas in signal/slot. Changed initialization style. Recoded toggleMode. Task-number: QTBUG-60627 Change-Id: Iaf6bb297bc0b87509fcda956bfd082e80a3226c4 Reviewed-by: Christian Stromme <christian.stromme@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>
| * | Modernize the Player exampleVaL Doroshchuk2017-09-2810-294/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed memory leak. Renamed members, avoided passing args by copy. Changed the style of member initialization. Changed 0 to nullptr. Changed to new signal/slot style if possible. Removed Q_WS_SIMULATOR ifdef. Changed signal/slot connection style. Task-number: QTBUG-60627 Change-Id: I85bd6e56fe87f4e17f3c9964d6d1fdcb8202c519 Reviewed-by: Christian Stromme <christian.stromme@qt.io>