mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Add a GenericHwAccelRenderer for unknown hwaccels
This will get us limited hardware acceleration even for hwaccels that we don't know about yet.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "renderer.h"
|
||||
|
||||
class GenericHwAccelRenderer : public IFFmpegRenderer
|
||||
{
|
||||
public:
|
||||
GenericHwAccelRenderer(AVHWDeviceType hwDeviceType);
|
||||
virtual ~GenericHwAccelRenderer() override;
|
||||
virtual bool initialize(PDECODER_PARAMETERS) override;
|
||||
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) override;
|
||||
virtual void renderFrame(AVFrame* frame) override;
|
||||
virtual bool needsTestFrame() override;
|
||||
virtual bool isDirectRenderingSupported() override;
|
||||
virtual int getDecoderCapabilities() override;
|
||||
|
||||
private:
|
||||
AVHWDeviceType m_HwDeviceType;
|
||||
AVBufferRef* m_HwContext;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user