Closed noah-livio closed 2 years ago
On my environment (HMI: release 5.7.0, cd2d250
) i see that HMI starts stream but with a long delay for defined resolutions.
For common resolutions deploy_server spends from 5 to 10 seconds to start video.
For 200*800 scale:2
it takes about 40 sec to start video and 400*100 scale:1
it takes about 50 sec to start video.
@GetmanetsIrina This seems to be an SDL Core issue. Looking at the SDL_HMI logs, SDL is not sending a {"jsonrpc":"2.0","method":"Navigation.OnVideoDataStreaming","params":{"available":true}}
notification to the HMI after the stream is stopped and restarted for 400x100. This prevents the video stream from being started on the HMI and causes the subsequent streaming attempt to fail
NavigationController.js:492 Switching video streaming preset to: 400x100 Scale: 1
RPCClient.js:323 HMI -> SDL [9:59:15:344]: {"jsonrpc":"2.0","method":"BasicCommunication.OnSystemCapabilityUpdated","params":{..."preferredResolution":{"resolutionHeight":100,"resolutionWidth":400},"scale":1, ...}}
RPCClient.js:137 SDL -> HMI [9:59:15:713]: {"jsonrpc":"2.0","method":"Navigation.OnVideoDataStreaming","params":{"available":false}}
RPCClient.js:137 SDL -> HMI [9:59:15:715]: {"id":31,"jsonrpc":"2.0","method":"Navigation.StopStream","params":{"appID":1189654840}}
Model.js:651 Stopping video playback
RPCClient.js:323 HMI -> SDL [9:59:15:722]: {"jsonrpc":"2.0","id":31,"result":{"code":0,"method":"Navigation.StopStream"}}
RPCClient.js:137 SDL -> HMI [9:59:15:727]: {"jsonrpc":"2.0","method":"BasicCommunication.OnServiceUpdate","params":{"appID":1189654840,"serviceEvent":"REQUEST_RECEIVED","serviceType":"VIDEO"}}
RPCClient.js:137 SDL -> HMI [9:59:15:728]: {"id":32,"jsonrpc":"2.0","method":"Navigation.SetVideoConfig","params":{"appID":1189654840,"config":{"codec":"H264","height":100,"protocol":"RAW","width":400}}}
RPCClient.js:323 HMI -> SDL [9:59:15:730]: {"jsonrpc":"2.0","id":32,"result":{"code":0,"method":"Navigation.SetVideoConfig"}}
RPCClient.js:137 SDL -> HMI [9:59:15:746]: {"id":33,"jsonrpc":"2.0","method":"Navigation.StartStream","params":{"appID":1189654840,"url":"http://127.0.0.1:5050"}}
RPCClient.js:137 SDL -> HMI [9:59:15:750]: {"jsonrpc":"2.0","method":"BasicCommunication.OnServiceUpdate","params":{"appID":1189654840,"serviceEvent":"REQUEST_ACCEPTED","serviceType":"VIDEO"}}
RPCSimpleClient.js:78 Message to be sent: {"method":"StopStreamingAdapter","params":{"streamingType":"video"}}
RPCSimpleClient.js:87 Message received: {"method": "StopStreamingAdapter", "params": {"success": true}}
Model.js:671 Video playback stopped
Model.js:537 Streaming for video for 1189654840 activity changed to true
Model.js:571 Video streaming is not allowed yet
@ShobhitAd, i have different behaviour HMI_log_stream.log
SDL sends Navi.OnVideoDataStreaming(available:true), but i have long delay between Starting video playback
and Video playback started OK
messages.
So i see 2 reasons why i have different behaviour:
This was determined to be an issue on the Android side https://github.com/smartdevicelink/sdl_java_suite/issues/1809.
Using the
systemCapabilities.js
below, video fails to stream on sdl_hmi v5.7 with 8.1.1 when using the following resolution settings:{w: 200, h: 800, s: 2.0, d: 9}
{w: 400, h: 100, s: 1.0, d: 5}
The failure for
{w: 200, h: 800, s: 2.0, d: 9}
seems to be conditional. In most tests, it failed. However, when landscape configurations are disabled and portrait configurations are unrestricted in the Android test suite app, it is able to stream.Streaming
{w: 400, h: 100, s: 1.0, d: 5}
seems to fail all the time.systemCapabilities.js
```javascript SDL.systemCapabilities = Em.Object.create({ videoStreamingCapability: { preferredResolution: { resolutionWidth: 800, resolutionHeight: 380 }, maxBitrate: 400000, supportedFormats: [{ protocol: "RAW", codec: "H264" }, { protocol: "RTP", codec: "H264" }], hapticSpatialDataSupported: true, diagonalScreenSize: 8, pixelPerInch: 96, scale: 1, preferredFPS: 20, additionalVideoStreamingCapabilities: [{ preferredResolution: { resolutionWidth: 800, resolutionHeight: 380 }, hapticSpatialDataSupported: true, scale: 1.5, diagonalScreenSize: 5 }, { preferredResolution: { resolutionWidth: 800, resolutionHeight: 380 }, hapticSpatialDataSupported: false, scale: 2.0, diagonalScreenSize: 4 }, { preferredResolution: { resolutionWidth: 800, resolutionHeight: 800 }, hapticSpatialDataSupported: true, diagonalScreenSize: 10 }, { preferredResolution: { resolutionWidth: 200, resolutionHeight: 800 }, hapticSpatialDataSupported: true, diagonalScreenSize: 9 }, { preferredResolution: { resolutionWidth: 200, resolutionHeight: 800 }, hapticSpatialDataSupported: true, scale: 2.0, diagonalScreenSize: 9 }, { preferredResolution: { resolutionWidth: 400, resolutionHeight: 100 }, hapticSpatialDataSupported: true, scale: 1.0, diagonalScreenSize: 5 }] }, driverDistractionCapability: { menuLength: 10, subMenuDepth: 2 } }); ```