mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-16 06:12:28 +00:00
24 lines
603 B
C++
24 lines
603 B
C++
#pragma once
|
|
|
|
#include "renderer.h"
|
|
|
|
#include <xf86drm.h>
|
|
#include <xf86drmMode.h>
|
|
|
|
class DrmRenderer : public IFFmpegRenderer {
|
|
public:
|
|
DrmRenderer();
|
|
virtual ~DrmRenderer() override;
|
|
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
|
virtual bool prepareDecoderContext(AVCodecContext* context) override;
|
|
virtual void renderFrame(AVFrame* frame) override;
|
|
virtual enum AVPixelFormat getPreferredPixelFormat(int videoFormat) override;
|
|
|
|
private:
|
|
int m_DrmFd;
|
|
uint32_t m_CrtcId;
|
|
uint32_t m_PlaneId;
|
|
uint32_t m_CurrentFbId;
|
|
SDL_Rect m_OutputRect;
|
|
};
|
|
|