Skip to content

Commit

Permalink
Fix QAbstractVideoBuffer interface for Qt 6.7.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
OgreTransporter committed Jul 30, 2024
1 parent aa8d0c6 commit 0ef8ca3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/QtAVPlayer/qavvideoframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,15 @@ class PlanarVideoBuffer : public QAbstractVideoBuffer
{
}

#if QT_VERSION < QT_VERSION_CHECK(6, 7, 2)
QVideoFrame::MapMode mapMode() const override { return m_mode; }

quint64 textureHandle(int plane) const override
#else
QVideoFrame::MapMode mapMode() const { return m_mode; }

quint64 textureHandle(QRhi*, int plane) const override
#endif
{
if (m_textures.isNull())
const_cast<PlanarVideoBuffer *>(this)->m_textures = m_frame.handle(m_rhi);
Expand All @@ -241,7 +249,6 @@ class PlanarVideoBuffer : public QAbstractVideoBuffer
return m_textures.toULongLong();
}

QVideoFrame::MapMode mapMode() const override { return m_mode; }
MapData map(QVideoFrame::MapMode mode) override
{
MapData res;
Expand Down

0 comments on commit 0ef8ca3

Please sign in to comment.