Skip to content

Commit

Permalink
fix: Rename hdrProfile to hdrFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
alkalinecoffee committed Aug 19, 2024
1 parent 30eaac3 commit 2f05618
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 82 deletions.
50 changes: 25 additions & 25 deletions requirements/specifications/media/media-capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ I want to show an audio/videophile overlay with detailed information:
- [3.2. Dimensions](#32-dimensions)
- [3.3. Resolution User-Friendly Name](#33-resolution-user-friendly-name)
- [3.4. Video Modes](#34-video-modes)
- [3.5. HDR Profiles](#35-hdr-profiles)
- [3.5. HDR Formats](#35-hdr-formats)
- [3.6. Colorimetry](#36-colorimetry)
- [3.7. Color Depth](#37-color-depth)
- [3.8. Color Space \& Chroma Subsampling](#38-color-space--chroma-subsampling)
Expand All @@ -80,10 +80,10 @@ I want to show an audio/videophile overlay with detailed information:
- [4.3. Supported Audio Codecs](#43-supported-audio-codecs)
- [4.4. Supported Video Codecs](#44-supported-video-codecs)
- [4.5. Color Depth](#45-color-depth)
- [4.6. HDR Profiles](#46-hdr-profiles)
- [4.6. HDR Formats](#46-hdr-formats)
- [4.7. Atmos Supported](#47-atmos-supported)
- [5. Display Support](#5-display-support)
- [5.1. HDR Profiles](#51-hdr-profiles)
- [5.1. HDR Formats](#51-hdr-formats)
- [5.2. Color Depth](#52-color-depth)
- [5.3. Display Size](#53-display-size)
- [5.4. Native Resolution](#54-native-resolution)
Expand All @@ -96,12 +96,12 @@ I want to show an audio/videophile overlay with detailed information:
- [7. Video Output](#7-video-output)
- [7.1. Mode](#71-mode)
- [7.2. Resolution](#72-resolution)
- [7.3. HDR Profile](#73-hdr-profile)
- [7.3. HDR Format](#73-hdr-format)
- [7.4. Color Depth](#74-color-depth)
- [7.5. Colorimetry](#75-colorimetry)
- [7.6. Color Space \& Chroma Subsampling](#76-color-space--chroma-subsampling)
- [7.7. Quantization Range](#77-quantization-range)
- [7.8. Current Output Settings](#78-current-output-settings)
- [7.8. Current Output Properties](#78-current-output-properties)

## 3. Constants, Types, and Schemas

Expand Down Expand Up @@ -188,15 +188,14 @@ The Firebolt `Media` module **MUST** have a `VideoMode` enumeration:

Any methods relating to the video mode (such as a device's video output mode) **MUST** return `Media.VideoMode` values.

### 3.5. HDR Profiles
### 3.5. HDR Formats

The Firebolt `Media` module **MUST** have an `HDRProfile` enumeration:
The Firebolt `Media` module **MUST** have an `HDRFormat` enumeration:

- `dolbyVision`
- `hdr10`
- `hdr10plus`
- `hlg`
- `sdr`
- `technicolor`
- `unknown`

Expand Down Expand Up @@ -347,14 +346,14 @@ MediaCapabilities.colorDepth()
//> 10
```

### 4.6. HDR Profiles
### 4.6. HDR Formats

The `MediaCapabilities` module **MUST** have an `hdrProfiles` method that returns an array of `Media.HDRProfile` values describing the HDR capabilities commonly supported across all relevant peripherals in the user's AV chain.
The `MediaCapabilities` module **MUST** have an `hdrFormats` method that returns an array of `Media.HDRFormat` values describing the HDR capabilities commonly supported across all relevant peripherals in the user's AV chain.

Access to this method **MUST** require the `use` role of the `xrn:firebolt:capability:media-capabilities:info` capability.

```javascript
MediaCapabilities.hdrProfiles()
MediaCapabilities.hdrFormats()
//> ["dolbyVision", "hdr10", "hdr10plus", "hlg"]
```

Expand All @@ -375,16 +374,16 @@ Apps need to know various aspects of the current (or built-in) video output prop

These will be surfaced in the `Display` module.

### 5.1. HDR Profiles
### 5.1. HDR Formats

The `Display` module **MUST** have an `hdrProfiles` method that returns an array of `Media.HDRProfile` values describing the display's supported HDR profiles.
The `Display` module **MUST** have an `hdrFormats` method that returns an array of `Media.HDRFormat` values describing the display's supported HDR formats.

If no display is present, a JSON-RPC error response of `{"code": -40400, "message": "No display connected"}` **MUST** be returned.

Access to this method **MUST** require the `use` role of the `xrn:firebolt:capability:display:info` capability.

```javascript
Display.hdrProfiles()
Display.hdrFormats()
//> ["dolbyVision", "hdr10", "hdr10plus", "hlg"]
```

Expand Down Expand Up @@ -532,16 +531,17 @@ VideoOutput.resolution()
//> { "width": 1920, "height": 1080 }
```

### 7.3. HDR Profile
### 7.3. HDR Format

The `VideoOutput` module **MUST** have an `hdrProfile` method that returns a `Media.HDRProfile` value describing the HDR profile currently set for video output.
The `VideoOutput` module **MUST** have an `hdrFormat` method that returns a `Media.HDRFormat` value describing the HDR format currently set for video output.

This method **MUST** have a corresponding `onHdrProfileChanged` event to notify listeners after this property has changed and that change has taken effect.
If no HDR format is used (only SDR )
This method **MUST** have a corresponding `onHdrFormatChanged` event to notify listeners after this property has changed and that change has taken effect.

Access to these methods **MUST** require the `use` role of the `xrn:firebolt:capability:video-output:hdrprofile` capability.
Access to these methods **MUST** require the `use` role of the `xrn:firebolt:capability:video-output:hdrformat` capability.

```javascript
VideoOutput.hdrProfile()
VideoOutput.hdrFormat()
//> "hdr10plus"
```

Expand Down Expand Up @@ -593,9 +593,9 @@ VideoOutput.quantizationRange()
//> "limited"
```

### 7.8. Current Output Settings
### 7.8. Current Output Properties

The `VideoOutput` module **MUST** have a `currentSettings` method that returns an object describing various properties currently used for video output.
The `VideoOutput` module **MUST** have a `properties` method that returns an object describing various properties currently used for video output.

This method **MUST** return the following properties:

Expand All @@ -605,23 +605,23 @@ This method **MUST** return the following properties:
| `colorimetry` | `Media.Colorimetry` |
| `colorSpace` | `Media.ColorSpace` |
| `frameRate` | `number` |
| `hdrProfile` | `Media.HDRProfile` |
| `hdrFormat` | `Media.HDRFormat` |
| `mode` | `Media.VideoMode` |
| `quantizationRange` | `VideoOutput.QuantizationRange` |
| `resolution` | `Types.Dimensions` |

Access to this method **MUST** be governed by the `xrn:firebolt:capability:video-output:info` capability.

This method **MUST** have a corresponding `onCurrentSettingsChanged` event to notify listeners after any of the specified output properties have changed and that those changes have taken effect.
This method **MUST** have a corresponding `onPropertiesChanged` event to notify listeners after any of the specified output properties have changed and that those changes have taken effect.

```javascript
VideoOutput.currentSettings()
VideoOutput.properties()
//> {
//> "colorDepth": "10",
//> "colorimetry": "BT2020YCC",
//> "colorSpace": "YCbCr422",
//> "frameRate": 60,
//> "hdrProfile": "hdr10plus",
//> "hdrFormat": "hdr10plus",
//> "mode": "1080p60",
//> "quantizationRange": "limited",
//> "resolution": { "width": 1920, "height": 1080 }
Expand Down
45 changes: 28 additions & 17 deletions src/openrpc/device.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
},
{
"name": "hdr",
"summary": "Returns an array of valid HDR profiles that the device supports",
"summary": "Returns an array of valid HDR formats that the device supports",
"tags": [
{
"name": "property:readonly"
Expand All @@ -490,13 +490,13 @@
{
"name": "deprecated",
"x-since": "1.2.0",
"x-alternative": "MediaCapabilies.hdrProfiles()"
"x-alternative": "MediaCapabilies.hdrFormats()"
}
],
"params": [],
"result": {
"name": "hdr",
"summary": "The supported HDR profiles",
"summary": "The supported HDR formats",
"schema": {
"$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap"
}
Expand Down Expand Up @@ -557,7 +557,7 @@
},
{
"name": "screenResolution",
"summary": "The width and height of the current screen resolution.",
"summary": "The resolution of the current application's graphical/virtual surface, in pixels.",
"tags": [
{
"name": "property:readonly"
Expand Down Expand Up @@ -597,7 +597,7 @@
},
{
"name": "videoResolution",
"summary": "The width and height of the current video output resolution",
"summary": "The maximum video resolution supported by the currently connected display and device, in pixels.",
"tags": [
{
"name": "property:readonly"
Expand Down Expand Up @@ -804,18 +804,29 @@
]
},
"Resolution": {
"type": "array",
"items": [
{
"type": "integer"
},
{
"type": "integer"
}
],
"additionalItems": false,
"minItems": 2,
"maxItems": 2
"description": "The supported resolutions",
"enum": [
[
720,
480
],
[
720,
576
],
[
1280,
720
],
[
1920,
1080
],
[
3840,
2160
]
]
}
}
}
Expand Down
18 changes: 13 additions & 5 deletions src/openrpc/display.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
]
},
{
"name": "hdrProfiles",
"summary": "The display's supported HDR profiles.",
"name": "hdrFormats",
"summary": "The display's supported HDR formats.",
"tags": [
{
"name": "capabilities",
Expand All @@ -97,12 +97,12 @@
],
"params": [],
"result": {
"name": "hdrProfiles",
"summary": "An array of all HDR profiles supported by the display.",
"name": "hdrFormats",
"summary": "An array of all HDR formats supported by the display.",
"schema": {
"type": "array",
"items": {
"$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile"
"$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRFormat"
}
}
},
Expand All @@ -125,6 +125,14 @@
"hlg"
]
}
},
{
"name": "Non-HDR (SDR) Example",
"params": [],
"result": {
"name": "Default Result",
"value": []
}
}
]
},
Expand Down
18 changes: 13 additions & 5 deletions src/openrpc/media_capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@
]
},
{
"name": "hdrProfiles",
"summary": "The HDR profiles commonly supported by the device and its connected video peripherals.",
"name": "hdrFormats",
"summary": "The HDR formats commonly supported by the device and its connected video peripherals.",
"tags": [
{
"name": "capabilities",
Expand All @@ -208,12 +208,12 @@
],
"params": [],
"result": {
"name": "hdrProfiles",
"summary": "The supported HDR profiles",
"name": "hdrFormats",
"summary": "The supported HDR formats",
"schema": {
"type": "array",
"items": {
"$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile"
"$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRFormat"
}
}
},
Expand All @@ -229,6 +229,14 @@
"hlg"
]
}
},
{
"name": "Device connected to an SDR (non-HDR) display",
"params": [],
"result": {
"name": "Default Result",
"value": []
}
}
]
},
Expand Down
Loading

0 comments on commit 2f05618

Please sign in to comment.