bool CRendererMediaCodecSurface::Configure(const VideoPicture &picture, float fps, unsigned int orientation) { CLog::Log(LOGNOTICE, "CRendererMediaCodecSurface::Configure"); m_sourceWidth = picture.iWidth; m_sourceHeight = picture.iHeight; m_renderOrientation = orientation; m_iFlags = GetFlagsChromaPosition(picture.chroma_position) | GetFlagsColorMatrix(picture.color_space, picture.iWidth, picture.iHeight) | GetFlagsColorPrimaries(picture.color_primaries) | GetFlagsStereoMode(picture.stereoMode); // Calculate the input frame aspect ratio. CalculateFrameAspectRatio(picture.iDisplayWidth, picture.iDisplayHeight); SetViewMode(m_videoSettings.m_ViewMode); return true; }
bool CRendererDRMPRIME::Configure(const VideoPicture& picture, float fps, unsigned int orientation) { m_format = picture.videoBuffer->GetFormat(); m_sourceWidth = picture.iWidth; m_sourceHeight = picture.iHeight; m_renderOrientation = orientation; m_iFlags = GetFlagsChromaPosition(picture.chroma_position) | GetFlagsColorMatrix(picture.color_space, picture.iWidth, picture.iHeight) | GetFlagsColorPrimaries(picture.color_primaries) | GetFlagsStereoMode(picture.stereoMode); // Calculate the input frame aspect ratio. CalculateFrameAspectRatio(picture.iDisplayWidth, picture.iDisplayHeight); SetViewMode(m_videoSettings.m_ViewMode); ManageRenderArea(); Reset(); m_bConfigured = true; return true; }
bool CWinRenderer::Configure(const VideoPicture &picture, float fps, unsigned int orientation) { m_sourceWidth = picture.iWidth; m_sourceHeight = picture.iHeight; m_renderOrientation = orientation; // need to recreate textures m_NumYV12Buffers = 0; m_iYV12RenderBuffer = 0; // reinitialize the filters/shaders m_bFilterInitialized = false; m_fps = fps; m_iFlags = GetFlagsChromaPosition(picture.chroma_position) | GetFlagsColorMatrix(picture.color_space, picture.iWidth, picture.iHeight) | GetFlagsColorPrimaries(picture.color_primaries) | GetFlagsStereoMode(picture.stereoMode); m_srcPrimaries = GetSrcPrimaries(static_cast<AVColorPrimaries>(picture.color_primaries), picture.iWidth, picture.iHeight); m_format = picture.videoBuffer->GetFormat(); if (m_format == AV_PIX_FMT_D3D11VA_VLD) { DXVA::CDXVAOutputBuffer *dxvaBuf = static_cast<DXVA::CDXVAOutputBuffer*>(picture.videoBuffer); m_dxva_format = dxvaBuf->format; } // calculate the input frame aspect ratio CalculateFrameAspectRatio(picture.iDisplayWidth, picture.iDisplayHeight); SetViewMode(m_videoSettings.m_ViewMode); ManageRenderArea(); SelectRenderMethod(); m_bConfigured = true; // load 3DLUT ColorManagmentUpdate(); return true; }