From ee38d029446d5f95f8132fea6f448d0a3c473735 Mon Sep 17 00:00:00 2001 From: Joe Martin Date: Tue, 7 May 2024 15:11:04 -0400 Subject: [PATCH] some additional cleanup --- src/openrpc/device.json | 191 +++++++----- src/openrpc/display.json | 138 +++------ src/openrpc/media_info.json | 595 +++++++++++++++++++++++++++++++----- src/schemas/media.json | 65 ++-- 4 files changed, 722 insertions(+), 267 deletions(-) diff --git a/src/openrpc/device.json b/src/openrpc/device.json index e5eab7860..9dd15bda0 100644 --- a/src/openrpc/device.json +++ b/src/openrpc/device.json @@ -295,19 +295,19 @@ "type": "object", "properties": { "sdk": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion", + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/SemanticVersion", "description": "The Firebolt SDK version" }, "api": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion", + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/SemanticVersion", "description": "The lateset Firebolt API version supported by the curent device." }, "firmware": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion", + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/SemanticVersion", "description": "The device firmware version." }, "os": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion", + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/SemanticVersion", "description": "**Deprecated** Use firmware instead" }, "debug": { @@ -383,7 +383,7 @@ "name": "supportedHdcpVersions", "summary": "the supported HDCP versions", "schema": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap" + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/BooleanMap" } }, "examples": [ @@ -483,14 +483,14 @@ { "name": "deprecated", "x-since": "1.2.0", - "x-alternative": "Discovery.contentAccess()" + "x-alternative": "Device.supportedDynamicRangeProfiles()" } ], "result": { - "name": "supportedHdrProfiles", + "name": "hdr", "summary": "The supported HDR profiles", "schema": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap" + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/BooleanMap" } }, "examples": [ @@ -510,8 +510,8 @@ ] }, { - "name": "currentHdrProfile", - "summary": "Returns the current HDR profile set by the device", + "name": "currentDynamicRangeProfile", + "summary": "Returns the current HDR profile set on the device", "params": [], "tags": [ { @@ -525,7 +525,7 @@ } ], "result": { - "name": "DynamicRangeProfile", + "name": "currentDynamicRangeProfile", "summary": "The current HDR profile", "schema": { "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/DynamicRangeProfile" @@ -542,6 +542,47 @@ } ] }, + { + "name": "supportedDynamicRangeProfiles", + "summary": "Returns the HDR profiles supported by the device", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedDynamicRangeProfiles", + "summary": "The supported HDR profiles", + "schema": { + "type": "array", + "items": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/DynamicRangeProfile" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "The supported HDR profiles", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "hdr10", + "hdr10plus", + "hlg" + ] + } + } + ] + }, { "name": "audio", "summary": "Get the supported audio profiles", @@ -598,6 +639,11 @@ "x-uses": [ "xrn:firebolt:capability:device:info" ] + }, + { + "name": "deprecated", + "x-since": "1.2.0", + "x-alternative": "Display.currentResolution()" } ], "result": { @@ -623,7 +669,7 @@ }, { "name": "videoResolution", - "summary": "Get the width and heigh tof the current video resolution", + "summary": "Get the width and height of the current video output resolution", "params": [], "tags": [ { @@ -640,7 +686,7 @@ "name": "videoResolution", "summary": "the resolution", "schema": { - "$ref": "#/components/schemas/Resolution" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/Resolution" } }, "examples": [ @@ -658,22 +704,22 @@ ] }, { - "name": "videoPlaybackSupported", - "summary": "Check whether video content of the given format is supported by the device's current configuration. These values may change as different AV inputs or peripherals are activated or connected.", + "name": "audioFormatSupported", + "summary": "Check whether content of a given audio format is supported by the device's current configuration. These values may change as different AV inputs or peripherals are activated or connected.", "params": [ { "name": "codec", - "summary": "The video codec to check whether its supported by the device's current configuration.", + "summary": "Audio codec used to check whether its supported.", "required": true, "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoCodec" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodec" } }, { "name": "options", - "summary": "Additional options to use for checking whether a video is supported by the device. All values must be true for the content to be playable.", + "summary": "Additional options to use for checking whether an audio format is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/VideoPlaybackOptions" + "$ref": "#/components/schemas/AudioFormatOptions" } } ], @@ -686,24 +732,24 @@ } ], "result": { - "name": "videoPlaybackSupported", - "summary": "Whether video content of a particular format is supported by the device's current configuration.", + "name": "audioFormatSupported", + "summary": "Whether audio content of the given format is supported by the device's current configuration.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the video codec and video mode to check", + "name": "Specify the audio codec and channels value to check", "params": [ { "name": "codec", - "value": "av1" + "value": "aac" }, { "name": "options", "value": { - "videoMode": "1080p50" + "channels": 2 } } ], @@ -715,22 +761,22 @@ ] }, { - "name": "videoPlaybackPossible", - "summary": "Check whether video content of the given format is supported by the device regardless of its configuration. These values will never change without a restart of the device.", + "name": "audioFormatPossible", + "summary": "Check whether content of a given audio format and channel output is supported by the device regardless of its configuration. These values will never change without a restart of the device.", "params": [ { "name": "codec", - "summary": "The video codec to check whether its supported by the device's current configuration.", + "summary": "Audio codec used to check whether its supported.", "required": true, "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoCodec" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodec" } }, { "name": "options", - "summary": "Additional options to use for checking whether a video is supported by the device. All values must be true for the content to be playable.", + "summary": "Additional options to use for checking whether an audio format is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/VideoPlaybackOptions" + "$ref": "#/components/schemas/AudioFormatOptions" } } ], @@ -743,24 +789,24 @@ } ], "result": { - "name": "videoPlaybackPossible", - "summary": "Whether video content of the given format is supported by the device.", + "name": "audioFormatPossible", + "summary": "Whether content of the given audio format and channels value are supported by the device.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the video format and resolution to check.", + "name": "Specify the audio codec and channels value to check", "params": [ { - "name": "format", - "value": "av1" + "name": "codec", + "value": "aac" }, { "name": "options", "value": { - "videoMode": "1080p50" + "channels": 2 } } ], @@ -772,22 +818,22 @@ ] }, { - "name": "audioFormatSupported", - "summary": "Check whether content of a given audio format is supported by the device's current configuration. These values may change as different AV inputs or peripherals are activated or connected.", + "name": "videoFormatSupported", + "summary": "Check whether video content of the given format is supported by the device's current configuration. These values may change as different AV inputs or peripherals are activated or connected.", "params": [ { "name": "codec", - "summary": "Audio codec used to check whether its supported.", + "summary": "The video codec to check whether its supported by the device's current configuration.", "required": true, "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodec" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoCodec" } }, { "name": "options", - "summary": "Additional options to use for checking whether an audio format is supported by the device. All values must be true for the content to be playable.", + "summary": "Additional options to use for checking whether a video is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/AudioPlaybackOptions" + "$ref": "#/components/schemas/VideoFormatOptions" } } ], @@ -800,24 +846,24 @@ } ], "result": { - "name": "audioFormatSupported", - "summary": "Whether audio content of the given format is supported by the device's current configuration.", + "name": "videoFormatSupported", + "summary": "Whether video content of the given format is supported by the device's current configuration.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the audio codec and channels value to check", + "name": "Specify the video format to check", "params": [ { "name": "codec", - "value": "aac" + "value": "av1" }, { "name": "options", "value": { - "channels": 2 + "videoMode": "1080p50" } } ], @@ -829,22 +875,22 @@ ] }, { - "name": "audioFormatPossible", - "summary": "Check whether content of a given audio format and channel output is supported by the device regardless of its configuration. These values will never change without a restart of the device.", + "name": "videoFormatPossible", + "summary": "Check whether video content of the given format is supported by the device regardless of its configuration. These values will never change without a restart of the device.", "params": [ { "name": "codec", - "summary": "Audio codec used to check whether its supported.", + "summary": "The video codec to check whether its supported by the device's current configuration.", "required": true, "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodec" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoCodec" } }, { "name": "options", - "summary": "Additional options to use for checking whether an audio format is supported by the device. All values must be true for the content to be playable.", + "summary": "Additional options to use for checking whether a video is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/AudioPlaybackOptions" + "$ref": "#/components/schemas/VideoFormatOptions" } } ], @@ -857,24 +903,24 @@ } ], "result": { - "name": "audioFormatPossible", - "summary": "Whether content of the provided audio format and channels value are supported by the device.", + "name": "videoFormatPossible", + "summary": "Whether video content of the given format is supported by the device.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the audio codec and channels value to check", + "name": "Specify the video format to check.", "params": [ { - "name": "format", - "value": "aac" + "name": "codec", + "value": "av1" }, { "name": "options", "value": { - "channels": 2 + "videoMode": "1080p50" } } ], @@ -887,7 +933,7 @@ }, { "name": "supportedVideoModes", - "summary": "Returns an array of valid video modes that the device supports, regardless of any connected display.", + "summary": "Returns an array of valid video output modes that the device supports, regardless of any connected display.", "tags": [ { "name": "capabilities", @@ -899,7 +945,7 @@ "params": [], "result": { "name": "supportedVideoModes", - "summary": "An array of valid video modes that the device supports", + "summary": "An array of valid video output modes that the device supports", "schema": { "type": "array", "items": { @@ -1260,21 +1306,6 @@ ], "components": { "schemas": { - "Resolution": { - "type": "array", - "description": "The resolution specified as width and height.", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "additionalItems": false, - "minItems": 2, - "maxItems": 2 - }, "NetworkType": { "description": "The type of network that is currently active", "type": "string", @@ -1315,12 +1346,12 @@ "title": "AudioProfiles", "allOf": [ { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap" + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/BooleanMap" }, { "type": "object", "propertyNames": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/AudioProfile" + "$ref": "https://meta.rdkcentral.com/firebolt/types#/definitions/AudioProfile" } } ] @@ -1329,7 +1360,7 @@ "type": "string", "pattern": "^HDMI[0-9]+$" }, - "AudioPlaybackOptions": { + "AudioFormatOptions": { "description": "Options for checking audio playback support", "type": "object", "properties": { @@ -1362,7 +1393,7 @@ } } }, - "VideoPlaybackOptions": { + "VideoFormatOptions": { "description": "Options for checking video playback support", "type": "object", "properties": { diff --git a/src/openrpc/display.json b/src/openrpc/display.json index 237f0c441..450beb318 100644 --- a/src/openrpc/display.json +++ b/src/openrpc/display.json @@ -82,7 +82,7 @@ "name": "resolution", "summary": "The current resolution of the display device.", "schema": { - "$ref": "#/components/schemas/DisplayResolution" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/Resolution" } }, "examples": [ @@ -91,7 +91,10 @@ "params": [], "result": { "name": "Default Result", - "value": "1080p24" + "value": [ + 1920, + 1080 + ] } } ] @@ -110,52 +113,18 @@ "params": [], "result": { "name": "resolution", - "summary": "Optional resolution of the display device.", + "summary": "Optimal resolution of the display device.", "schema": { "anyOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/DisplayResolution" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/Resolution" } ] } }, - "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", @@ -163,23 +132,16 @@ "result": { "name": "Default Result", "value": [ - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" + 1920, + 1080 ] } } ] }, { - "name": "hdr", - "summary": "Returns an array of valid HDR profiles that the display supports. ", + "name": "supportedDynamicRangeProfiles", + "summary": "Returns an array of valid HDR profiles that the display supports.", "tags": [ { "name": "capabilities", @@ -193,7 +155,7 @@ "name": "resolution", "summary": "The video resolution to check against HDR profiles supported by the display. When provided, the result includes only HDR profiles supported by this resolution.", "schema": { - "$ref": "#/components/schemas/DisplayResolution" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoMode" } } ], @@ -203,7 +165,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/DynamicRangeProfile" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/DynamicRangeProfile" }, "minItems": 1 } @@ -213,7 +175,7 @@ "name": "Default Example", "params": [ { - "name": "resolution", + "name": "videoMode", "value": "1080p60" } ], @@ -223,8 +185,7 @@ "dolbyVision", "hdr10", "hdr10plus", - "hlg", - "st2084" + "hlg" ] } } @@ -266,6 +227,36 @@ } ] }, + { + "name": "refreshRate", + "summary": "Get the native refresh rate of the display device (in Hz).", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "params": [], + "result": { + "name": "refreshRate", + "summary": "The refresh rate of the display device.", + "schema": { + "type": "integer" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": 60 + } + } + ] + }, { "name": "useSourceFrameRate", "summary": "Check whether the HDMI output frame rate is set to follow the video source frame rate.", @@ -300,50 +291,13 @@ "components": { "schemas": { "ColorDepth": { - "description": "Enumeration of color depths possibly supported by the display in number of bits", + "description": "Enumeration of display color depths in number of bits", "type": "integer", "enum": [ 8, 10, 12 ] - }, - "DisplayResolution": { - "description": "Enumeration of possible display resolutions", - "type": "string", - "enum": [ - "480i", - "480p", - "576i25", - "576p50", - "576p60", - "720p50", - "720p60", - "1080i25", - "1080i50", - "1080i60", - "1080p24", - "1080p30", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60", - "4320p60" - ] - }, - "DynamicRangeProfile": { - "description": "Enumeration of possible HDR profiles", - "type": "string", - "enum": [ - "dolbyVision", - "hdr10", - "hdr10plus", - "hlg", - "none", - "st2084", - "unknown" - ] } } } diff --git a/src/openrpc/media_info.json b/src/openrpc/media_info.json index e49024fdc..62c319cb4 100644 --- a/src/openrpc/media_info.json +++ b/src/openrpc/media_info.json @@ -2,16 +2,396 @@ "openrpc": "1.2.4", "info": { "title": "MediaInfo", - "description": "A module for query info about the media currently being played by the app.", + "description": "A module for query info about the media currently in the app's media pipeline (either playing or paused).", "version": "0.0.0" }, "methods": [ + { + "name": "audioChannels", + "summary": "Get the number of audio channels currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioChannels", + "summary": "Number of audio channels used by the pipeline.", + "type": "integer" + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": 2 + } + } + ] + }, + { + "name": "audioCodec", + "summary": "Get the audio codec currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioCodec", + "summary": "Audio codec used by the pipeline.", + "schema": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodec" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "ac3" + } + } + ] + }, + { + "name": "audioCodecLevel", + "summary": "Get the audio codec level currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioCodecLevel", + "summary": "Audio codec level used by the pipeline.", + "schema": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodecLevel" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "5.1" + } + } + ] + }, + { + "name": "audioCodecProfile", + "summary": "Get the audio codec profile currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioCodecProfile", + "summary": "Audio codec profile used by the pipeline.", + "schema": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioCodecProfile" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "high" + } + } + ] + }, + { + "name": "audioContainer", + "summary": "Get the audio container currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioContainer", + "summary": "Audio container used by the pipeline.", + "schema": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/AudioContainer" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "m4a" + } + } + ] + }, + { + "name": "audioSampleRate", + "summary": "Get the audio sample rate in kHz currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioSampleRate", + "summary": "Audio sample rate in kHz for the pipeline.", + "type": "integer" + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": 48 + } + } + ] + }, + { + "name": "onAudioFormatChanged", + "summary": "Subscribe to audio format changes to the specified media pipeline.", + "tags": [ + { + "name": "event", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "value", + "summary": "The type of audio format change", + "schema": { + "$ref": "#/components/schemas/AudioFormatChangeEvent" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "audioCodec" + } + } + ] + }, + { + "name": "onVideoFormatChanged", + "summary": "Subscribe to video format changes to the specified media pipeline.", + "tags": [ + { + "name": "event", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:video-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "value", + "summary": "The type of video format change", + "schema": { + "$ref": "#/components/schemas/VideoFormatChangeEvent" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "videoResolution" + } + } + ] + }, { "name": "videoCodec", - "summary": "Get the video codec of the specified media session.", + "summary": "Get the video codec currently used by the specified media pipeline.", "tags": [ { - "name": "property", + "name": "property:readonly", "x-session": "sessionId", "x-session-name": "mediaSession" }, @@ -25,9 +405,9 @@ "params": [ { "name": "pipeline", + "required": true, "schema": { - "type": "integer", - "default": 1 + "$ref": "#/components/schemas/PipelineId" } } ], @@ -35,7 +415,7 @@ "name": "Video codec", "summary": "Video codec for the pipeline.", "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media/definitions/VideoCodec" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoCodec" } }, "examples": [ @@ -55,53 +435,81 @@ ] }, { - "name": "videoFormat", - "summary": "Returns details on the video content currently in the media pipeline (either playing or paused).", + "name": "videoCodecLevel", + "summary": "Get the video codec level currently used by the specified media pipeline.", "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, { "name": "capabilities", "x-uses": [ "xrn:firebolt:capability:media-info:video-format" ] } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "Video codec level", + "summary": "Video codec level for the pipeline.", + "type": "string" + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipeline", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": "5.1" + } + } ] }, { - "name": "onVideoFormatChanged", - "summary": "" - }, - { - "name": "audioCodec", - "summary": "Get the audio codec of the specified media session.", + "name": "videoCodecProfile", + "summary": "Get the video codec profile currently used by the specified media pipeline.", "tags": [ { - "name": "property", + "name": "property:readonly", "x-session": "sessionId", "x-session-name": "mediaSession" }, { "name": "capabilities", "x-uses": [ - "xrn:firebolt:capability:media-info:audio-codec" + "xrn:firebolt:capability:media-info:video-format" ] } ], "params": [ { - "name": "sessionId", + "name": "pipeline", + "required": true, "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true + "$ref": "#/components/schemas/PipelineId" + } } ], "result": { - "name": "codec", - "summary": "the codec", + "name": "Video codec profile", + "summary": "Video codec profile for the pipeline.", "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media/definitions/AudioCodec" + "type": "string" } }, "examples": [ @@ -109,49 +517,80 @@ "name": "Default Example", "params": [ { - "name": "sessionId", - "value": 0 + "name": "pipeline", + "value": 1 } ], "result": { "name": "Default Result", - "value": "ac3" + "value": "high" } } ] }, { - "name": "dynamicRangeProfile", - "summary": "Get the High Dynamic Range (HDR) profile of the specified media session.", + "name": "videoContainer", + "summary": "Get the video container currently used by the specified media pipeline.", "tags": [ { - "name": "property", + "name": "property:readonly", "x-session": "sessionId", "x-session-name": "mediaSession" }, { "name": "capabilities", "x-uses": [ - "xrn:firebolt:capability:media-info:hdr" + "xrn:firebolt:capability:media-info:video-format" ] } ], "params": [ { - "name": "sessionId", + "name": "pipeline", + "required": true, "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true + "$ref": "#/components/schemas/PipelineId" + } } ], "result": { - "name": "profile", - "summary": "the hdr profile", + "name": "Video container", + "summary": "Video container for the pipeline.", "schema": { - "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media/definitions/DynamicRangeProfile" + "ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/VideoContainer" + } + } + }, + { + "name": "videoDynamicRangeProfile", + "summary": "Get the High Dynamic Range (HDR) profile currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:video-format" + ] + } + ], + "params": [ + { + "name": "pipeline", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "hdrProfile", + "summary": "The HDR profile", + "schema": { + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/DynamicRangeProfile" } }, "examples": [ @@ -159,8 +598,8 @@ "name": "Default Example", "params": [ { - "name": "sessionId", - "value": 0 + "name": "pipeline", + "value": 1 } ], "result": { @@ -171,36 +610,35 @@ ] }, { - "name": "audioProfile", - "summary": "Get the audio profile of the specified media session.", + "name": "videoResolution", + "summary": "Get the video resolution currently used by the specified media pipeline.", "tags": [ { - "name": "interface", - "x-interface": "MediaInfoContext" + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" }, { "name": "capabilities", "x-uses": [ - "xrn:firebolt:capability:media-info:audio-profile" + "xrn:firebolt:capability:media-info:video-format" ] } ], "params": [ { - "name": "sessionId", + "name": "pipeline", + "required": true, "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true + "$ref": "#/components/schemas/PipelineId" + } } ], "result": { - "name": "profile", - "summary": "the audio profile", + "name": "resolution", + "summary": "The video resolution", "schema": { - "$ref": "#/components/schemas/AudioProfile" + "$ref": "https://meta.rdkcentral.com/firebolt/schemas/media#/definitions/Resolution" } }, "examples": [ @@ -208,13 +646,16 @@ "name": "Default Example", "params": [ { - "name": "sessionId", - "value": 0 + "name": "pipeline", + "value": 1 } ], "result": { "name": "Default Result", - "value": "dolbyAtmos" + "value": [ + 1920, + 1080 + ] } } ] @@ -222,16 +663,34 @@ ], "components": { "schemas": { - "AudioProfile": { + "AudioFormatChangeEvent": { + "type": "string", + "description": "The type of audio format change", + "enum": [ + "audioChannels", + "audioCodec", + "audioCodecLevel", + "audioCodecProfile", + "audioContainer", + "audioSampleRate" + ] + }, + "PipelineId": { + "type": "integer", + "description": "The media pipeline/session ID", + "minimum": 1, + "maximum": 15 + }, + "VideoFormatChangeEvent": { "type": "string", - "description": "Enumeration of audio profiles.", + "description": "The type of video format change", "enum": [ - "auro3d", - "dolbyAtmos", - "dtsx", - "mpegh", - "none", - "unknown" + "videoCodec", + "videoCodecLevel", + "videoCodecProfile", + "videoContainer", + "videoDynamicRangeProfile", + "videoResolution" ] } } diff --git a/src/schemas/media.json b/src/schemas/media.json index 9d3f0bac7..625cf4dc6 100644 --- a/src/schemas/media.json +++ b/src/schemas/media.json @@ -24,6 +24,32 @@ "wav" ] }, + "AudioCodecLevel": { + "description": "Enumeration of audio codec levels.", + "type": "string", + "enum": [ + "3.0", + "3.1", + "4.0", + "4.1", + "4.2", + "5.0", + "5.1" + ] + }, + "AudioCodecProfile": { + "description": "Enumeration of audio codec profiles.", + "type": "string", + "enum": [ + "high", + "main", + "main10", + "mp2lc", + "mp4he", + "p0", + "p2" + ] + }, "AudioContainer": { "description": "Enumeration of audio containers.", "type": "string", @@ -42,38 +68,20 @@ "channels": { "type": "integer" }, + "codec": { + "$ref": "#/definitions/AudioCodec" + }, "container": { "$ref": "#/definitions/AudioContainer" }, - "level": { - "type": "string", - "enum": [ - "3.0", - "3.1", - "4.0", - "4.1", - "4.2", - "5.0", - "5.1" - ] + "codecLevel": { + "$ref": "#/definitions/AudioCodecLevel" }, - "profile": { - "type": "string", - "enum": [ - "high", - "main", - "main10", - "mp2lc", - "mp4he", - "p0", - "p2" - ] + "codecProfile": { + "$ref": "#/definitions/AudioCodecProfile" }, "sampleRate": { "type": "integer" - }, - "type": { - "$ref": "#/definitions/AudioCodec" } } }, @@ -203,6 +211,9 @@ "container": { "$ref": "#/definitions/VideoContainer" }, + "frameRate": { + "type": "integer" + }, "hdr": { "$ref": "#/definitions/DynamicRangeProfile" }, @@ -227,8 +238,8 @@ "p2" ] }, - "mode": { - "$ref": "#/definitions/VideoMode" + "resolution": { + "$ref": "#/definitions/Resolution" }, "type": { "$ref": "#/definitions/VideoCodec"