moonlight-qt/app/streaming/video/slvid.h
Cameron Gutman e6c4332445 Revert "Use Rec 2020 colorspace for WCG support even if HDR is off on the host"
Rec 2020 conversion causes colors to be blown out in SDR

This reverts commit 472e8ee92e.
2022-10-13 01:19:49 -05:00

41 lines
1.3 KiB
C++

#pragma once
#include "decoder.h"
#include "overlaymanager.h"
#include <SLVideo.h>
class SLVideoDecoder : public IVideoDecoder, public Overlay::IOverlayRenderer
{
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 int getDecoderColorRange() override;
virtual QSize getDecoderMaxResolution() override;
virtual int submitDecodeUnit(PDECODE_UNIT du) override;
virtual void notifyOverlayUpdated(Overlay::OverlayType) 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;
CSLVideoOverlay* m_Overlay;
int m_ViewportWidth;
int m_ViewportHeight;
};