Android: fixed video rendering with multiple media players.
It seems all Android media players share the same video buffers, which results in textures containing frames for the wrong media player. When getting a new frame, we now copy it into a FBO in order to avoid that another media player overwrites the frame being shown on screen. Task-number: QTBUG-35868 Change-Id: I6701cf7368a3ef9e73d649c3ece1f206cafd5bb3 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
437db8df51
commit
a0746fe49c
@@ -43,6 +43,7 @@
|
||||
#define QANDROIDSGVIDEONODE_H
|
||||
|
||||
#include <private/qsgvideonode_p.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -52,14 +53,18 @@ class QAndroidSGVideoNode : public QSGVideoNode
|
||||
{
|
||||
public:
|
||||
QAndroidSGVideoNode(const QVideoSurfaceFormat &format);
|
||||
~QAndroidSGVideoNode();
|
||||
|
||||
void setCurrentFrame(const QVideoFrame &frame);
|
||||
QVideoFrame::PixelFormat pixelFormat() const;
|
||||
QVideoFrame::PixelFormat pixelFormat() const { return m_format.pixelFormat(); }
|
||||
|
||||
void preprocess();
|
||||
|
||||
private:
|
||||
QVideoSurfaceFormat m_format;
|
||||
QAndroidSGVideoNodeMaterial *m_material;
|
||||
QMutex m_frameMutex;
|
||||
QVideoFrame m_frame;
|
||||
QVideoSurfaceFormat m_format;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user