diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-20 13:19:36 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-20 13:20:44 +0200 |
commit | ee8aca6c8771a92d558003ea5cf62e5236f21bb5 (patch) | |
tree | af9524ab0ee20930181f590fc6b3fb495028e7fd /src/plugins/avfoundation | |
parent | f5235af0dc3aa433435dbd42b716776097af5acf (diff) | |
parent | 3d3d2a4967ba079a3e6df82cdc89f839865e6649 (diff) |
Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ie1e478eca1cdfd99ccd3a3c8a07aefbfa27ccbdb
Diffstat (limited to 'src/plugins/avfoundation')
-rw-r--r-- | src/plugins/avfoundation/camera/avfcamerarenderercontrol.mm | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/plugins/avfoundation/camera/avfcamerarenderercontrol.mm b/src/plugins/avfoundation/camera/avfcamerarenderercontrol.mm index 924c62d97..705ec633f 100644 --- a/src/plugins/avfoundation/camera/avfcamerarenderercontrol.mm +++ b/src/plugins/avfoundation/camera/avfcamerarenderercontrol.mm @@ -174,7 +174,7 @@ public: GL_RGBA, CVPixelBufferGetWidth(m_buffer), CVPixelBufferGetHeight(m_buffer), - GL_BGRA, + GL_RGBA, GL_UNSIGNED_BYTE, 0, &m_texture); @@ -240,18 +240,8 @@ private: int width = CVPixelBufferGetWidth(imageBuffer); int height = CVPixelBufferGetHeight(imageBuffer); - QVideoFrame::PixelFormat format; - -#ifdef Q_OS_IOS - bool useTexture = m_renderer->supportsTextures() - && CVPixelBufferGetPixelFormatType(imageBuffer) == kCVPixelFormatType_32BGRA; - - if (useTexture) - format = QVideoFrame::Format_BGRA32; - else -#endif - format = AVFCameraViewfinderSettingsControl2::QtPixelFormatFromCVFormat(CVPixelBufferGetPixelFormatType(imageBuffer)); - + QVideoFrame::PixelFormat format = + AVFCameraViewfinderSettingsControl2::QtPixelFormatFromCVFormat(CVPixelBufferGetPixelFormatType(imageBuffer)); if (format == QVideoFrame::Format_Invalid) return; |