diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-17 14:17:47 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-25 07:05:40 +0000 |
commit | 28fa0a6baba7a79ce85f8d62c2c296aa9f98de4c (patch) | |
tree | 21710a832be622ab1c2c7ed3aceebac9b1bac1ec /sources/pyside2/PySide2/glue | |
parent | e52ebf296e8fcd84fa4055c80a3c489ae1431c9e (diff) |
Add inject-code for QVideoFrame::bits()
Since QVideoFrame::bits() returns uchar* which is not covered
by conversion functions, added the same replacement as was done for
QImage::bits().
It should return a buffer object to satisfy Shiboken::Buffer::checkType().
Fixes: PYSIDE-849
Change-Id: I33bdb13f3b892f325ccf3b1ef4bef59744b60f2d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/glue')
-rw-r--r-- | sources/pyside2/PySide2/glue/qtmultimedia.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/glue/qtmultimedia.cpp b/sources/pyside2/PySide2/glue/qtmultimedia.cpp index 5a3f3a5e7..cbe1367cb 100644 --- a/sources/pyside2/PySide2/glue/qtmultimedia.cpp +++ b/sources/pyside2/PySide2/glue/qtmultimedia.cpp @@ -44,3 +44,10 @@ QObject * upcastedArg = %CONVERTTOCPP[QObject *](%PYARG_1); %CPPSELF.%FUNCTION_NAME(reinterpret_cast< %ARG1_TYPE >(upcastedArg)); %END_ALLOW_THREADS // @snippet upcast + +// @snippet qvideoframe-bits +%BEGIN_ALLOW_THREADS +%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(); +%END_ALLOW_THREADS +%PYARG_0 = Shiboken::Buffer::newObject(%0, %CPPSELF.bytesPerLine() * %CPPSELF.height(), Shiboken::Buffer::ReadWrite); +// @snippet qvideoframe-bits |