summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qgraphicsvideoitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix undocumented members warning in the widget APIVenugopal Shivashankar2022-10-071-0/+18
| | | | | | | Pick-to: 6.4 Change-Id: Ibcf3c3385ba00a2bd4f1c89811906be6437dc56f Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-241-38/+2
| | | | | | | | | | | 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-6/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* API fix: Give QVideoSink a videoFrame propertyLars Knoll2021-09-071-1/+1
| | | | | | | | | | | | Gives a more consistent API with a videoFrameChanged() signal instead of a newVideoFrame() signal. Add setters and getters for videoFrame and subtitleText. Pick-to: 6.2 Change-Id: Ib6bb27b76cbf195dcc83eb00bca080ffd64ef538 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Samuel Mira <samuel.mira@qt.io>
* Clean up the QVideoSink APILars Knoll2021-08-251-7/+7
| | | | | | | | | | | | | | | | | The next couple of commits will simplify how we handle HW accelerated rendering by also going through the RHI code path for QVideoWidget. This implies that we can remove quite a few properties from QVideoSink, as those were only required for the old windowed code path. This does for the moment disable all HW acceleration on QVideoWidget. Support for that will be re-added in follow-up changes. Pick-to: 6.2 Change-Id: I1474f44ed7468eb263fbf4de75f75f9af16b7773 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Move the QVideoSink::paint() method to QVideoFrameLars Knoll2021-08-251-3/+2
| | | | | | | | | | | This makes a lot more sense as the videoframe can now paint itself. It also allows us to removes a lot of API from QVideoSink that never quite fit in there. Pick-to: 6.2 Change-Id: I70f32416a0e3850c2a9f8ee3853f38b06031905f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix part of the tst_qaudioinput failuresLars Knoll2021-04-301-4/+0
| | | | | | Change-Id: I1ba863ef17648e0ce36dfaee4d06b358f2c57705 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix test failures in tst_qvideowidget and tst_qgraphicsvideoitemLars Knoll2021-04-281-9/+7
| | | | | | | | | This passes now, but might require some more massaging to get correct display rects for the widget case. Change-Id: I4673240bb1afacfe714580e586e293c09f690d11 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QVideoSurfaceFormat to QVideoFrameFormatLars Knoll2021-04-141-1/+1
| | | | | | | | | The class is used exclusively together with video frames to describe their format, so the name should reflect that. Change-Id: I10bec7a0556b22c69ac790a99282e1376ce4af97 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation errorsShawn Rutledge2021-04-061-0/+1
| | | | | | | | | | - unused arguments - comparison always true - functions with undefined return values - missing includes Change-Id: I6caa92de2c08ed597c42290dba1f22ec709ea6ca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert QGraphicsVideoItem to use QVideoSinkLars Knoll2021-04-061-68/+28
| | | | | | Change-Id: Id9af7457f590ed6387c36473e73c244ef44f8f8a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Move QPainterVideoSurface into QtMultimediaLars Knoll2021-03-231-1/+1
| | | | | | | | We'll need the code there for the new QVideoSink Change-Id: Iae4681770b2d64e1c0f1e96db2076dd4ec2315bf Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some smaller cleanupsLars Knoll2021-03-161-1/+0
| | | | | | Change-Id: I44ad31af07b122ee69bb3a7682550f7930e0d366 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove manual metatype declarations and registrationsLars Knoll2021-03-021-2/+0
| | | | | | | | Those aren't needed in Qt 6 anymore. Change-Id: I1d19a0dd9c42cfa3fe6d88a56accbe3af2efdf47 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QVideoRendererControlLars Knoll2021-03-021-1/+1
| | | | | | | | | | It's a pure implementation detail in the backends now (and can in cases even get removed there). No need for an interface. Change-Id: Ib61cebe80d0369424d4ee681992e4abc80c11a14 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* And finally kill QMediaServiceLars Knoll2021-02-171-19/+0
| | | | | | | | | This removes the past piece of the old service architecture from Qt Multimedia. Change-Id: I607f82a546b2a2e29024b987fed3ba6e3645ae48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-171-7/+4
| | | | | | | | Those aren't used anymore, get rid of them. Change-Id: I5a17f18a3c87c2c13a9009b1f99ef9e708f7636a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QMediaSink inheritance from QGraphicsVideoItemLars Knoll2021-02-171-35/+0
| | | | | | | | It's not needed/used anymore. Change-Id: I971330224d96460654392334f2a571c51533d2e4 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rework how to set a video output surfaceLars Knoll2021-02-171-40/+1
| | | | | | | | | | | | | | | | | | | | Setting a video output should not require QMediaService anymore. Reverse the logic, by making QAbstractVideoSurface the primary interface. Use runtime method lookup to get a pointer to the video surface from QVideoWidget/QGraphicsVideoItem. QAbstractVideoSurface is now the primary interface for setting up a video output. We will need to add some API there to allow for windows/fullscreen rendering. With this change, QVideoRendererControl/QVideoWindowControl can also be retired as an abstraction layer in the longer term. Change-Id: Iedff18c6b95fedc7cb914075a8c84081080deab1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QMediaObject to QMediaSourceLars Knoll2021-01-221-16/+16
| | | | | | | | That actually describes what those classes are. Change-Id: I9ce01707bb260ff6452359e211f2c22b5740e61b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaControlLars Knoll2021-01-211-1/+1
| | | | | | | | | | The class was serving no purpose that QObject doesn't offer, so remove that layer and use QObject as the base class for those controls. Change-Id: Icd434fabe88cbdba5fa54eafe6ba97ac08be61f3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Modernize code baseLars Knoll2021-01-211-21/+14
| | | | | | | | | 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>
* 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>
* Expose video surfaces in rendering componentsVaL Doroshchuk2020-01-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Include moc files after QT_END_NAMESPACEVal Doroshchuk2019-09-091-1/+2
| | | | | | Fixes: QTBUG-76574 Change-Id: I69ef47bbd01967c3d7a0c5d1554fcdd29619ebfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* QGraphicsVideoItem: Always use generic painter when no gl paint engineVaL Doroshchuk2019-05-131-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If eglfs is used, then there is valid current gl context and it has OpenGL shader programs (QGLShaderProgram::hasOpenGLShaderPrograms). This gl context makes QPainterVideoSurface to use QVideoSurfaceGlslPainter instead of QVideoSurfaceGenericPainter. QOpenGLCompositorBackingStore uses QImage as a QPaintDevice. In this case QPainter::beginNativePainting does nothing because of QRasterPaintEngine. Since QVideoSurfaceGlslPainter is supposed to work with a gl paint engine and not with a raster one, this prevents rendering any video content. To work this around, view->setViewport(new QOpenGLWidget) could be used, where QOpenGL2PaintEngineEx will be taken into account. If platform was not eglfs, QGLContext::currentContext() could be unavailable which made QPainterVideoSurface to use QVideoSurfaceGenericPainter and the video was rendered correctly. QVideoSurfaceGenericPainter should be used when the paint engine is not gl based. Task-number: QTBUG-57836 Change-Id: Id4839facddb2494ec5abf729ea80068eb5e2af1d Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix typosJarek Kobus2018-02-141-1/+1
| | | | | Change-Id: I05983bca18d41ca6440e5e0b04102a8ac8e42136 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Remove leftover OpenGl ES 1 related macrosLars Knoll2016-11-161-2/+2
| | | | | | Change-Id: I9b1e31e3d1bcfbffc448551be5654f8818baf91a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> 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>
* Update copyright headersAntti Kokko2015-02-121-7/+7
| | | | | | | | | 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>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Doc: Fixed random QDoc warningsVenugopal Shivashankar2013-01-151-1/+1
| | | | | | | | | | | | | - Fixed \snippet paths - Minor language edits - Removed unnecessary multiple page commands in a single comment block. For example, \fn and \qmlsignal in a single comment block is not allowed. Such instances must be documented in separate comment blocks. Change-Id: I65f4518499e2600c4e1807356d4116c575e48c19 Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id77334cfb15de096941c88e32d04ca07b4eb4709 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-1/+1
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: Iec1c616e0d9a915a31a661916805916e19495dc9 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Documentation tweaks.Michael Goddard2012-02-061-1/+1
| | | | | | | | | Mostly move widgets classes into the QtMultimediaWidgets module, but also mark a few mostly internal playlist classes as \internal. A few other tweaks. Change-Id: If0e376410bf2187cafb24f583108c6beb7b910a9 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I20e5215108c6ebd5f8474fed5c3665118e4791e6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie8cd560b6d9a2c6e552b6be1ad8bc96c80a6535c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove antiquated \since lines in docs.Michael Goddard2012-01-161-12/+0
| | | | | | | They aren't useful in the case of QtMultimedia{Kit} Change-Id: If1b0b6625763c85907fb05beb9c440046472ddef Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-121-1/+1
| | | | | | | Update headers from before 2011 that were missed in the previous commit. Change-Id: Ib0fd91a39ffc57117fe01280e34519c3f914fac0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Declare more metatypes and debug operators.Michael Goddard2011-11-021-2/+0
| | | | | | | | | | | Nearly all of the multimedia metatypes used in the auto tests are now declared properly, and a large number of the types have debug operators as well. Removed the superfluous decls as well. Change-Id: I42cfe37562db0c71d9811b4577fc326a3326ccc9 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Multimedia: Compile on Windows.Friedemann Kleint2011-10-121-3/+2
| | | | | | | | | | | MSVC is more strict about #include <> and #include "". Reviewed-by: Ling Hu <ling.hu@nokia.com> Change-Id: I8973d7b2717d892407ad93785f92a64b05bdb6b5 Reviewed-on: http://codereview.qt-project.org/6134 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename QtMultimediaKit to QtMultimedia.Michael Goddard2011-10-071-0/+432
There are a few legacy bits left in place so it passes CI, and then qt5.git etc can be updated. Change-Id: I6b082e50e6958c72fdabc2974992e16d90dafa3a Reviewed-on: http://codereview.qt-project.org/5368 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>