summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
diff options
context:
space:
mode:
authorVal Doroshchuk <valentyn.doroshchuk@qt.io>2018-09-14 11:52:33 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-10-03 10:41:04 +0000
commit704e120042a504cfe5ff76f6f35133f47d067028 (patch)
tree987494c10d21cc2d09b15d8da04f6b3fc2e65b05 /src/plugins/android
parentf4cd7293efda5042d1fb66f4d4fb3ae5dde3c125 (diff)
Android: Change video frame format from BGR32 to ABGR32
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>
Diffstat (limited to 'src/plugins/android')
-rw-r--r--src/plugins/android/src/common/qandroidvideooutput.cpp2
-rw-r--r--src/plugins/android/videonode/qandroidsgvideonodeplugin.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/src/common/qandroidvideooutput.cpp b/src/plugins/android/src/common/qandroidvideooutput.cpp
index b425b9d89..eeaf70982 100644
--- a/src/plugins/android/src/common/qandroidvideooutput.cpp
+++ b/src/plugins/android/src/common/qandroidvideooutput.cpp
@@ -314,7 +314,7 @@ void QAndroidTextureVideoOutput::onFrameAvailable()
return;
QAbstractVideoBuffer *buffer = new AndroidTextureVideoBuffer(this, m_nativeSize);
- QVideoFrame frame(buffer, m_nativeSize, QVideoFrame::Format_BGR32);
+ QVideoFrame frame(buffer, m_nativeSize, QVideoFrame::Format_ABGR32);
if (m_surface->isActive() && (m_surface->surfaceFormat().pixelFormat() != frame.pixelFormat()
|| m_surface->surfaceFormat().frameSize() != frame.size())) {
diff --git a/src/plugins/android/videonode/qandroidsgvideonodeplugin.cpp b/src/plugins/android/videonode/qandroidsgvideonodeplugin.cpp
index e69c9c16e..d70c8100b 100644
--- a/src/plugins/android/videonode/qandroidsgvideonodeplugin.cpp
+++ b/src/plugins/android/videonode/qandroidsgvideonodeplugin.cpp
@@ -48,7 +48,7 @@ QList<QVideoFrame::PixelFormat> QAndroidSGVideoNodeFactoryPlugin::supportedPixel
QList<QVideoFrame::PixelFormat> pixelFormats;
if (handleType == QAbstractVideoBuffer::GLTextureHandle)
- pixelFormats.append(QVideoFrame::Format_BGR32);
+ pixelFormats.append(QVideoFrame::Format_ABGR32);
return pixelFormats;
}