mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix build with old libdrm headers
This commit is contained in:
@@ -370,7 +370,8 @@ bool DrmRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
// If we have an HDR output metadata property, construct the metadata blob
|
// If we have an HDR output metadata property, construct the metadata blob
|
||||||
// to apply when we are called to enter HDR mode.
|
// to apply when we are called to enter HDR mode.
|
||||||
if (m_HdrOutputMetadataProp != nullptr) {
|
if (m_HdrOutputMetadataProp != nullptr) {
|
||||||
struct hdr_output_metadata outputMetadata;
|
DrmDefs::hdr_output_metadata outputMetadata;
|
||||||
|
|
||||||
outputMetadata.metadata_type = 0; // HDMI_STATIC_METADATA_TYPE1
|
outputMetadata.metadata_type = 0; // HDMI_STATIC_METADATA_TYPE1
|
||||||
outputMetadata.hdmi_metadata_type1.eotf = params->hdrMetadata.eotf;
|
outputMetadata.hdmi_metadata_type1.eotf = params->hdrMetadata.eotf;
|
||||||
outputMetadata.hdmi_metadata_type1.metadata_type = params->hdrMetadata.staticMetadataDescriptorId;
|
outputMetadata.hdmi_metadata_type1.metadata_type = params->hdrMetadata.staticMetadataDescriptorId;
|
||||||
|
|||||||
@@ -5,6 +5,42 @@
|
|||||||
#include <xf86drm.h>
|
#include <xf86drm.h>
|
||||||
#include <xf86drmMode.h>
|
#include <xf86drmMode.h>
|
||||||
|
|
||||||
|
// Newer libdrm headers have these HDR structs, but some older ones don't.
|
||||||
|
namespace DrmDefs
|
||||||
|
{
|
||||||
|
// HDR structs is copied from linux include/linux/hdmi.h
|
||||||
|
struct hdr_metadata_infoframe
|
||||||
|
{
|
||||||
|
uint8_t eotf;
|
||||||
|
uint8_t metadata_type;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint16_t x, y;
|
||||||
|
} display_primaries[3];
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint16_t x, y;
|
||||||
|
} white_point;
|
||||||
|
|
||||||
|
uint16_t max_display_mastering_luminance;
|
||||||
|
uint16_t min_display_mastering_luminance;
|
||||||
|
|
||||||
|
uint16_t max_cll;
|
||||||
|
uint16_t max_fall;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hdr_output_metadata
|
||||||
|
{
|
||||||
|
uint32_t metadata_type;
|
||||||
|
|
||||||
|
union {
|
||||||
|
struct hdr_metadata_infoframe hdmi_metadata_type1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
class DrmRenderer : public IFFmpegRenderer {
|
class DrmRenderer : public IFFmpegRenderer {
|
||||||
public:
|
public:
|
||||||
DrmRenderer();
|
DrmRenderer();
|
||||||
|
|||||||
Reference in New Issue
Block a user