summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframe.h
Commit message (Collapse)AuthorAgeFilesLines
* Make QVideoFrame(Format) movable, smaller API cleanupsVolker Hilsheimer2021-05-071-2/+10
| | | | | | | Rename nPlanes to planeCount, remove QVideoFrameFormat::sizeHint. Change-Id: Ib176934f4960d01f6bec5258e552e41140dc101a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QVideoFrame(QImage) constructorLars Knoll2021-04-161-3/+2
| | | | | | | | | It doesn't make a lot of sense and only ever worked for some image formats. In addition, it's never used except for some auto tests. Change-Id: I6a32eabca8c36646ffc11d728e9cdf9b2f74d758 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QVideoSurfaceFormat to QVideoFrameFormatLars Knoll2021-04-141-5/+5
| | | | | | | | | 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>
* Move the texture uploading code into Qt MultimediaLars Knoll2021-04-071-1/+4
| | | | | | | | | | 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>
* More work to enable HW decoding for Qt QuickLars Knoll2021-04-071-2/+0
| | | | | | | | | | | | | | | | | Request GL textures from the pipeline for now. Some initial code to also use the texture upload meta functionality in gstreamer, but that will require some more work so we don't make the GL context current in the wrong thread. The gstreamer VAAPI elements on AMD hardware (or in general...) seem to have some bugs. Converting a VASurface to a GL texture using the texture upload meta doesn't create an ARGB texture as promised, but does write some YUV data into the texture. And trying to map a SW buffer received from the VAAPI decoders fails. Change-Id: I9b629eb84f3f32adc23ae2e2fd1cd3e42e6afbc0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Start adding infrastructure to retrieve video frames as textureLars Knoll2021-04-061-2/+3
| | | | | | | | | | | | | | | We're using RHI here, as that's what we need for Qt Quick anyway. You can now set a QRhi object on QVideoSink. This can then be used internally to create textures of the required format instead of memory buffers. QVideoSurfaceFormat will now tell you how many planes are required for the format, and you can retrieve the textures for each plane from QVideoFrame. Change-Id: I86430db60a8f1aba07ec3b38e22b977cdaefaa0a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Smaller API cleanups in QVideoFrameLars Knoll2021-04-061-2/+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-52/+2
| | | | | | Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* QVideoFrame should be constructed with a QSurfaceFormatLars Knoll2021-04-061-2/+4
| | | | | | | | | | | | | This was inconsistent so far. QVideoFrame had half the properties of QVideoSurfaceFormat, but was missing some parts that are required to render the frame properly. Giving it a QVideoSurfaceFormat means that the QVideoFrame is self describing and can be rendered without additional information. Change-Id: Idb2757ee6a29020bd72c9c50891309ee8d8a8bfc Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove metaData from QVideoFrameLars Knoll2021-04-061-4/+0
| | | | | | | | We never used this feature for anything. Change-Id: I1597c49486dd155c4ef49da483536639affb0cbf Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Kill QVideoFrame::PixmapHandleLars Knoll2021-04-061-1/+0
| | | | | | | | | This didn't make sense since Qt 5.0, as a pixmap is the same as an image in Qt 5/6. It was also completely unused. Change-Id: I97d548ca288c9aebb580f0fbaf9fbbba488e197a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Various improvements to QVideoFrame->QImage conversionLars Knoll2021-04-061-1/+0
| | | | | | | | | | | * Implement support for missing pixel formats, we are now able to convert all supported pixel formats to a QImage. * Ensure we always convert to a RGB32 or ARGB32_Premultiplied image * Add missing mappings to gstreamer formats Change-Id: I8816e0a42ced73c96dfff03f131d7a749b55ae36 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove AdobeDng and CameraRaw pixel formatsLars Knoll2021-04-061-4/+1
| | | | | | | | They are unused and not supported anywhere in QtMultimedia. Change-Id: Id96b260e5ccc355d2e83e7ca5901f446e3b447b7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for P010 and P016 video formatsLars Knoll2021-04-061-0/+6
| | | | | | | | | | | | I've got some content in those formats and we should be able to render them in Software. This works now and is actually reasonable fast (but could be better if we add SSE/AVX versions of the converter). Change-Id: Ib42162124c9e203b228272b6d1c1849ce00e295a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unused handle types in QVideoFrameLars Knoll2021-03-231-4/+1
| | | | | | Change-Id: Ia8926ba6633e4aff07e7dff25862c1107a788695 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some smaller cleanupsLars Knoll2021-03-161-5/+3
| | | | | | Change-Id: I44ad31af07b122ee69bb3a7682550f7930e0d366 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-6/+27
| | | | | | | | | | 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>
* Remove manual metatype declarations and registrationsLars Knoll2021-03-021-3/+2
| | | | | | | | 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>
* Remove the fieldType property of QVideoFrameLars Knoll2021-01-211-13/+0
| | | | | | | | | It's never set to anything else than ProgressiveFrame anyway (aka it's unused/unsupported). Change-Id: I9e89a2e8ec54c827a6c7b871f97af090f0593d1a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Reorder Format_ABGR32 and Format_YUV422PVaL Doroshchuk2020-08-031-2/+2
| | | | | Change-Id: I212f2544d8422955e7da22810c2e98a23b7857c0 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Introduce QVideoFrame::image()VaL Doroshchuk2019-10-231-0/+2
| | | | | | | | | | | Since QVideoFrame::pixelFormat's do not 100% match QImage::Format's, introducing converstion function. Returns an image based on current frame. Converts data if needed to supported QImage format. Change-Id: I3331578c01cf9c999a380efc4a83bf9eddb07901 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-011-2/+2
|\ | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
| * Move QVideoFrame::Format_ABGR32 to the end of the Pixel FormatsVaL Doroshchuk2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ABGR32 was introduced in 5.13.0 but placed in the middle of the list, which breaks enum values. [ChangeLog] In Qt 5.13.0 binary compatibility was broken for usage of the enum QVideoFrame::PixelFormat by introducing QVideoFrame::Format_ABGR32. To minimize the impact of this, the break has been reverted, thus introducing a binary compatibility break with earlier Qt 5.13.x versions, but restoring compatibility with all earlier versions of Qt 5. Change-Id: I3c490f2fc30f3b6914306b2d496724f12729338e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Move QVideoFrame::Format_YUV422P to the end of the Pixel FormatsVaL Doroshchuk2019-09-241-1/+1
| | | | | | | | | | Change-Id: I21afcf6302b18fd3a879fa95ef2c872bcb8a3376 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add YUV422P format support to QVideoFrame and declarative rendererTomasz Olszak2019-05-101-0/+1
|/ | | | | | | | | [ChangeLog] Added QVideoFrame::Format_YUV422P. Change-Id: If7741db00cf0b628d7fc4b1cd3a6e424e0f8e2c0 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Introduce QVideoFrame::buffer()VaL Doroshchuk2019-02-041-0/+1
| | | | | | | | Returns video buffer if available. Is useful when need to get an access to impl specific data. Change-Id: I6b9855397db2396ed0a76835d083be0457721f9b Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Android: Change video frame format from BGR32 to ABGR32Val Doroshchuk2018-10-031-0/+1
| | | | | | | | | | | | When mapping video frame, data will be downloaded to QImage from frame buffer with QImage::Format_RGBX8888 which is XBGR32 in Little Endian. Thus added new pixel format QVideoFrame::Format_ABGR32. Changed QVideoFrame::Format_BGR32 to QVideoFrame::Format_ABGR32. Task-number: QTBUG-69968 Change-Id: I0f58d1a5b5cbdb5ab48ee5ad4d75f9b62f516333 Reviewed-by: Christian Stromme <christian.stromme@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>
* Add private API for conversion from QVideoFrame to QImage.Yoann Lopes2015-10-201-0/+3
| | | | | | | | | | The Android plugin had a function to convert from NV21 to RGB32. It's now moved to the Qt Multimedia library and it supports additional source formats. It could be further improved with more SIMD code, it could then become a public API. Change-Id: Ibee349027048a263a1a7ea74dc51237f7747912c 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-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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 per-plane strides and data offsets in QVideoFrame.Andrew den Exter2014-07-081-0/+4
| | | | | | | | | | | | Since just adding a new virtual isn't binary compatible add a new derivative type with a virtual member and connect it up through a virtual in the private class. [ChangeLog] Support for per-plane strides and data offsets in QVideoFrame. Task-number: QTBUG-38345 Change-Id: I1974c2b0b454d130e17971ce549031259d61f9cd Reviewed-by: Yoann Lopes <yoann.lopes@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-1/+1
| | | | | | | 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>
* Add a metaData property to QVideoFrame.Michael Goddard2012-01-131-1/+5
| | | | | Change-Id: I6614cd86e3e1e170277bfc751222b5b42cb657eb Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@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-1/+4
| | | | | | | | | | | 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>
* Improve video test coverage and debugging output.Michael Goddard2011-10-071-0/+4
| | | | | | | | | | | Added a few debug operators for some useful enums, and added tests for them. One or two other features not really tested. Change-Id: Idffec6ade1d4e05dbf72f3dc47dfc0d01ddddf8b Reviewed-on: http://codereview.qt-project.org/6201 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Rename QtMultimediaKit to QtMultimedia.Michael Goddard2011-10-071-0/+174
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>