summaryrefslogtreecommitdiffstats
path: root/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tst_qvideoframe: Increase buffer sizes used in image() testsDmitry Shachnev2021-04-121-4/+4
| | | | | | | | | | | | | | | | | | | | | YUV420P and YV12 formats use three planes which need 18432 bytes in total: - height × bytesPerLine = 64 × 256 = 16384 bytes; - height/2 × width/2 × uvPixelStride = 32 × 32 × 1 = 1024 bytes; - height/2 × width/2 × uvPixelStride = 32 × 32 × 1 = 1024 bytes. NV12 and NV21 formats use two planes which need 24576 bytes in total: - height × bytesPerLine = 64 × 256 = 16384 bytes; - height/2 × bytesPerLine = 32 × 256 = 8192 bytes. Fixes https://bugs.debian.org/982973. Change-Id: I68433dbb5370a6e4cdd2a85e2a9554fab642f5b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 1c2a8655ac3dd5f8de5294a77ac5e585add82229) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Map QVideoFrame::Format_Y8=>QImage::Format_Grayscale8 in QVideoFrame"Andy Shaw2020-11-301-1/+1
| | | | | | | | | | | | This reverts commit 2b96c113cf7057b556856149114999b973b3f2c2, due to the fact that it introduces a problem with existing cameras on Windows. So reverting for now until a fix can be found. Change-Id: Ica59c8a68de7aecf6a4ebd1bd044363e9acefd93 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 67d1ff140e60e3372d05fc7af2cf85de891a31f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't map QMemoryVideoBuffer when there is no data insideVaL Doroshchuk2020-06-301-0/+12
| | | | | | | | Task-number: QTBUG-85202 Change-Id: If40af4af211af86311c0e04a8bdd0627dc34a939 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit d97efea0caaa9741f21e7e30b394d292ea80c9b0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Map QVideoFrame::Format_Y8=>QImage::Format_Grayscale8 in QVideoFrameVaL Doroshchuk2020-06-021-1/+1
| | | | | | | | Fixes: QTBUG-52455 Change-Id: I30582582935ae0a2c5094db995cba83b62adc767 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 2b96c113cf7057b556856149114999b973b3f2c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DirectShow: Disable QVideoFrame::image() testVaL Doroshchuk2019-12-041-1/+3
| | | | | | Change-Id: I7afeb2d74e95f1e65335bda505d8762b68393ae4 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce QVideoFrame::image()VaL Doroshchuk2019-10-311-0/+169
| | | | | | | | | | | | | 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 (cherry picked from commit 93f966335e1ed8ed47b7e8b32452d43c2f8a7bb1) Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix some deprecation warningsv5.13.0-beta2Friedemann Kleint2019-04-051-1/+1
| | | | | | | | | tst_qvideoframe.cpp:736:68: warning: 'int QImage::byteCount() const' is deprecated: Use sizeInBytes [-Wdeprecated-declarations] videowidget.cpp:103:49: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] videowidget.cpp:111:62: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: If6ba7de74c695cb5405ef7d3f9c5be8f94e3e522 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Updated license headersAntti Kokko2016-01-201-17/+12
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I96559337481456cce6ea909fb7e53877acd352bd 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>
* Support per-plane strides and data offsets in QVideoFrame.Andrew den Exter2014-07-081-0/+122
| | | | | | | | | | | | 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>
* Removed debug operator autotests.Yoann Lopes2014-03-261-157/+0
| | | | | | | | | | For QVideoFrame, QAudioFormat and QVideoSurfaceFormat. There's no point in testing the formatting of the debug operator. These tests can break every time there's a change in QDebug's output policy. Change-Id: I2349b4722a428bc4c56ca58b13889790e86df4c1 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Fix whitespace issue in the QVideoFrame auto test.Christian Strømme2014-01-071-1/+1
| | | | | | | | The test was failing because it was expecting a trailing whitespace directly after the serialization of the meta-data map. Change-Id: I62aa022492c721d408d23a98e8a3cfa173f45e68 Reviewed-by: Yoann Lopes <yoann.lopes@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 "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-12/+48
| | | | | 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>
* Allow nested read only maps of QVideoFrame.Dmytro Poplavskiy2011-11-281-2/+21
| | | | | | | | It's useful when video frame is accessed from multiple places like display and encoding. Change-Id: I8af175c780783216d8b7717cdf0744ad9bc95348 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Rearrange the automatic tests.Michael Goddard2011-11-041-0/+1126
Split them into unit and integration tests. Integration tests really need to be run on the real platform (not in a VM etc) since they are somewhat unstable or nonfunctional otherwise. A few tests were previously broken by QUrl changes and they were repaired. Removed one test since it was not providing a lot of value. There are still a number of tests that rely on Q_AUTOTEST_EXPORT symbols. Change-Id: Ic402abf0af946baa5945075d975b3f584f9ef280 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>