From 2a452f2574cb040bb09ca15be864d26f9417e4bf Mon Sep 17 00:00:00 2001 From: Joe Martin Date: Fri, 7 Jun 2024 16:20:35 -0400 Subject: [PATCH] feat: Add new display properties --- .../specifications/media/media-info.md | 70 +++-- src/openrpc/display.json | 266 +++++++++++++++--- src/schemas/media.json | 19 +- 3 files changed, 295 insertions(+), 60 deletions(-) diff --git a/requirements/specifications/media/media-info.md b/requirements/specifications/media/media-info.md index a4cc50a3e..60383a227 100644 --- a/requirements/specifications/media/media-info.md +++ b/requirements/specifications/media/media-info.md @@ -71,18 +71,21 @@ I want to show an audio/videophile overlay with detailed information: - [3.4. Resolution User-Friendly Name](#34-resolution-user-friendly-name) - [3.5. Video Modes](#35-video-modes) - [3.6. Media HDR Profiles](#36-media-hdr-profiles) - - [3.7. Color Depth](#37-color-depth) - - [3.8 Colorimetry](#38-colorimetry) + - [3.7 Colorimetry](#37-colorimetry) - [4. Device Media Support](#4-device-media-support) - [4.1. Video Format Supported](#41-video-format-supported) - [4.2. Audio Format Supported](#42-audio-format-supported) - [5. Display Properties](#5-display-properties) - [5.1. Supported HDR Profiles](#51-supported-hdr-profiles) - - [5.2. Supported Color Depth](#52-supported-color-depth) + - [5.2. Color Depth](#52-color-depth) - [5.3. Display Size](#53-display-size) - [5.4. Display Resolution](#54-display-resolution) - [5.5. Display Resolution Name](#55-display-resolution-name) - [5.6. Refresh Rate](#56-refresh-rate) + - [5.7. Colorimetry](#57-colorimetry) + - [5.8. Manufacturer](#58-manufacturer) + - [5.9. Product Name](#59-product-name) + - [5.10. Source Physical Address](#510-source-physical-address) - [6. Device Properties](#6-device-properties) - [6.1. Current Video Mode](#61-current-video-mode) - [6.2. Supported Video Modes](#62-supported-video-modes) @@ -213,16 +216,7 @@ The Firebolt `Media` module **MUST** have an `HDRProfile` enumeration: - `sdr` - `unknown` -### 3.7. Color Depth - -The Firebolt `Media` module **MUST** have an `ColorDepth` enumeration: - -- `0` -- `8` -- `10` -- `12` - -### 3.8 Colorimetry +### 3.7 Colorimetry The Firebolt `Media` module **MUST** have an `Colorimetry` enumeration: @@ -231,7 +225,7 @@ The Firebolt `Media` module **MUST** have an `Colorimetry` enumeration: - `BT2020YCC` - `DCI-P3` - `ICtCp` -- `opRGB` (Adobe RGB 1998) +- `opRGB` - `opYCC601` - `sYCC601` - `xvYCC601` @@ -342,9 +336,9 @@ Display.hdrProfiles() //> ["dolbyVision", "hdr10", "hdr10plus", "hlg", "sdr"] ``` -### 5.2. Supported Color Depth +### 5.2. Color Depth -The `Display` module **MUST** have a `colorDepth` method that returns a `Media.ColorDepth` value. +The `Display` module **MUST** have a `colorDepth` method that returns an integer value. If no display is present, a value of zero is returned. @@ -397,6 +391,50 @@ Display.refreshRate() //> 120 ``` +### 5.7. Colorimetry + +The `Display` module **MUST** have a `colorimetry` method that returns the display's supported colorimetry values as an array of `Media.Colorimetry` values. + +If no display is present, an empty array is returned. + +```javascript +Display.colorimetry() +//> ["BT2020RGB", "BT2020YCC", "xvYCC601", "xvYCC709"] +``` + +### 5.8. Manufacturer + +The `Display` module **MUST** have a `manufacturer` method that returns the display's manufacturer. + +If no display is present, an empty string is returned. + +```javascript +Display.manufacturer() +//> "Samsung Electric Company" +``` + +### 5.9. Product Name + +The `Display` module **MUST** have a `productName` method that returns the display's product name / model number. + +If no display is present, an empty string is returned. + +```javascript +Display.productName() +//> "Q80A" +``` + +### 5.10. Source Physical Address + +The `Display` module **MUST** have a `sourcePhysicalAddress` method that returns the display's source physical address. + +If no display is present, an empty string is returned. + +```javascript +Display.sourcePhysicalAddress() +//> "3.0.0.0" +``` + ## 6. Device Properties Apps need to know various aspects of the device, including its media playing capabilities. diff --git a/src/openrpc/display.json b/src/openrpc/display.json index 879165660..2cfa71485 100644 --- a/src/openrpc/display.json +++ b/src/openrpc/display.json @@ -7,9 +7,13 @@ }, "methods": [ { - "name": "size", - "summary": "Get the width and height of the display panel (in centimeters).", + "name": "colorDepth", + "summary": "Get the maximum color depth supported by the display panel.", + "params": [], "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -17,12 +21,55 @@ ] } ], + "result": { + "name": "colorDepth", + "summary": "The color depth supported by the display panel.", + "schema": { + "type": "integer" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": 10 + } + }, + { + "name": "Example with no display", + "params": [], + "result": { + "name": "Default Result", + "value": 0 + } + } + ] + }, + { + "name": "colorimetry", + "summary": "Get all colorimetry values from the display panel.", "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], "result": { - "name": "size", - "summary": "The width and height of the display.", + "name": "colorimetry", + "summary": "The colorimetry values supported by the display panel.", "schema": { - "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/Dimensions" + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/Colorimetry" + } } }, "examples": [ @@ -32,18 +79,64 @@ "result": { "name": "Default Result", "value": [ - 157, - 91 + "BT2020RGB", + "BT2020YCC", + "xvYCC601", + "xvYCC709" ] } } ] }, { - "name": "colorDepth", - "summary": "Get the maximum color depth supported by the display panel.", + "name": "hdrProfiles", + "summary": "Get all HDR profiles supported by the display.", + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], "params": [], + "result": { + "name": "hdrProfiles", + "summary": "An array of all valid HDR profiles that the display supports.", + "schema": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "dolbyVision", + "hdr10", + "hdr10plus", + "hlg" + ] + } + } + ] + }, + { + "name": "manufacturer", + "summary": "Get the manufacturer of the display device.", "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -51,11 +144,12 @@ ] } ], + "params": [], "result": { - "name": "colorDepth", - "summary": "The color depth supported by the display panel.", + "name": "manufacturer", + "summary": "The manufacturer of the display device.", "schema": { - "type": "integer" + "type": "string" } }, "examples": [ @@ -64,15 +158,73 @@ "params": [], "result": { "name": "Default Result", - "value": 10 + "value": "Samsung Electric Company" + } + } + ] + }, + { + "name": "productName", + "summary": "Get the product/model name of the display device.", + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "productName", + "summary": "The product/model name of the display device.", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "Q80A" } + } + ] + }, + { + "name": "refreshRate", + "summary": "Get the native refresh rate of the display device.", + "tags": [ + { + "name": "property:immutable" }, { - "name": "Example with no display", + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "refreshRate", + "summary": "The refresh rate of the display device.", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Default Example", "params": [], "result": { "name": "Default Result", - "value": 0 + "value": 60 } } ] @@ -81,6 +233,9 @@ "name": "resolution", "summary": "Get the resolution of the display device in pixels. Returns a zero value for width and height if no display is present.", "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -122,9 +277,12 @@ ] }, { - "name": "hdrProfiles", - "summary": "Get all HDR profiles supported by the display.", + "name": "resolutionName", + "summary": "Get a user-friendly resolution name of the display device.", "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -134,14 +292,10 @@ ], "params": [], "result": { - "name": "hdrProfiles", - "summary": "An array of all valid HDR profiles that the display supports.", + "name": "resolutionName", + "summary": "The resoltuion name of the display device.", "schema": { - "type": "array", - "items": { - "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" - }, - "minItems": 1 + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/ResolutionName" } }, "examples": [ @@ -150,20 +304,18 @@ "params": [], "result": { "name": "Default Result", - "value": [ - "dolbyVision", - "hdr10", - "hdr10plus", - "hlg" - ] + "value": "uhd" } } ] }, { - "name": "refreshRate", - "summary": "Get the native refresh rate of the display device.", + "name": "size", + "summary": "Get the width and height of the display panel (in centimeters).", "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -173,10 +325,10 @@ ], "params": [], "result": { - "name": "refreshRate", - "summary": "The refresh rate of the display device.", + "name": "size", + "summary": "The width and height of the display.", "schema": { - "type": "number" + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/Dimensions" } }, "examples": [ @@ -185,15 +337,21 @@ "params": [], "result": { "name": "Default Result", - "value": 60 + "value": [ + 157, + 91 + ] } } ] }, { - "name": "resolutionName", - "summary": "Get a user-friendly resolution name of the display device.", + "name": "sourcePhysicalAddress", + "summary": "Get the source physical address of the display device.", "tags": [ + { + "name": "property:immutable" + }, { "name": "capabilities", "x-uses": [ @@ -203,10 +361,10 @@ ], "params": [], "result": { - "name": "resolutionName", - "summary": "The resoltuion name of the display device.", + "name": "sourcePhysicalAddress", + "summary": "The source physical address of the display device.", "schema": { - "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/ResolutionName" + "type": "string" } }, "examples": [ @@ -215,10 +373,32 @@ "params": [], "result": { "name": "Default Result", - "value": "uhd" + "value": "3.0.0.0" } } ] } - ] + ], + "components": { + "schemas": { + "EDIDProperties": { + "description": "Properties of the display", + "type": "object", + "properties": { + "productName": { + "description": "Product name of the display device", + "type": "string" + }, + "manufacturerName": { + "description": "Manufacturer of the display device", + "type": "string" + }, + "sourcePhysicalAddress": { + "description": "Source physical address of the display device", + "type": "string" + } + } + } + } + } } diff --git a/src/schemas/media.json b/src/schemas/media.json index 7ccaef35d..8173530b0 100644 --- a/src/schemas/media.json +++ b/src/schemas/media.json @@ -56,7 +56,7 @@ ] }, "AudioOutputMode": { - "description": "Aaudio output mode", + "description": "Audio output mode", "type": "string", "enum": [ "auto", @@ -68,6 +68,23 @@ "unknown" ] }, + "Colorimetry": { + "description": "Colorimetry", + "type": "string", + "enum": [ + "BT2020cYCC", + "BT2020RGB", + "BT2020YCC", + "DCI-P3", + "ICtCp", + "opRGB", + "opYCC601", + "sYCC601", + "xvYCC601", + "xvYCC709", + "unknown" + ] + }, "Dimensions": { "type": "array", "description": "The dimensions specified as width and height.",