summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the texture uploading code into Qt MultimediaLars Knoll2021-04-071-203/+0
| | | | | | | | | | Qt Multimedia has now some generic helper functions to upload the video data into textures. This way, we can greatly simplify the rendering code in qtmultimediaquicktools. Change-Id: I5b0e3eb96cbcf79fe5e9757697f11b0183132b17 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the infra in QVideoSurfaceFormat to get shaders and uniformsLars Knoll2021-04-071-14/+12
| | | | | | | | | | frame mapping is still done in qtmultimediaquicktools, but once that's moved as well, we can radically simplify the rendering code there. Change-Id: Ia56c8b62c5726f1bfea0b0c4c46a81e103141e9e Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the shaders from the quick tools into QtMultimediaLars Knoll2021-04-071-2/+2
| | | | | | | | | | | | | The shader layout is pretty generic, and QVideoSurfaceFormat can give us both the shaders and uniform data that we need to render the video. All the user needs to do then is to provide geometry with a 2D texture coordinate to render the video onto any surface. Change-Id: I95006eaf4a6f039006b8a5da0f53143da03e1ecb Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Smaller API cleanups in QVideoFrameLars Knoll2021-04-061-1/+1
| | | | | | | | | | | | Get rid of the buffer method. It's not used, and QAbstractVideoBuffer is private anyway. Use map() to access the data. Rename image() to toImage() to make it explicit that we're doing a conversion here. Change-Id: Ie2735bc1a5131c09098fa80c9df7bf5b165b557c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormatLars Knoll2021-04-061-12/+12
| | | | | | Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove the handle type from QVideoSurfaceFormatLars Knoll2021-04-061-1/+1
| | | | | | | | | This is a property of the individual QVideoFrame, and doesn't belong here. Change-Id: I85f180ff46023f6a48ef856a356d9c45c3f6be1b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Minor fix in the QML video node codeLars Knoll2021-04-061-1/+3
| | | | | | | | Also accept ARGB32_Premultiplied as a surface format. Change-Id: I23bdba32d19b4cd4be38f57c6a2349b7c6a9109a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Move HandleType and MapMode from QAbstractVideoBuffer to QVideoFrameLars Knoll2021-03-161-3/+3
| | | | | | | | | | QAbstractVideoBuffer is a class that is only required inside our implementation, so we can make it private. This change prepares for it. Change-Id: I4ba4542c1eab742f2fc93231e2e5063dbc5d5e94 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modernize code baseLars Knoll2021-03-021-3/+1
| | | | | | | | | | | 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>
* Modernize code baseLars Knoll2021-01-211-3/+3
| | | | | | | | | 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>
* Quick: Always create sg textures in ctor()VaL Doroshchuk2020-08-301-2/+1
| | | | | | | Since compare() can be called before updateUniformData() Change-Id: I7a1e0a08926cbf6d5629468b8bf64dcd7602b399 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaVaL Doroshchuk2020-06-301-1/+1
| | | | | Change-Id: I463d3a1541cee1fcf4a6b6d1e2e1eac85fbfc682 Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* RHI: Remove gl code from video nodesVaL Doroshchuk2020-06-041-184/+16
| | | | | | | | Now QSGMaterialShader handles rhi textures too. Task-number: QTBUG-78678 Change-Id: I410185c80bd104741fd5b52deeb87eb97531410a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick: Add support of RHI for video framesVaL Doroshchuk2020-05-291-0/+78
| | | | | | | | Added RHI shaders for RGB*, YUV* and opengl texture video frames. Task-number: QTBUG-78678 Change-Id: I045d6a806fea059a80b8e5d9817b6997af8d0f41 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update qtbase dependencyFriedemann Kleint2020-03-251-1/+1
| | | | | | | | | - Adapt to QOpenGLWidgets split - Use new Q_MOC_INCLUDE directive where required - Fix QtConcurrent usage Change-Id: I9de650ae4fbbd397ef4fd4650c8aa5a0443d566f Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* QML: Use alpha channel for ARGB32 video framesVaL Doroshchuk2017-12-221-3/+12
| | | | | | | | | | | | Added a fix to use alpha channel for ARGB32 video frames. Previously alpha component was always ignored and used 1.0 instead. To see transparent videos it is still needed to enable blending by adjusting an opacity property of qml element. Task-number: QTBUG-43098 Change-Id: If3aaf8ab695021b3a49a1790d900366e9c336b33 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add missing override and remove redundant virtualAlexander Volkov2016-12-121-6/+6
| | | | | Change-Id: Ifd439abf21877adff57080489324bea729ee5279 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>
* Fix some private headers.Yoann Lopes2015-11-241-1/+1
| | | | | | | | | - Add missing "We mean it" comment - Add missing '_p' suffix for QtMultimediaQuick_p headers Task-number: QTBUG-49480 Change-Id: I1fd4f8b2fdffecebaebaedaf1b78e1da62c08156 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix video nodes material comparison.Yoann Lopes2015-07-201-0/+4
| | | | | | | | | Don't consider a material equal to another when their texture IDs are not available yet. Change-Id: Id4127d71abb2db33950a206dc722b24ab626e960 Task-number: QTBUG-47205 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Minor refactor of built-in QSGVideoNodes.v5.5.0-beta1Yoann Lopes2015-04-301-55/+24
| | | | | | | | | | | - Load shader source from resource files. - Correctly report material types: each material can use different shaders depending on the video pixel format but it was reporting a unique material type. This was causing the node to keep using the same shader even if its pixel format changed. Change-Id: Ib903ecd6e7dd1dd56d7cefe255ab7049933df17d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * Fix order of QSGVideoNode_RGB's supported formats.Yoann Lopes2015-03-181-1/+1
| | | | | | | | | | | | | | | | RGB565 should not be the first pick. As a matter of fact it should be the last pick. Change-Id: I4b96fb02093e70d9c642efd79c48358ec7a664b0 Reviewed-by: Christian Stromme <christian.stromme@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>
* | Add video filtering support to VideoOutputLaszlo Agocs2015-02-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | Add the QAbstractVideoFilter base class and integrate it with VideoOutput. This can be used to perform arbitrary filtering or image processing on the frames of a video stream of a VideoOutput element right before the OpenGL texture is provided to the scenegraph by the video node. This opens up the possibility to integrate computer vision frameworks or accelerated image processing with Qt Quick applications that display video streams using Qt Multimedia. Conceptually it is somewhat similar to QVideoProbe, this approach however allows modifying the frame, in real time with tight integration to the scenegraph node, and targets Qt Quick meaning setting up the filter and processing the results of the computations happen completely in QML. [ChangeLog] Added QAbstractVideoFilter that serves as a base class for QML video filtering elements that integrate compute, vision, and image processing frameworks with VideoOutput. Change-Id: Ice1483f8c2daec5a43536978627a7bbb64549480 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-011-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * Fix QSGVideoNode rendering of rgb frames with padding.Daniele E. Domenichelli2014-08-251-1/+1
| | | | | | | | | | | | Change-Id: I6870cfa51b01b648494e2068be06e52b67403739 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Yoann Lopes <yoann.lopes@digia.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>
* | Support dynamic opengl32 - ANGLE switching on WindowsLaszlo Agocs2014-07-291-15/+15
|/ | | | | | Change-Id: I38532db3ab0ad4fcb8dbabd0cbb528f7d8e4ba06 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix QSGVideoNode rendering of frames with stride != width.Andrew den Exter2014-05-151-4/+31
| | | | | | | | | | Adjust texture coordinates to not render padding at the end of lines, and better calculate the stride of UV planes. Task-number: QTBUG-38218 Task-number: QTBUG-30447 Change-Id: I7b7577979719c48460b838f7dcc89b9d17741f79 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Allow plugins to override the QML VideoOutput type.Andrew den Exter2014-01-201-0/+289
Move QDeclarativeVideoOutput to the private QtMultimediaQuickTools library to make the QDeclarativeVideoOutputBackend interface implementable by a plugin. Change-Id: I763c483a1fc9ec56dc7b8be0bc71523f029a36ee Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>