mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
Display the HDR option if the platform has a decoder that supports it
This commit is contained in:
@@ -410,8 +410,15 @@ enum AVPixelFormat DrmRenderer::getPreferredPixelFormat(int)
|
||||
|
||||
int DrmRenderer::getRendererAttributes()
|
||||
{
|
||||
int attributes = 0;
|
||||
|
||||
// This renderer can only draw in full-screen
|
||||
return RENDERER_ATTRIBUTE_FULLSCREEN_ONLY;
|
||||
attributes |= RENDERER_ATTRIBUTE_FULLSCREEN_ONLY;
|
||||
|
||||
// This renderer supports HDR
|
||||
attributes |= RENDERER_ATTRIBUTE_HDR_SUPPORT;
|
||||
|
||||
return attributes;
|
||||
}
|
||||
|
||||
void DrmRenderer::setHdrMode(bool enabled)
|
||||
|
||||
@@ -90,6 +90,7 @@ private:
|
||||
|
||||
#define RENDERER_ATTRIBUTE_FULLSCREEN_ONLY 0x01
|
||||
#define RENDERER_ATTRIBUTE_1080P_MAX 0x02
|
||||
#define RENDERER_ATTRIBUTE_HDR_SUPPORT 0x04
|
||||
|
||||
class IFFmpegRenderer : public Overlay::IOverlayRenderer {
|
||||
public:
|
||||
|
||||
@@ -505,6 +505,12 @@ public:
|
||||
return COLORSPACE_REC_601;
|
||||
}
|
||||
|
||||
int getRendererAttributes() override
|
||||
{
|
||||
// AVSampleBufferDisplayLayer supports HDR output
|
||||
return RENDERER_ATTRIBUTE_HDR_SUPPORT;
|
||||
}
|
||||
|
||||
private:
|
||||
AVBufferRef* m_HwContext;
|
||||
AVSampleBufferDisplayLayer* m_DisplayLayer;
|
||||
|
||||
Reference in New Issue
Block a user