From aa7cd84f7c4273119c74012784d5ab5a83b28445 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Fri, 19 Jan 2024 19:21:58 +0100 Subject: [PATCH] output: Introduce the RGB range property Part-of: --- src/backends/meta-output.c | 10 ++++++++++ src/backends/meta-output.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/backends/meta-output.c b/src/backends/meta-output.c index 9f915ddcb..cfe19fdfd 100644 --- a/src/backends/meta-output.c +++ b/src/backends/meta-output.c @@ -74,6 +74,7 @@ typedef struct _MetaOutputPrivate MetaOutputHdrMetadata hdr_metadata; MetaOutputColorspace color_space; + MetaOutputRGBRange rgb_range; } MetaOutputPrivate; G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaOutput, meta_output, G_TYPE_OBJECT) @@ -640,6 +641,14 @@ meta_output_peek_hdr_metadata (MetaOutput *output) return &priv->hdr_metadata; } +MetaOutputRGBRange +meta_output_peek_rgb_range (MetaOutput *output) +{ + MetaOutputPrivate *priv = meta_output_get_instance_private (output); + + return priv->rgb_range; +} + static void meta_output_init (MetaOutput *output) { @@ -653,6 +662,7 @@ meta_output_init (MetaOutput *output) priv->hdr_metadata.active = FALSE; priv->has_max_bpc = FALSE; priv->max_bpc = 0; + priv->rgb_range = META_OUTPUT_RGB_RANGE_AUTO; } static void diff --git a/src/backends/meta-output.h b/src/backends/meta-output.h index 79cde47af..075c22d6a 100644 --- a/src/backends/meta-output.h +++ b/src/backends/meta-output.h @@ -271,6 +271,8 @@ void meta_output_set_hdr_metadata (MetaOutput *output, MetaOutputHdrMetadata * meta_output_peek_hdr_metadata (MetaOutput *output); +MetaOutputRGBRange meta_output_peek_rgb_range (MetaOutput *output); + void meta_output_add_possible_clone (MetaOutput *output, MetaOutput *possible_clone);