AVFoundation: Enable QImage based frame fallback
QGraphicsVideoItem was not working because the QPainterVideoSurface was unable to paint BGR32 format OpenGL textures. Now if the QGraphicsView window has a QGLWidget viewport, we use the GLTextureHandle to render the video, otherwise we fallback to the software QImage rendered case. Task-number: QTBUG-28017 Change-Id: I9304e0a2536f15075ae34cdd509ef24fbc18604e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
21c3915205
commit
4c2346bbdd
@@ -71,6 +71,7 @@ QVideoSurfaceCoreGraphicsPainter::QVideoSurfaceCoreGraphicsPainter(bool glSuppor
|
||||
<< QVideoFrame::Format_RGB32
|
||||
<< QVideoFrame::Format_ARGB32
|
||||
<< QVideoFrame::Format_ARGB32_Premultiplied
|
||||
<< QVideoFrame::Format_BGR32
|
||||
<< QVideoFrame::Format_RGB24
|
||||
<< QVideoFrame::Format_RGB565
|
||||
<< QVideoFrame::Format_RGB555
|
||||
@@ -112,7 +113,7 @@ QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::start(const QVide
|
||||
m_scanLineDirection = format.scanLineDirection();
|
||||
|
||||
return m_supportedHandles.contains(format.handleType())
|
||||
&& m_imageFormat != QImage::Format_Invalid
|
||||
&& ((m_imageFormat != QImage::Format_Invalid) || (format.handleType() == QAbstractVideoBuffer::GLTextureHandle))
|
||||
&& !m_imageSize.isEmpty()
|
||||
? QAbstractVideoSurface::NoError
|
||||
: QAbstractVideoSurface::UnsupportedFormatError;
|
||||
|
||||
Reference in New Issue
Block a user