From ddbe193c3e7ad64123f01ab8e438ef67ebcf1d09 Mon Sep 17 00:00:00 2001 From: N-Nagorny Date: Sat, 1 Jul 2023 02:14:10 +0400 Subject: [PATCH 1/3] Add "adjust_to_caps" query parameter --- APIs/StreamCompatibilityManagementAPI.raml | 8 ++++++++ APIs/schemas/input.json | 4 ++++ docs/Behaviour - Server Side.md | 10 ++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/APIs/StreamCompatibilityManagementAPI.raml b/APIs/StreamCompatibilityManagementAPI.raml index b3b6eec..fee6c8e 100644 --- a/APIs/StreamCompatibilityManagementAPI.raml +++ b/APIs/StreamCompatibilityManagementAPI.raml @@ -293,6 +293,14 @@ mediaType: application/json 403: put: description: Set Base EDID + queryParameters: + adjust_to_caps: + description: > + If true, the Input is allowed to adjust Base EDID to internal capabilities. + If omitted for an Input that supports it, the previous value is preserved. + type: boolean + required: false + example: adjust_to_caps=true body: application/octet-stream: type: file diff --git a/APIs/schemas/input.json b/APIs/schemas/input.json index 0d915fb..11b1b7d 100644 --- a/APIs/schemas/input.json +++ b/APIs/schemas/input.json @@ -15,6 +15,10 @@ "device_id" ], "properties": { + "adjust_to_caps": { + "description": "Whether the Input is configured to adjust Base EDID to internal capabilities. The property exists if the Input supports this feature", + "type": "boolean" + }, "base_edid_support": { "description": "Whether the Input supports Base EDID", "type": "boolean" diff --git a/docs/Behaviour - Server Side.md b/docs/Behaviour - Server Side.md index 719cd28..490205e 100644 --- a/docs/Behaviour - Server Side.md +++ b/docs/Behaviour - Server Side.md @@ -86,13 +86,19 @@ The `/properties` endpoint shows properties of the Input. An Input MAY support Base EDID and MUST indicate it via `base_edid_support` property. The API documentation reflects how responses from `/edid/base` depend on this property. +Inputs that support Base EDID MAY additionally support adjusting Base EDID to internal capabilities (e.g. capabilities of an Input itself and Senders associated with this Input) via `adjust_to_caps` query parameter of a `PUT /edid/base` request. An Input MUST indicate support of `adjust_to_caps` query parameter via `adjust_to_caps` property presence in `GET /properties` responses. + There is no Base EDID at the initial state. If the Base EDID for an Input changes, then all Senders associated with this Input MUST update their versions (in registered mode this MUST update the registered resources). ### Effective EDID -Effective EDID is such combination of Base EDID and Active Constraints of all Senders associated with this Input that the baseband signal from the Input can be transmitted by the Senders without breaking Active Constraints. +If Active Constraints of all Senders associated with this Input are empty and `adjust_to_caps` is equal to `false` or not supported, the Effective EDID is equal to the Base EDID. + +If Active Constraints of all Senders associated with this Input are empty and `adjust_to_caps` is equal to `true`, the Effective EDID is a combination of the Base EDID and the internal capabilities. + +If Active Constraints of at least one Sender associated with this Input are not empty, the Effective EDID is such combination of the Base EDID, internal capabilities and Active Constraints of all Senders associated with this Input that the baseband signal from the Input can be transmitted by the Senders without breaking Active Constraints. -If Base EDID is not set, Effective EDID is built on the basis of a default EDID defined for the Input by the manufacturer. +If the Base EDID is not set, the Effective EDID is built on the basis of a default EDID defined for the Input by the manufacturer. The `/edid/effective` endpoint allows a client to download the Effective EDID if it exists. If the Effective EDID for the Input changes and it is associated with any Senders, then all of the Senders in question MUST update their versions (in registered mode this MUST update the registered resources). From 0416cde2858796528ea23d3138cb836d305dc319 Mon Sep 17 00:00:00 2001 From: N-Nagorny Date: Mon, 24 Jul 2023 16:53:26 +0400 Subject: [PATCH 2/3] Apply suggestions from code review --- docs/Behaviour - Server Side.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Behaviour - Server Side.md b/docs/Behaviour - Server Side.md index 490205e..ddde533 100644 --- a/docs/Behaviour - Server Side.md +++ b/docs/Behaviour - Server Side.md @@ -94,9 +94,9 @@ There is no Base EDID at the initial state. If the Base EDID for an Input change If Active Constraints of all Senders associated with this Input are empty and `adjust_to_caps` is equal to `false` or not supported, the Effective EDID is equal to the Base EDID. -If Active Constraints of all Senders associated with this Input are empty and `adjust_to_caps` is equal to `true`, the Effective EDID is a combination of the Base EDID and the internal capabilities. +If Active Constraints of all Senders associated with this Input are empty and `adjust_to_caps` is supported and equal to `true`, the Effective EDID is a combination of the Base EDID and the internal capabilities. -If Active Constraints of at least one Sender associated with this Input are not empty, the Effective EDID is such combination of the Base EDID, internal capabilities and Active Constraints of all Senders associated with this Input that the baseband signal from the Input can be transmitted by the Senders without breaking Active Constraints. +If Active Constraints of at least one Sender associated with this Input are not empty, the Effective EDID is a combination of the Base EDID, internal capabilities and Active Constraints of all Senders associated with this Input such that the baseband signal from the Input can be transmitted by the Senders without breaking Active Constraints. If the Base EDID is not set, the Effective EDID is built on the basis of a default EDID defined for the Input by the manufacturer. From 49a62d311d515695754ea0022b17d3cb7acda7c4 Mon Sep 17 00:00:00 2001 From: N-Nagorny Date: Mon, 24 Jul 2023 17:19:53 +0400 Subject: [PATCH 3/3] Improve "adjust_to_caps" query param description. --- APIs/StreamCompatibilityManagementAPI.raml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/APIs/StreamCompatibilityManagementAPI.raml b/APIs/StreamCompatibilityManagementAPI.raml index fee6c8e..80cb844 100644 --- a/APIs/StreamCompatibilityManagementAPI.raml +++ b/APIs/StreamCompatibilityManagementAPI.raml @@ -296,11 +296,13 @@ mediaType: application/json queryParameters: adjust_to_caps: description: > - If true, the Input is allowed to adjust Base EDID to internal capabilities. - If omitted for an Input that supports it, the previous value is preserved. + Sets the value of "adjust_to_caps" Input's property. + If omitted, the value of the property is preserved. + If an implementation doesn't support the property, + this query parameter is always ignored. type: boolean required: false - example: adjust_to_caps=true + example: true body: application/octet-stream: type: file