moonlight-qt/app/streaming/video/ffmpeg-renderers/sdlvid.h

33 lines
1,020 B
C
Raw Normal View History

2019-02-13 03:58:36 +00:00
#pragma once
#include "renderer.h"
2019-02-13 05:55:15 +00:00
#include <SDL_ttf.h>
2019-02-13 03:58:36 +00:00
class SdlRenderer : public IFFmpegRenderer {
public:
SdlRenderer();
2019-02-13 05:55:15 +00:00
virtual ~SdlRenderer() override;
2019-02-13 03:58:36 +00:00
virtual bool initialize(SDL_Window* window,
int videoFormat,
int width,
int height,
int maxFps,
2019-02-13 05:55:15 +00:00
bool enableVsync) override;
virtual bool prepareDecoderContext(AVCodecContext* context) override;
virtual void renderFrame(AVFrame* frame) override;
2019-02-13 05:55:15 +00:00
virtual bool needsTestFrame() override;
virtual int getDecoderCapabilities() override;
virtual FramePacingConstraint getFramePacingConstraint() override;
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
2019-02-13 03:58:36 +00:00
private:
SDL_Renderer* m_Renderer;
SDL_Texture* m_Texture;
2019-02-13 05:55:15 +00:00
TTF_Font* m_DebugOverlayFont;
SDL_Surface* m_DebugOverlaySurface;
SDL_Texture* m_DebugOverlayTexture;
SDL_Rect m_DebugOverlayRect;
2019-02-13 03:58:36 +00:00
};