From c7935cbc6be64df9f4c30591c3b9c2311ebff9d1 Mon Sep 17 00:00:00 2001 From: Sathishkumar Deena Kirupakaran Date: Fri, 5 Apr 2024 11:52:45 -0400 Subject: [PATCH] feat: Add openrpc changes based on the requirements --- src/openrpc/audio_output.json | 59 +++++++ src/openrpc/device.json | 311 +++++++++++++++++++++++++++++++++- src/openrpc/display.json | 293 ++++++++++++++++++++++++++++++++ src/openrpc/media-info.json | 53 ++++-- 4 files changed, 705 insertions(+), 11 deletions(-) create mode 100644 src/openrpc/audio_output.json create mode 100644 src/openrpc/display.json diff --git a/src/openrpc/audio_output.json b/src/openrpc/audio_output.json new file mode 100644 index 000000000..4eb8bc665 --- /dev/null +++ b/src/openrpc/audio_output.json @@ -0,0 +1,59 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Display", + "description": "A module for query info about e current (or built in) display on a device", + "version": "0.0.0" + }, + "methods": [ + { + "name": "mode", + "summary": "Get the Audio mode supported by the platform.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:audio-output:info" + ] + } + ], + "params": [], + "result": { + "name": "audioMode", + "summary": "Get the Audio mode supported by the platform.", + "schema": { + "$ref": "#/components/schemas/AudioOutput" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "Stereo" + } + } + ] + } + ], + "components": { + "schemas": { + "AudioOutput": { + "title": "AudioOutput", + "type": "string", + "enum": [ + "Mono", + "Stereo", + "Surround", + "Passthrough", + "Auto", + "StereoSurroundMatFollow", + "Unknown", + "None" + ], + "description": "The audio output supported by the platform" + } + } + } +} \ No newline at end of file diff --git a/src/openrpc/device.json b/src/openrpc/device.json index dc0031397..00fa53711 100644 --- a/src/openrpc/device.json +++ b/src/openrpc/device.json @@ -308,7 +308,7 @@ }, "os": { "$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion", - "description": "**Deprecated** Use `firmware`, instead." + "description": "**Deprecated** Use firmware instead" }, "debug": { "type": "string", @@ -544,6 +544,239 @@ } ] }, + { + "name": "videoFormatSupported", + "summary": "Get the supported video formats", + "params": [ + { + "name": "format", + "summary": "Video Format to check if it is supported by platform", + "required": true, + "schema": { + "$ref": "#/components/schemas/VideoFormat" + } + }, + { + "name": "resolution", + "summary": "Video Resolution to check if it is supported by platform", + "schema": { + "$ref": "#/components/schemas/VideoFormatResolution" + } + } + ], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoFormatSupported", + "summary": "Video Format and Resolution support", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the video format", + "params": [ + { + "name": "format", + "value": "av1" + }, + { + "name": "resolution", + "value": "1080i" + } + ], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "videoFormatPossible", + "summary": "Get the possible video formats", + "params": [ + { + "name": "format", + "summary": "Video Format to check if it is possible by platform regardless of the configuration", + "required": true, + "schema": { + "$ref": "#/components/schemas/VideoFormat" + } + }, + { + "name": "resolution", + "summary": "Video Resolution to check if it is possible by platform", + "schema": { + "$ref": "#/components/schemas/VideoFormatResolution" + } + } + ], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoFormatPossible", + "summary": "Video Format and Resolution support", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the video format", + "params": [ + { + "name": "format", + "value": "av1" + }, + { + "name": "resolution", + "value": "1080i" + } + ], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "audioFormatSupported", + "summary": "Check the supported audio formats", + "params": [ + { + "name": "format", + "summary": "Audio Format to check if it is supported by platform", + "required": true, + "schema": { + "$ref": "#/components/schemas/AudioFormat" + } + }, + { + "name": "channels", + "summary": "Channels is the output medium for the Audio", + "schema": { + "$ref": "#/components/schemas/AudioChannels" + } + } + ], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "audioFormatSupported", + "summary": "Audio Format and Channel support", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the Audio format and channel format", + "params": [ + { + "name":"format", + "value": "aac" + }, + { + "name": "channels", + "value": "mono" + } + ], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "audioFormatPossible", + "summary": "Check the possible video formats", + "params": [ + { + "name": "format", + "summary": "Audio Format to check if it is possible irrespective of the configuration in the platform", + "required": true, + "schema": { + "$ref": "#/components/schemas/AudioFormat" + } + }, + { + "name": "channels", + "summary": "Channels is the output medium for the Audio", + "schema": { + "$ref": "#/components/schemas/AudioChannels" + } + } + ], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "audioFormatPossible", + "summary": "Audio Format and Channel support", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the Audio format and channel format", + "params": [ + { + "name": "format", + "value": "aac" + }, + { + "name": "channels", + "value": "mono" + } + ], + + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, { "name": "name", "summary": "The human readable name of the device", @@ -805,6 +1038,82 @@ } } ] + }, + "VideoFormat": { + "title": "VideoFormat", + "type": "string", + "enum": [ + "av1", + "dolbyVision", + "h263", + "h264", + "h265", + "h265M10", + "mpeg", + "vp8", + "vp9", + "vp9_p2", + "vp10", + "vc1" + ], + "description": "The video format supported by the platform" + }, + "VideoFormatResolution": { + "title": "VideoFormatResolution", + "type": "string", + "enum": [ + "480i", + "480p", + "576i", + "576p", + "576p50", + "720p", + "720p50", + "1080i", + "1080p", + "1080p24", + "1080i25", + "1080p30", + "1080i50", + "1080p50", + "1080p60", + "2160p30", + "2160p50", + "2160p60" + ] + }, + "AudioFormat": { + "title": "AudioFormat", + "type": "string", + "enum": [ + "AAC", + "AC3", + "AC4", + "DOLBY_MAT", + "DTS", + "DTS_X", + "EAC3", + "MPEG", + "MPEG1", + "MPEG2", + "MPEG4", + "OPUS", + "OGG", + "TRUEHD", + "WAV" + ], + "description": "The audio format supported by the platform" + }, + "AudioChannels": { + "title": "AudioChannels", + "type": "string", + "enum": [ + "MONO", + "STEREO", + "SURROUND", + "SURROUND_7_1" + ], + "description": "The audio channels supported by the platform" } } } diff --git a/src/openrpc/display.json b/src/openrpc/display.json new file mode 100644 index 000000000..d907b9c71 --- /dev/null +++ b/src/openrpc/display.json @@ -0,0 +1,293 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Display", + "description": "A module for query info about e current (or built in) display on a device", + "version": "0.0.0" + }, + "methods": [ + { + "name": "width", + "summary": "Get the width of the display in centimeters.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "width", + "summary": "Width of the display device in centimeters", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": 2166 + } + } + ] + }, + { + "name": "height", + "summary": "Get the height of the display in centimeters.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "height", + "summary": "Height of the display device in centimeters", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": 1980 + } + } + ] + }, + { + "name": "currentResolution", + "summary": "Get the current resolution of the display device.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "height", + "summary": "Height of the display device in centimeters", + "schema": { + "$ref": "#/components/schemas/DisplayResolution" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "1080p24" + } + } + ] + }, + { + "name": "optimalResolution", + "summary": "Get the optimal resolution of the display device.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "resolution", + "summary": "Height of the display device in centimeters", + "schema": { + "$ref": "#/components/schemas/DisplayResolution" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "2160p60" + } + } + ] + }, + { + "name": "supportedResolutions", + "summary": "Returns an array of valid resolutions that the display supports", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "resolution", + "summary": "An array of valid resolutions that the display supports", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DisplayResolution" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "1080p24", + "1080i25", + "1080p30", + "1080i50", + "1080p50", + "1080p60", + "2160p30", + "2160p50", + "2160p60" + ] + } + } + ] + }, + { + "name": "hdr", + "summary": "Returns an array of valid HDR profiles that the display supports", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [ + { + "name": "resolution", + "summary": "Video Resolution include only HDR profiles that are supported by that resolution", + "schema": { + "$ref": "#/components/schemas/VideoFormatResolution" + } + } + ], + "result": { + "name": "resolution", + "summary": "An array of valid HDR profiles that the display supports", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HdrProfile" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "resolution", + "value": "1080p" + } + ], + "result": { + "name": "Default Result", + "value": [ + "1080p24", + "1080i25", + "1080p30", + "1080i50", + "1080p50", + "1080p60", + "2160p30", + "2160p50", + "2160p60" + ] + } + } + ] + }, + { + "name": "useSourceFrameRate", + "summary": "Get the hdmi output frame rate is set to follow video source frame rate.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "useSourceFrameRate", + "summary": "Get the hdmi output frame rate is set to follow video source frame rate", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + } + ], + "components": { + "schemas": { + "DisplayResolution": { + "title": "DisplayResolution", + "type": "string", + "enum": [ + "1080p24", + "1080i25", + "1080p30", + "1080i50", + "1080p50", + "1080p60", + "2160p30", + "2160p50", + "2160p60" + ], + "description": "The list of resolutions supported by platform" + }, + "HdrProfile": { + "title": "HdrProfile", + "type": "string", + "enum": [ + "DolbyVision", + "Hdr10", + "Hdr10Plus", + "St2084", + "hlg" + ], + "description": "The list of HDR profiles supported by platform" + } + } + } +} \ No newline at end of file diff --git a/src/openrpc/media-info.json b/src/openrpc/media-info.json index e0af6f49f..eca7edee0 100644 --- a/src/openrpc/media-info.json +++ b/src/openrpc/media-info.json @@ -2,7 +2,7 @@ "openrpc": "1.2.4", "info": { "title": "MediaInfo", - "description": "A module for query info about the the current media.", + "description": "A module for query info about the media currently being played by the app.", "version": "0.0.0" }, "methods": [ @@ -24,19 +24,17 @@ ], "params": [ { - "name": "sessionId", + "name": "pipeline", "schema": { "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 15 + "default": 1 }, "required": true } ], "result": { - "name": "codec", - "summary": "the codec", + "name": "Video codec", + "summary": "Video codec for the pipeline.", "schema": { "$ref": "#/components/schemas/VideoCodec" } @@ -46,8 +44,8 @@ "name": "Default Example", "params": [ { - "name": "sessionId", - "value": 0 + "name": "pipeline", + "value": 1 } ], "result": { @@ -106,7 +104,7 @@ } } ] - }, + }, { "name": "dynamicRangeProfile", "summary": "Get the High Dynamic Range (HDR) profile of the specified media session.", @@ -275,6 +273,41 @@ "unknown", "none" ] + }, + "MimeType": { + "type": "string", + "description": "Enumeration of possible Mimetypes.", + "enum": [ + "audio/mp4a-latm", + "audio/ac3", + "audio/ac4", + "audio/vnd.dolby.mat", + "audio/vnd.dts", + "audio/vnd.dts.uhd;profile=p2", + "audio/eac3", + "audio/mpeg", + "audio/mpeg-L1", + "audio/mpeg-L2", + "audio/mp4", + "audio/opus", + "audio/ogg", + "audio/true-hd", + "audio/wav", + "video/av01", + "video/dolbyVision", + "video/3gpp", + "video/avc", + "video/hevc", + "video/hevc;profile=main10", + "video/mpeg", + "video/x-vnd.on2.vp8", + "video/x-vnd.on2.vp9", + "video/x-vnd.on2.vp9;profile=p2", + "video/x-vnd.on2.vp10", + "video/wvc1", + "unknown", + "none" + ] } } }