summaryrefslogtreecommitdiff
path: root/src/imports/multimedia/multimedia.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Update to latest qml CMake APIAlexandru Croitor2021-06-071-78/+0
| | | | | | Task-number: QTBUG-91621 Change-Id: I0a096697f692378f8be7b942d06ee231c399319d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the remaining items from the QML plugin into multimediaquickLars Knoll2021-04-191-17/+4
| | | | | | | | | | | Move the remaining code and docs from the QML plugin into libQtMultimediaQuick, so that all QML related code is in one place. Rename class names and files from qdeclarative* to qquick*. Change-Id: I159b9ddc6bfc113da62b5906596d82fac168ed84 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert the remaining QML APIs related to captureLars Knoll2021-04-191-30/+1
| | | | | | | | | Expose the C++ classes to QML instead of having all those wrapper classes. Change-Id: Id151a386a8f13da5c0eda3fa06a6e3b7032e0cb6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* New QML API for image capturingLars Knoll2021-04-191-4/+3
| | | | | | | | | | | | | Adjust the QML API for image capturing to fit with the new handling of capture sessions. Simplify some things and avoid using a wrapper class to the largest degree by inheriting from QCameraImageCapture. Remove the old image capturing code. Change-Id: Ic99116f5202f2d0438fe0d048be2faa6687f0e4b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Start using the new type registration scheme for QML typesLars Knoll2021-04-161-16/+5
| | | | | | | | | For now, this is only partially used, mainly for the C++ types we can expose directly. Some more cleanups in the qml plugin are required. Change-Id: I05085d3622dca1b3152895e1af035fbe3549b23d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a couple of Q_PROPERTY macrosLars Knoll2021-04-161-0/+1
| | | | | | | | And export ImageCapture for Qt Quick. Change-Id: Ie9385a4a4a4212d06ffadf242a0e047d95b76226 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Register the C++ based API under new names to be able to test itLars Knoll2021-04-161-0/+9
| | | | | | | | | | | The C++ classes will get exposed directly and replace the wrapper classes that got used in Qt 5.x. Expose them under their name prefixed with 'N' for now to test them. They will eventually replace the old implementation. Change-Id: Ia79ee788552a2253b6a310a1ff57d004ecf00adc Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Use QCameraFocus directly in QMLLars Knoll2021-04-161-2/+1
| | | | | | | | | | | And get rid of QDeclarativeCameraFocus. At the same time move the zoom methods into the CameraFocus object to be consistent with our C++ API. Change-Id: Ic20027dd320453704d6a5ab3c57bd21e55b4fa90 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QDeclarativeCameraImageProcessingLars Knoll2021-04-161-2/+1
| | | | | | | | | Expose QCameraImageProcessing directly to QML. The API is the same. Change-Id: I6f0e3d7f7eef7e1d593152edae5df98d260c6f66 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Kill all versioned importsLars Knoll2021-04-161-67/+17
| | | | | | | | And don't register the items with a version neither. Change-Id: I514480fe7570cba468404bc891f238991690f499 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Expose QMediaMetaData as a value type to QMLLars Knoll2021-04-161-3/+3
| | | | | | | | And get rid of the QML wrapper class. Change-Id: Idd024bb9582f7d27c943ad5e065914337216bdd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QDeclarativeAudioLars Knoll2021-04-161-10/+10
| | | | | | | | | | The class was a wrapper class for QMediaPlayer used for the MediaPlayer and Audio QML types. Remove it, as QMediaPlayer can be exposed directly. Change-Id: I46a13741ceb170db57c8bb54b7a922e483eab537 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove QAbstractVideoFilterLars Knoll2021-04-141-2/+0
| | | | | | | | | | | | | | The API covers a relatively rare use case, and is far from ideal, as it doesn't cooperate very well with HW accerlerated rendering. Since QVideoFrame and the QML VideoOutput item offer the option to get a texture for the frame, it's probably better to use that as the basis for further processing. Change-Id: I89deb915f660312fb3a83b066a5371f5454346da Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up most QAbstractVideoSurface usagesLars Knoll2021-04-061-2/+0
| | | | | | | | | | The class is scheduled to be removed, once all it's usages are gone. QVideoSink is the replacement going forward. Change-Id: Idc0a4133496839bf9f95aa9bcf7d6d37cacd549b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaService for the capture interfaceLars Knoll2021-02-171-1/+2
| | | | | | Change-Id: I69a3d379bd2f1adbc4d583fd8eadcd3eb624a3af Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QCameraViewFinderSettingsLars Knoll2021-01-291-3/+0
| | | | | | | | | | The outputs should control the camera settings that are required. Before one could define resolutions and framerates in several places, not it's the requested outputs that define it. Change-Id: Iab76abac84480e6200b9fc5b058fc2a02b0a8ce0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modernize code baseLars Knoll2021-01-211-1/+1
| | | | | | | | | Run clang-tidy over the code base with some code modernization options. Change-Id: I9e74d1225bce333e74224e3b92c02c7e9884d8f5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Replace calls to removed qmlRegisterType overloadsMarcel Krems2020-08-311-3/+3
| | | | | Change-Id: I3cb5a7839dc1648efdf1f4a9a317d7c52232495a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-281-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I5466906d759a7cc046d77a21e2c647a4b938d070 Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* Remove Radio supportVaL Doroshchuk2020-06-101-4/+0
| | | | | | Fixes: QTBUG-84592 Change-Id: I3b9e51689fd542c35cb57cf6c51a141aec3034df Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-281-0/+1
|\ | | | | | | Change-Id: I42bfc7b2a960281c350c2873db314a190f003f65
| * Introduce MediaPlayer::videoOutput propertyVaL Doroshchuk2020-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property holds the target video output, and allows to render video to multiple items. MediaPlayer { videoOutput: [videoOutput1, 1, "ignored", videoOutput2.videoSurface] } Incorrect inputs are ignored. The property also accepts single either QAbstractVideoSurface or QDeclarativeVideoOutput objects. Task-number: QTBUG-32939 Change-Id: I41fc557dcac60be6d70b3889036ff4ae75734cc0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-211-0/+5
|\ \ | |/ | | | | | | | | | | Conflicts: src/imports/multimedia/multimedia.cpp Change-Id: I5b395bce97f2d2edc45294db046929cb9d9cd7b9
| * Expose video surfaces in rendering componentsVaL Doroshchuk2020-01-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Currently QVideoWidget, QGraphicsVideoItem and QML Video Output tightly depend on QMediaPlayer, QMediaService etc. Since QMediaService is deprecated and will be removed from Qt6, its usage must be removed from rendering components. * Also it is a part of a task to make all components independent, e.g. without dependencies to another components, like the media player, or video producer. These video consumer components should be reusable without QMediaPlayer too, which today is not possible, and should have responsibility for a single part of the functionality. * It is a part of a task to allow users to decide how to render video, using either video surface or native windows. Introducing QVideoWidget::videoSurface() QGraphicsVideoItem::videoSurface() QDeclarativeVideoOutput::videoSurface() that create a surface, if necessary, and returns the underlying video surface which provides a possibility to render video frames without knowledge of any services and controls. Can be used like: QMediaPlayer->setVideoOutput(QVideoWidget->videoSurface()); or QMediaPlayer->setVideoOutput(QGraphicsVideoItem->videoSurface()); This allows QMediaPlayer to get video frames from a backend, without using QVideoWidget/QGraphicsVideoItem, and to present these frames to provided surface. Moreover, now it is possible to render video frames without QMediaPlayer: QVideoSurfaceFormat format(img.size(), QVideoFrame::Format_ARGB32); videoWidget->videoSurface()->start(format); videoWidget->videoSurface()->present(img); [ChangeLog] Introduced videoSurface property to QVideoWidget, QGraphicsVideoItem and QDeclarativeVideoOutput. Task-number: QTBUG-80431 Change-Id: I49641750537160832e29c297279e72b8288e974c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Fix Qt6 buildAlexandru Croitor2019-08-071-2/+3
|/ | | | | | | | | | | Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: I74710466b3ed459ee3b4c99ab1fbf5c9eb320d5d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a revision of QML VideoOutput flushMode property to 5.13VaL Doroshchuk2019-02-251-0/+3
| | | | | Change-Id: Ie7982232af45fd09a46854c96d7c7d6672857a97 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix deprecation warningsv5.13.0-alpha1Friedemann Kleint2019-02-051-14/+14
| | | | | | | | | | | | | | | | Replace trUtf8() by tr() and implement QAbstractItemModel::roleNames(), fixing: multimedia.cpp:76:5: note: in expansion of macro ‘Q_OBJECT’ multimedia.cpp:143:77: warning: ‘static QString QMultimediaDeclarativeModule::trUtf8(const char*, const char*, int)’ is deprecated [-Wdeprecated-declarations] from multimedia.cpp:40: .... qdeclarativecamerafocus.cpp:403:23: warning: ‘void QAbstractItemModel::setRoleNames(const QHash<int, QByteArray>&)’ is deprecated [-Wdeprecated-declarations] setRoleNames(roles); Change-Id: I2648551a1b2774c45101ab1cad9e0ea3ab79ccbc Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Automatically register the latest import versionKai Koehne2018-09-061-0/+3
| | | | | | | | | | | | | This follows what was done in d28c9f6a for Qt Quick Controls 2. The latest import version (e.g. 2.11 in Qt 5.11) will automatically be registered whenever the Qt version is bumped. This avoids needing to wait until a new type is added (or a new revision is added to an existing type) before being able to use the newest Qt Quick version. Change-Id: Ib14052fdf2a4cfa7b71f739fe00ce9a95dadb0a0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove the code to manually initialize resources in static buildsSimon Hausmann2018-04-271-8/+1
| | | | | | | | | After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is not needed anymore. Instead the resource system injects the plugin entry point with a reference to all resources. Change-Id: Idd5115528d9eadce89e4308ed43824c53154fe22 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* add missing capability properties to CameraImageProcessingJochen Seemann2018-02-011-0/+2
| | | | | | Task-number: QTBUG-45336 Change-Id: Iac47212b0a73b275795bd3051a2141f8089b7dc5 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* add property supportedExposureModes to CameraExposureJochen Seemann2018-02-011-0/+2
| | | | | | Task-number: QTBUG-45336 Change-Id: I9b4f3271f7f56b88f2484f56dd1d37e2e97f5118 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* add supportedFocusModes and supportedFocusPointModesJochen Seemann2018-02-011-0/+2
| | | | | | | | | | This patch adds two properties to QML type CameraFocus, to gain feature parity with the C++ interface of QCameraFocus. Additionally, it deprecates the older, comparable functions. Task-number: QTBUG-45336 Change-Id: Iffc5c805409ed605dba5d4bc3fa2f05122b58b9e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Propagate customAudioRole into the QML classesJames McDonnell2017-10-231-0/+4
| | | | | | | | | | | | Propagate customAudioRole into the Audio, MediaPlayer and Video classes. [ChangeLog][Audio/Video/MediaPlayer] Added customAudioRole string property to enable use of audio roles beyond those available via the audioRole enum property. Change-Id: If3c4ec20f014653d31d1fa0d1ad925084f446478 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add missing override and remove redundant virtualAlexander Volkov2016-12-121-2/+2
| | | | | Change-Id: Ifd439abf21877adff57080489324bea729ee5279 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-211-1/+4
|\ | | | | | | | | | | | | Conflicts: src/imports/multimedia/multimedia.cpp Change-Id: I38899391ec8d2fcec6f2d46514286759f7a27629
| * Register 5.8 version for the multimedia QML moduleYoann Lopes2016-09-151-0/+3
| | | | | | | | | | | | | | | | There isn't any new API in 5.8, we need to re-register an existing type to make that version number available. Change-Id: I061dc53e9570eefc1cbdcb9d15f557904b5d275f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Improve robustness of QML plugin loadingv5.8.0-alpha1Simon Hausmann2016-08-261-1/+1
| | | | | | | | | | | | | | | | Use a variable that expands to the latest plugin version instead of hard-coding the string. Change-Id: I3bdbee161e4a3b59127dc4f00a0c9ce9386b67c2 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | adding property CameraFlash::supportedModesJochen Seemann2016-09-091-0/+2
| | | | | | | | | | | | | | | | | | This property contains a list of the supported flash modes and is the QML version of QCameraExposure::isFlashModeSupported(FlashMode). Task-number: QTBUG-45323 Change-Id: I1eb6fcbb126759458c5290e71fa576053b62f05d Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Add notifyInterval for MediaPlayer QML APIJoni Poikelin2016-09-071-0/+2
| | | | | | | | | | | | | | | | Expose notifyInterval as a property from QMediaPlayer. Task-number: QTBUG-44961 Change-Id: Ia6c671eb68754e5c9a60032289bd821884824c78 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | adding property CameraCapture::supportedResolutionsJochen Seemann2016-08-311-0/+4
|/ | | | | | | | | | | This change adds the new property supportedResolutions to expose the same functionality to QML as QCameraImageCapture::supportedResolutions provides for C++. Exposing as QML property allows us to easily display the resolutions in list-based elements like ListView. Task-number: QTBUG-45289 Change-Id: Ica7206ec1daa36298a761d659d1c0b05d13562ec Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Mark CameraImageProcessing's new brightness property with revision 2Alex Blasche2016-04-291-0/+2
| | | | | | | | It was added in Qt 5.7 and the QML version should be adjusted accordingly. Change-Id: I227a63c240edbe8880612076899dc3db47dc47d0 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Add new QDeclarativePlayList 5.7 items with new QML revisionAlex Blasche2016-04-291-0/+3
| | | | | Change-Id: I1f332230e34e04a304cbe6d9b6d4a4dceb70095b Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Updated license headersAntti Kokko2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Enable using the module in a statically built applicationAndy Shaw2016-01-111-0/+8
| | | | | | Change-Id: Iafdb4359f051fcd20178f3c5f42f2cff2bf8c359 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-3/+3
|\ | | | | | | Change-Id: I1373622a6d1fd0e2d35df2da79860a373056387f
| * Fixed revisions of camera-related meta objects.Marco Benelli2015-09-151-3/+3
| | | | | | | | | | Change-Id: I91fe90122d53ce12322cecac8282ef9622869b71 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Fix QML revisions registration for 5.6.Yoann Lopes2015-09-151-1/+2
| | | | | | | | | | | | | | | | And update plugins.qmltypes file. Change-Id: I9b3cbeda4c8a0ce88a88f5a16fae6834dc8363d7 Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Added new playlist QML type.Loïc Molinari2015-08-101-0/+6
|/ | | | | Change-Id: I0788cc9719f427457ad0be9c9a5bfda00451a0c4 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-1/+7
|\ | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * Make the QtMultimedia singleton type a QObject.Yoann Lopes2015-04-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was a QJSValue for the sake of being as lightweight as possible and because we don't actually need any of the QObject features for that type in its current state. However, this implies that type information is not available at runtime. This is a problem for qmlplugindump which currently crashes because it always expects every QML type to have an associated meta object. We can safely make that type a QObject since it doesn't affect source compatibility in any way. This type was bound to become a QObject at some point anyway. Task-number: QTBUG-44299 Change-Id: I2d9b874f15ffc94ed95ef74fadc3b1fd193fe1ef Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>