38 static constexpr size_t MaxSlotsCount = 4;
41
42
43
44 bool texturesDirty()
const {
return m_texturesDirty; }
46 const QVideoFrame& currentFrame()
const {
return m_currentFrame; }
49
50
51
52 void setCurrentFrame(QVideoFrame frame);
55
56
57
58
59
60
61
62 QVideoFrameTextures* updateTextures(QRhi &rhi, QRhiResourceUpdateBatch &rub);
65
66
67
68
69 void onFrameEndInvoked();
72
73
74
78 QVideoFrame m_currentFrame;
79 bool m_texturesDirty =
false;
80 std::array<QVideoFrameTexturesUPtr, MaxSlotsCount> m_textureSlots;
81 std::optional<
int> m_currentSlot;
82 QVideoFrameTexturesUPtr m_oldTextures;
The class QVideoFrameTexturePool stores textures in slots to ensure they are alive during rhi's rende...