Release videoframe on painter stop()
QVideoSurfaceGLPainter/QVideoSurfaceGlslPainter needs to release the video frame on stop (just like QVideoSurfaceGenericPainter already does). Change-Id: Iaf3eb13eaf51fbc22fab6b1f80db8e8978ac328d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
5b52c1ebb9
commit
42e032bdc1
@@ -247,6 +247,8 @@ public:
|
|||||||
|
|
||||||
bool isFormatSupported(const QVideoSurfaceFormat &format) const;
|
bool isFormatSupported(const QVideoSurfaceFormat &format) const;
|
||||||
|
|
||||||
|
void stop();
|
||||||
|
|
||||||
QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
|
QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
|
||||||
|
|
||||||
QAbstractVideoSurface::Error paint(
|
QAbstractVideoSurface::Error paint(
|
||||||
@@ -351,6 +353,12 @@ bool QVideoSurfaceGLPainter::isFormatSupported(const QVideoSurfaceFormat &format
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void QVideoSurfaceGLPainter::stop()
|
||||||
|
{
|
||||||
|
m_frame = QVideoFrame();
|
||||||
|
}
|
||||||
|
|
||||||
QAbstractVideoSurface::Error QVideoSurfaceGLPainter::setCurrentFrame(const QVideoFrame &frame)
|
QAbstractVideoSurface::Error QVideoSurfaceGLPainter::setCurrentFrame(const QVideoFrame &frame)
|
||||||
{
|
{
|
||||||
m_frame = frame;
|
m_frame = frame;
|
||||||
@@ -832,6 +840,8 @@ void QVideoSurfaceArbFpPainter::stop()
|
|||||||
m_textureCount = 0;
|
m_textureCount = 0;
|
||||||
m_programId = 0;
|
m_programId = 0;
|
||||||
m_handleType = QAbstractVideoBuffer::NoHandle;
|
m_handleType = QAbstractVideoBuffer::NoHandle;
|
||||||
|
|
||||||
|
QVideoSurfaceGLPainter::stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
|
QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
|
||||||
@@ -1176,6 +1186,8 @@ void QVideoSurfaceGlslPainter::stop()
|
|||||||
|
|
||||||
m_textureCount = 0;
|
m_textureCount = 0;
|
||||||
m_handleType = QAbstractVideoBuffer::NoHandle;
|
m_handleType = QAbstractVideoBuffer::NoHandle;
|
||||||
|
|
||||||
|
QVideoSurfaceGLPainter::stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
|
QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
|
||||||
|
|||||||
Reference in New Issue
Block a user