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