summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qvideowidget.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Deprecate qtmultimediawidgetdefs.hKai Köhne2021-11-081-1/+1
| | | | | | | | | Rather use the more common qtmultimediawidgetsglobal.h pattern. This also fixes a syncqt warning that the header doesn't contain QT_BEGIN_NAMESPACE... Change-Id: If361c93561adce06fbe61b00bc9acee356cf477d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Implement HW accelerated rendering for QVideoWidget using QVideoWindowLars Knoll2021-08-261-5/+0
| | | | | | | | | | Refactor QVideoWidget to implement HW accelerated rendering by simply embedding a QVideoWindow as a child and making it transparent for input, so the input events continue to go to the QVideoWidget. Pick-to: 6.2 Change-Id: I0dd02ebb784a1d6a51e56aa6b629df0b947292ac Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Improve windowed rendering with gstreamerLars Knoll2021-08-041-1/+0
| | | | | | | | | | | | | | | | | Correctly respect the aspectRatioMode when calculating the render rectangle. This works fine on xvimagesink. The vaapisink doesn't fully respect it (at least with current AMD drivers), but that is a bug in the vaapi implementation. Set the fullscreen flag on the sink when going fullscreen, so that it can apply any possible optimizations. Clean up the code dealing with brightness correction etc, as that is currently not used or supported. Change-Id: I8e4d005901fa1ee59892d647f9359d8edb96664e Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove brightness and related properties from QVideoSink and QVideoWidgetLars Knoll2021-06-181-17/+0
| | | | | | | | We currently do not support those on all platforms and most native APIs do not offer those kind of controls neither anymore. Change-Id: Ifa58d206796fba3b10dfa111be1c6f79a996539a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up QVideoSink and it's platform implementationLars Knoll2021-04-161-16/+16
| | | | | | | | | | | | * Normalize ranges of brightness and friends to [-1, 1] and use floating point numbers. * Remove getters for values from the platform API, rather store them in the frontend. This simplifies the work that needs to be done on the backend side. Change-Id: I8d63dacaa6b2873b33e17fcd7831e41173109a7e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Clean up most QAbstractVideoSurface usagesLars Knoll2021-04-061-1/+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>
* Rename QVideoWindowControl to QPlatformVideoSinkLars Knoll2021-04-061-10/+2
| | | | | | | | | | | | | | | | This class can nicely serve as the basis class for the platform specific new video sink API. For now it will support windowed rendering and the non windowed mode will get folded into this class in follow-up commits. Clean up the QVideoWidget code and always use QVideoSink there to make the transition easier to handle. This implies that QVideoWidget will right now only work in windowed mode. Change-Id: I6db4509ceaa142001ffd59b60406aa98c71f5fc0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get windowed playback working againLars Knoll2021-04-061-1/+5
| | | | | | | | | | | And start moving over to the new QVideoSink API. Fun side effect: HW accelerated video decoding does work with this change on Linux. Change-Id: Ic88d13b4fc7028b300349f9bf7ed1a7b3e08d37c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-171-4/+0
| | | | | | | | 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 QVideoWidgetLars Knoll2021-02-171-8/+1
| | | | | | | | | | And remove some now unused code. We've lost the ability to render to native window handles directly, but that should be handled through QAbstractVideoSurface API additions. Change-Id: I644a38ea045219e715dd77346bd4d94529df9b07 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-1/+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>
* Clean up dependencies between multimedia and multimediawidgetsLars Knoll2021-01-221-0/+1
| | | | | | | | | | | Remove the reverse dependency from Qt Multimedia to Qt Multimedia Widgets that we have had throughout Qt 5 by adding a virtual getter for the QObject behind a QMediaSink to the QMediaSink interface. Change-Id: Ia22a4cf761722332f0995a79861a61b9e2296eee Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QMediaObject to QMediaSourceLars Knoll2021-01-221-4/+4
| | | | | | | | 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>
* Rename QMediaBindableInterface to QMediaSinkLars Knoll2021-01-221-3/+3
| | | | | | | | | All objects implementing the interface are in fact sinks for media. Change-Id: I065890ec1407caa3faf84f2df4bee987ffe4250d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove code for < QT_VERSION_CHECK(6, 0, 0)VaL Doroshchuk2020-08-031-4/+0
| | | | | Change-Id: Ia64872eef299b2583a21ea40403cb0d281baf3e6 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make video surfaces constantVaL Doroshchuk2020-01-301-1/+1
| | | | | | | | | | | | | Video surface property for QVideoWidget, QGprahicsVideoItem and QDeclarativeVideoOutput should be CONSTANT and kept the same value while the object is alive. Note, currently this property can be suddenly changed, when videoSurface is mixed/used together with source property. To keep the patch simple, this will be fixed in next commits. Change-Id: I80046524a70bcb70bb45e7f1bbae74bff1b3b0f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Expose video surfaces in rendering componentsVaL Doroshchuk2020-01-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 type of the out parameter "result" of the native event filtersFriedemann Kleint2019-03-251-0/+4
| | | | | | | | Task-number: QTBUG-72968 Change-Id: I31da3bd3e8a775243b94e02e3659e2d00e46b9b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Windows: Repaint QVideoWidget when WM_PAINT or WM_ERASEBKGND receivedVal Doroshchuk2018-11-291-0/+3
| | | | | | | | | | | | | | | | Since updates are disabled, and no paint events will be sent to QVideoWidget, need to somehow repaint the video window. When BeginPaint is called outside of the expose event, the window might not be refreshed. So moved calling the repainting within the expose event. Also added repainting when the display rect is changed to immediate refreshing. Task-number: QTBUG-71326 Change-Id: I7c29b3f8ad35e33590c7b138a5141546ce3c1a42 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Fix blank QVideoWidget when it is pausedVal Doroshchuk2018-03-221-4/+0
| | | | | | | | | | | | | If playback is paused latest video frame is shown. If after that the window is deactivated (unfocused or hidden) the picture is cleared. And just empty area is shown. Provided following fixes: 1. Prevented clearing the painted video picture when the window is unfocused. 2. Repainted latest video frame again when the window gets back from hidden state to shown. Task-number: QTBUG-65780 Change-Id: I62b3c6e25133a7d08a5060a5ab9f6b35d927fbd4 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-1/+1
| | | | | Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add missing override and remove redundant virtualAlexander Volkov2016-12-121-10/+10
| | | | | Change-Id: Ifd439abf21877adff57080489324bea729ee5279 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Cleaned up placement of * and & in parameters as a drive-by. Added explicit where it was missing as a drive-by. This is not a source-incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Task-number: QTBUG-45291 Change-Id: If81ed0c71393aee21d347f5ade4bf3fcc07cd82f Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | 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>
* whitespace fixesOswald Buddenhagen2014-01-301-2/+2
| | | | | | | | remove trailing spaces & expand tabs. Change-Id: I05ef110abed90f13b47752760ffb4567a11a6a5e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-191-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/doc/qtmultimedia.qdocconf src/plugins/blackberry/mediaplayer/bbmetadata.cpp src/plugins/blackberry/mediaplayer/bbmetadata.h tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp Change-Id: I447c297ea15a94d1d2feb0fb5f9edac8c5d4505a
| * 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>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
|/ | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id95d10f5d9c146d9eb496119af6a8b8501ffcb17 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix syncqt-warnings.Friedemann Kleint2012-11-191-2/+2
| | | | | | | Use include with module name for the multimedia-classes. Change-Id: I8da1a4015a162959b604cd859aee139e246e3f6c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove stale QT_MODULE() usage casesSergio Ahumada2012-10-251-2/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: Id24056c0afd013904b1e098dc49e502038fd77a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.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 "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>
* 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>
* Multimedia: Compile on Windows.Friedemann Kleint2011-10-121-1/+1
| | | | | | | | | | | 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/+139
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>