Allow primary planes to be overlays for video underlays
This commit is contained in:
parent
a3237b741c
commit
8aec35a650
1 changed files with 10 additions and 4 deletions
|
|
@ -806,10 +806,16 @@ bool DrmRenderer::initialize(PDECODER_PARAMETERS params)
|
||||||
}
|
}
|
||||||
|
|
||||||
DrmPropertyMap props { m_DrmFd, planeRes->planes[i], DRM_MODE_OBJECT_PLANE };
|
DrmPropertyMap props { m_DrmFd, planeRes->planes[i], DRM_MODE_OBJECT_PLANE };
|
||||||
// Only consider overlay planes as valid targets
|
// Only consider overlay or primary planes as valid targets
|
||||||
if (auto type = props.property("type"); type->initialValue() != DRM_PLANE_TYPE_OVERLAY) {
|
// The latter might seem strange, but some DRM devices use
|
||||||
drmModeFreePlane(plane);
|
// underlays where the YUV-compatible overlay plane resides
|
||||||
continue;
|
// underneath the primary plane. In this case, we will use
|
||||||
|
// the primary plane as an overlay plane on top of the video.
|
||||||
|
if (auto type = props.property("type"))
|
||||||
|
if (type->initialValue() != DRM_PLANE_TYPE_OVERLAY && type->initialValue() != DRM_PLANE_TYPE_PRIMARY) {
|
||||||
|
drmModeFreePlane(plane);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The overlay plane must support ARGB8888
|
// The overlay plane must support ARGB8888
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue