-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/0296 possibility to update video streaming capabilities (#223)
* init commit * add Videosteaming Switching Example Notification to OnSystemCapabilityUpdated index * Add `appID` to OnAppCapabilityUpdated notification * process review comments * Apply suggestions from code review Co-authored-by: Shobhit Adlakha <[email protected]> * add OnAppCapabilityUpdated to config.json * Apply suggestions from code review Co-authored-by: Shobhit Adlakha <[email protected]> * update OnAppCapabilityUpdated.png Co-authored-by: Dubovyk <[email protected]> Co-authored-by: Shobhit Adlakha <[email protected]> Co-authored-by: Dmitriy Boltovskiy <[email protected]>
- Loading branch information
1 parent
de5c401
commit fdb7116
Showing
9 changed files
with
239 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,6 +133,9 @@ | |
}, | ||
{ | ||
"name": "OnAppPropertiesChange" | ||
}, | ||
{ | ||
"name": "OnAppCapabilityUpdated" | ||
} | ||
] | ||
}, | ||
|
Binary file added
BIN
+64.4 KB
docs/BasicCommunication/OnAppCapabilityUpdated/assets/OnAppCapabilityUpdated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions
26
docs/BasicCommunication/OnAppCapabilityUpdated/assets/OnAppCapabilityUpdated.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
participant App | ||
participant SDL | ||
participant HMI | ||
|
||
|
||
seq Obtaining VideoStreamingCapabilities during HMI initialization | ||
|
||
SDL->HMI: UI.GetCapabilities | ||
HMI-->SDL:<align:center> UI.GetCapabilities\n(systemCapabilities=videoStreamingCapability,\n[additionalVideoStreamingCapabilities]) | ||
end | ||
|
||
note over App, HMI: RAI | ||
|
||
seq App receives VideoStreamingCapabilities supported by the system | ||
|
||
App->SDL:<align:center> GetSystemCapability\n(systemCapabilityType=VIDEO_STREAMING,\nsubscribe=true) | ||
SDL-->App:<align:center> GetSystemCapability\n(systemCapability=videoStreamingCapability,\n[additionalVideoStreamingCapabilities]) | ||
|
||
end | ||
|
||
seq App provides supported VideoStreamingCapabilities | ||
|
||
App->>SDL:<align:center> OnAppCapabilityUpdated\n(appCapability=videoStreamingCapability,\n[additionalVideoStreamingCapabilities]) | ||
SDL->>HMI:<align:center> BC.OnAppCapabilityUpdated\n(appCapability=videoStreamingCapability,\n[additionalVideoStreamingCapabilities]) | ||
|
||
end |
121 changes: 121 additions & 0 deletions
121
docs/BasicCommunication/OnAppCapabilityUpdated/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
## OnAppCapabilityUpdated | ||
|
||
Type | ||
: Notification | ||
|
||
Sender | ||
: SDL | ||
|
||
Purpose | ||
: Inform the HMI that a specific application capability has changed | ||
|
||
### Notification | ||
|
||
SDL sends OnAppCapabilityUpdated notification to HMI to provide <abbr title="Video Streaming Capabilities">VSC</abbr> supported by application | ||
|
||
!!! may | ||
|
||
HMI may switch video streaming resolution according to values provided by application in OnAppCapabilityUpdated notification. (_see also [OnSystemCapabilityUpdated](../OnSystemCapabilityUpdated)_) | ||
|
||
If HMI doesn't receive OnAppCapabilityUpdated notification or receives OnAppCapabilityUpdated without `additionalVideoStreamingCapabilities`, HMI should not send OnSystemCapabilityUpdated notification and the user should not be able to change the resolution. | ||
!!! | ||
|
||
!!! note | ||
|
||
In case older application does not support sending `OnAppCapabilityUpdated` notification, HMI must treat this application as one that does not support dynamic resolution switching and allow only default screen mode for it. | ||
|
||
!!! | ||
|
||
#### Parameters | ||
|
||
|Name|Type|Mandatory|Additional| | ||
|:---|:---|:--------|:---------| | ||
|appCapability|[Common.AppCapability](../../common/structs/#appcapability)|true|| | ||
|appID|Integer|true|| | ||
|
||
### Sequence Diagrams | ||
|
||
||| | ||
Negotiation of Video Streaming Capabilities between HMI and Mobile Application | ||
![OnAppCapabilityUpdated](./assets/OnAppCapabilityUpdated.png) | ||
||| | ||
|
||
### JSON Message Examples | ||
|
||
#### Example Notification | ||
|
||
```json | ||
{ | ||
"jsonrpc":"2.0", | ||
"method":"BasicCommunication.OnAppCapabilityUpdated", | ||
"params":{ | ||
"appID":65544, | ||
"appCapability":{ | ||
"appCapabilityType":"VIDEO_STREAMING", | ||
"videoStreamingCapability":{ | ||
"hapticSpatialDataSupported":false, | ||
"scale":2.5, | ||
"additionalVideoStreamingCapabilities":[ | ||
{ | ||
"scale":1, | ||
"hapticSpatialDataSupported":true, | ||
"preferredResolution":{ | ||
"resolutionWidth":800, | ||
"resolutionHeight":350 | ||
} | ||
}, | ||
{ | ||
"hapticSpatialDataSupported":false, | ||
"preferredResolution":{ | ||
"resolutionWidth":320, | ||
"resolutionHeight":240 | ||
} | ||
}, | ||
{ | ||
"hapticSpatialDataSupported":true, | ||
"preferredResolution":{ | ||
"resolutionWidth":400, | ||
"resolutionHeight":480 | ||
} | ||
}, | ||
{ | ||
"hapticSpatialDataSupported":true, | ||
"preferredResolution":{ | ||
"resolutionWidth":640, | ||
"resolutionHeight":480 | ||
} | ||
}, | ||
{ | ||
"hapticSpatialDataSupported":true, | ||
"preferredResolution":{ | ||
"resolutionWidth":800, | ||
"resolutionHeight":240 | ||
} | ||
}, | ||
{ | ||
"scale":2.5, | ||
"hapticSpatialDataSupported":false | ||
}, | ||
{ | ||
"scale":5, | ||
"hapticSpatialDataSupported":true | ||
} | ||
], | ||
"preferredResolution":{ | ||
"resolutionWidth":800, | ||
"resolutionHeight":350 | ||
}, | ||
"diagonalScreenSize":10, | ||
"maxBitrate":10000, | ||
"pixelPerInch":150, | ||
"supportedFormats":[ | ||
{ | ||
"protocol":"RAW", | ||
"codec":"H264" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
``` |
Binary file added
BIN
+117 KB
.../OnSystemCapabilityUpdated/assets/OnSystemCapabilityUpdated_VIDEO_STREAMING.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions
36
...munication/OnSystemCapabilityUpdated/assets/OnSystemCapabilityUpdated_VIDEO_STREAMING.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
participant App | ||
participant SDL | ||
participant HMI | ||
|
||
==<align:center>Pre-conditions: 1.Streaming is in process\n2.App is subscribed to capabilities updates == | ||
|
||
seq HMI notifies application of new Video Streaming Capabilities | ||
|
||
note over HMI:<align:center> User changes\nstreaming resolution | ||
|
||
HMI->HMI: Stop displaying video | ||
HMI->>SDL:<align:center> BC.OnSystemCapabilityUpdated\n(appID, videoStreamingCapability=VideoStreamingCapability) | ||
SDL->>App:<align:center> OnSystemCapabilityUpdated\n(videoStreamingCapability=VideoStreamingCapability) | ||
App->App: CallBack | ||
end | ||
|
||
seq Application stops streaming | ||
App->SDL: EndService (VIDEO) | ||
SDL-->App: EndServiceACK (VIDEO) | ||
SDL->HMI: Navi.StopStream | ||
HMI-->SDL: Navi.StopStream (SUCCESS) | ||
SDL->>HMI: Navi.OnVideoDataStreaming (false) | ||
end | ||
|
||
seq Application starts streaming after updating streaming content window according to the new VSCs | ||
App->SDL: StartService (VIDEO, new_streaming_params) | ||
SDL->HMI: Navi.SetVideoConfig (new_streaming_params) | ||
HMI-->SDL: Navi.SetVideoConfig (SUCCESS) | ||
SDL-->App: StartServiceACK (VIDEO, new_streaming_params) | ||
SDL->HMI: Navi.StartStream | ||
HMI-->SDL: Navi.StartStream (SUCCESS) | ||
App->SDL:<align:center> StreamingData ...\n(new_streaming_params) | ||
SDL->HMI: <align:center> StreamingData ...\n(new_streaming_params) | ||
SDL->>HMI: Navi.OnVideoDataStreaming (true) | ||
HMI->HMI: Display new video stream | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters