mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-15 13:52:28 +00:00
24 lines
773 B
C++
24 lines
773 B
C++
#pragma once
|
|
|
|
#include "renderer.h"
|
|
|
|
class SdlRenderer : public IFFmpegRenderer {
|
|
public:
|
|
SdlRenderer();
|
|
virtual ~SdlRenderer() override;
|
|
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
|
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) override;
|
|
virtual void renderFrame(AVFrame* frame) override;
|
|
virtual bool isRenderThreadSupported() override;
|
|
virtual bool isPixelFormatSupported(int videoFormat, enum AVPixelFormat pixelFormat) override;
|
|
|
|
private:
|
|
void renderOverlay(Overlay::OverlayType type);
|
|
|
|
SDL_Renderer* m_Renderer;
|
|
SDL_Texture* m_Texture;
|
|
int m_SwPixelFormat;
|
|
SDL_Texture* m_OverlayTextures[Overlay::OverlayMax];
|
|
SDL_Rect m_OverlayRects[Overlay::OverlayMax];
|
|
};
|
|
|