aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/glue/qtmultimedia.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-10-04 10:36:18 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-10-04 15:54:19 +0200
commitd410d3b621a9273be7a466a7ab3eb278fc225cdf (patch)
treef6d50322467b1d5a0aedf8b078fdd2b35e307684 /sources/pyside6/PySide6/glue/qtmultimedia.cpp
parent34ce2e190ea61ae311f6897d11505cf778898c06 (diff)
PySide6: Expose QVideoFrame::bits(int)
QVideoFrame::bits() was removed in Qt 6; expose QVideoFrame::bits(int plane). Pick-to: 6.2 Fixes: PYSIDE-1674 Change-Id: I23f58f71286e445ad1b1e170924ee5e40f0b2491 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/PySide6/glue/qtmultimedia.cpp')
-rw-r--r--sources/pyside6/PySide6/glue/qtmultimedia.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside6/PySide6/glue/qtmultimedia.cpp b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
index ddb63740f..36f831f07 100644
--- a/sources/pyside6/PySide6/glue/qtmultimedia.cpp
+++ b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
@@ -39,7 +39,8 @@
// @snippet qvideoframe-bits
%BEGIN_ALLOW_THREADS
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME();
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1);
%END_ALLOW_THREADS
-%PYARG_0 = Shiboken::Buffer::newObject(%0, %CPPSELF.bytesPerLine() * %CPPSELF.height(), Shiboken::Buffer::ReadWrite);
+const auto size = %CPPSELF.mappedBytes(%1);
+%PYARG_0 = Shiboken::Buffer::newObject(%0, size, Shiboken::Buffer::ReadWrite);
// @snippet qvideoframe-bits