Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Linux: New DRM/KMS screen grabber with plane-based capture - not feature complete yet
- Logging/Tracing: Introduced qlogging categories to enable dynamic tracing
- Home Assistant: Dynamically set brightness for higher dynamic range (#1922)
- Add DRM_FORMAT_RGB565 format to DRM frame grabber

---

Expand Down
8 changes: 8 additions & 0 deletions libsrc/grabber/drm/DRMFrameGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ static PixelFormat GetPixelFormatForDrmFormat(uint32_t format)
{
switch (format)
{
#ifdef DRM_FORMAT_RGB565
case DRM_FORMAT_RGB565: return PixelFormat::BGR16;
#endif
case DRM_FORMAT_XRGB8888: return PixelFormat::BGR32;
case DRM_FORMAT_ARGB8888: return PixelFormat::BGR32;
case DRM_FORMAT_XBGR8888: return PixelFormat::RGB32;
Expand Down Expand Up @@ -258,6 +261,11 @@ static bool processLinearFramebuffer(const LinearFramebufferParams& params)
lineLength = params.w * 2; // 16bpp luma
}
#endif
else if (params.pixelFormat == PixelFormat::BGR16)
{
size = params.w * params.h * 2;
lineLength = params.w * 2;
}
else if (params.pixelFormat == PixelFormat::RGB32 || params.pixelFormat == PixelFormat::BGR32)
{
size = params.w * params.h * 4;
Expand Down
Loading