Skip to content

Commit

Permalink
feat: Add openrpc changes based on the requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
satlead committed Apr 5, 2024
1 parent 30746c8 commit c7935cb
Show file tree
Hide file tree
Showing 4 changed files with 705 additions and 11 deletions.
59 changes: 59 additions & 0 deletions src/openrpc/audio_output.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
311 changes: 310 additions & 1 deletion src/openrpc/device.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
}
Expand Down
Loading

0 comments on commit c7935cb

Please sign in to comment.