From 5d7469d23e45bbc69b0d059610d2a118c72919a1 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 27 Oct 2023 01:19:46 +1100 Subject: [PATCH] [host] linux: fix build with new HDR changes (untested) --- host/platform/Linux/capture/pipewire/src/pipewire.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/host/platform/Linux/capture/pipewire/src/pipewire.c b/host/platform/Linux/capture/pipewire/src/pipewire.c index 3383dfac..25e79ff4 100644 --- a/host/platform/Linux/capture/pipewire/src/pipewire.c +++ b/host/platform/Linux/capture/pipewire/src/pipewire.c @@ -49,6 +49,8 @@ struct pipewire bool formatChanged; int width, height; CaptureFormat format; + bool hdr; + bool hdrPQ; uint8_t * frameData; unsigned int formatVer; }; @@ -153,7 +155,7 @@ static CaptureFormat convertSpaFormat(enum spa_video_format spa) return CAPTURE_FMT_BGRA; case SPA_VIDEO_FORMAT_xBGR_210LE: - return CAPTURE_FMT_RGBA10_HDR; + return CAPTURE_FMT_RGBA10; case SPA_VIDEO_FORMAT_RGBA_F16: return CAPTURE_FMT_RGBA16F; @@ -185,6 +187,10 @@ static void streamParamChangedCallback(void * opaque, uint32_t id, this->width = info.size.width; this->height = info.size.height; this->format = convertSpaFormat(info.format); + this->hdr = info.format & ( + SPA_VIDEO_FORMAT_xBGR_210LE | + SPA_VIDEO_FORMAT_RGBA_F16); + this->hdrPQ = true; // this is assumed and untested if (this->hasFormat) { @@ -426,6 +432,8 @@ static CaptureResult pipewire_waitFrame(CaptureFrame * frame, frame->formatVer = this->formatVer; frame->format = this->format; + frame->hdr = this->hdr; + frame->hdrPQ = this->hdrPQ; frame->screenWidth = this->width; frame->screenHeight = this->height; frame->frameWidth = this->width;