mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-15 13:52:28 +00:00
34 lines
1,017 B
C++
34 lines
1,017 B
C++
#pragma once
|
|
|
|
#include "decoder.h"
|
|
|
|
#include <SLVideo.h>
|
|
|
|
class SLVideoDecoder : public IVideoDecoder
|
|
{
|
|
public:
|
|
SLVideoDecoder(bool testOnly);
|
|
virtual ~SLVideoDecoder();
|
|
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
|
virtual bool isHardwareAccelerated() override;
|
|
virtual bool isAlwaysFullScreen() override;
|
|
virtual int getDecoderCapabilities() override;
|
|
virtual int getDecoderColorspace() override;
|
|
virtual QSize getDecoderMaxResolution() override;
|
|
virtual int submitDecodeUnit(PDECODE_UNIT du) override;
|
|
|
|
// Unused since rendering is done directly from the decode thread
|
|
virtual void renderFrameOnMainThread() override {}
|
|
|
|
// HDR is not supported by SLVideo
|
|
virtual void setHdrMode(bool) override {}
|
|
virtual bool isHdrSupported() override {
|
|
return false;
|
|
}
|
|
|
|
private:
|
|
static void slLogCallback(void* context, ESLVideoLog logLevel, const char* message);
|
|
|
|
CSLVideoContext* m_VideoContext;
|
|
CSLVideoStream* m_VideoStream;
|
|
};
|