Skip to content

Commit

Permalink
debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusak authored and popcornmix committed Feb 5, 2021
1 parent 7670e91 commit 46685b1
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,22 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)
std::round(av_q2d(mdmd->display_primaries[i][0]) * 50000.0);
m_hdr_metadata.hdmi_metadata_type1.display_primaries[i].y =
std::round(av_q2d(mdmd->display_primaries[i][1]) * 50000.0);

CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - display_primaries[{}].x: {}",
__FUNCTION__, i, m_hdr_metadata.hdmi_metadata_type1.display_primaries[i].x);
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - display_primaries[{}].y: {}",
__FUNCTION__, i, m_hdr_metadata.hdmi_metadata_type1.display_primaries[i].y);
}

m_hdr_metadata.hdmi_metadata_type1.white_point.x =
std::round(av_q2d(mdmd->white_point[0]) * 50000.0);
m_hdr_metadata.hdmi_metadata_type1.white_point.y =
std::round(av_q2d(mdmd->white_point[1]) * 50000.0);

CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - white_point.x: {}", __FUNCTION__,
m_hdr_metadata.hdmi_metadata_type1.white_point.x);
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - white_point.y: {}", __FUNCTION__,
m_hdr_metadata.hdmi_metadata_type1.white_point.y);
}
if (mdmd && mdmd->has_luminance)
{
Expand All @@ -236,13 +247,23 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)
// where 0x0001 represents 0.0001 cd/m2 and 0xFFFF represents 6.5535 cd/m2
m_hdr_metadata.hdmi_metadata_type1.min_display_mastering_luminance =
std::round(av_q2d(mdmd->min_luminance) * 10000.0);

CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - max_display_mastering_luminance: {}",
__FUNCTION__, m_hdr_metadata.hdmi_metadata_type1.max_display_mastering_luminance);
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - min_display_mastering_luminance: {}",
__FUNCTION__, m_hdr_metadata.hdmi_metadata_type1.min_display_mastering_luminance);
}

const AVContentLightMetadata* clmd = GetContentLightMetadata(picture);
if (clmd)
{
m_hdr_metadata.hdmi_metadata_type1.max_cll = clmd->MaxCLL;
m_hdr_metadata.hdmi_metadata_type1.max_fall = clmd->MaxFALL;

CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - max_cll: {}", __FUNCTION__,
m_hdr_metadata.hdmi_metadata_type1.max_cll);
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - max_fall: {}", __FUNCTION__,
m_hdr_metadata.hdmi_metadata_type1.max_fall);
}

drmModeCreatePropertyBlob(m_DRM->GetFileDescriptor(), &m_hdr_metadata, sizeof(m_hdr_metadata),
Expand Down

0 comments on commit 46685b1

Please sign in to comment.