2019-02-13 03:58:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "renderer.h"
|
|
|
|
|
|
|
|
class SdlRenderer : public IFFmpegRenderer {
|
|
|
|
public:
|
|
|
|
SdlRenderer();
|
2019-02-13 05:55:15 +00:00
|
|
|
virtual ~SdlRenderer() override;
|
2019-04-12 05:27:20 +00:00
|
|
|
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
2020-02-09 01:47:26 +00:00
|
|
|
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) override;
|
2019-02-16 03:31:01 +00:00
|
|
|
virtual void renderFrame(AVFrame* frame) override;
|
2019-04-10 04:46:14 +00:00
|
|
|
virtual bool isRenderThreadSupported() override;
|
2020-01-26 23:02:29 +00:00
|
|
|
virtual bool isPixelFormatSupported(int videoFormat, enum AVPixelFormat pixelFormat) override;
|
2021-03-23 04:32:00 +00:00
|
|
|
virtual bool testRenderFrame(AVFrame* frame) override;
|
2019-02-13 03:58:36 +00:00
|
|
|
|
|
|
|
private:
|
2019-03-17 22:08:21 +00:00
|
|
|
void renderOverlay(Overlay::OverlayType type);
|
|
|
|
|
2019-02-13 03:58:36 +00:00
|
|
|
SDL_Renderer* m_Renderer;
|
|
|
|
SDL_Texture* m_Texture;
|
2019-04-20 05:16:06 +00:00
|
|
|
int m_SwPixelFormat;
|
2019-03-17 22:08:21 +00:00
|
|
|
SDL_Texture* m_OverlayTextures[Overlay::OverlayMax];
|
|
|
|
SDL_Rect m_OverlayRects[Overlay::OverlayMax];
|
2019-02-13 03:58:36 +00:00
|
|
|
};
|
|
|
|
|