61 void init(
RenderList& renderer, QRhiResourceUpdateBatch& res)
override;
62 void runRenderPass(
RenderList&, QRhiCommandBuffer& commands,
Edge& edge)
override;
63 void update(
RenderList& renderer, QRhiResourceUpdateBatch& res,
Edge* edge)
override;
74 bool seekAndDecode(int64_t flicks);
75 bool isSequentialRead(int64_t flicks)
const;
76 bool readNextPacketRaw();
77 bool readNextPacketAVCodec();
79 void createGpuDecoder(QRhi& rhi);
81 std::unique_ptr<GPUVideoDecoder> tryCreateZeroCopyDecoder(QRhi& rhi);
86 AVPixelFormat selectHardwareAcceleration(
88 bool setupHardwareDecoder(
89 const void* codec, AVPixelFormat hwPixFmt);
90 static enum AVPixelFormat negotiateHWFormat(
91 AVCodecContext* ctx,
const enum AVPixelFormat* pix_fmts);
92 void transferHWFrame();
95 std::string m_filePath;
98 double m_flicks_per_dts{};
99 double m_dts_per_flicks{};
100 bool m_useAVCodec{
true};
103 AVFormatContext* m_formatContext{};
104 AVCodecContext* m_codecContext{};
105 const void* m_codec{};
106 AVStream* m_avstream{};
107 AVFrame* m_decodedFrame{};
110 AVBufferRef* m_hwDeviceCtx{};
111 AVPixelFormat m_hwPixelFormat{AV_PIX_FMT_NONE};
112 AVPixelFormat m_hwSwFormat{AV_PIX_FMT_NONE};
113 std::vector<const char*> m_vkEnabledExtensions;
114 AVFrame* m_swTransferFrame{};
117 bool m_hwSwFormatChecked{
false};
118 bool m_zeroCopyFailed{
false};
119 bool m_sharedVulkanDevice{
false};
124 QRhiBuffer* m_processUBO{};
125 QRhiBuffer* m_materialUBO{};
129 float scale_w{}, scale_h{};
130 float tex_w{}, tex_h{};
133 std::unique_ptr<GPUVideoDecoder> m_gpu;
136 int64_t m_lastRequestedFlicks{-1};
137 int64_t m_lastDecodedDts{INT64_MIN};
138 bool m_recomputeScale{
true};
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:119