diff options
author | igapchuck <igapchuck@luxoft.com> | 2019-06-24 19:11:49 +0300 |
---|---|---|
committer | Igor Gapchuk <igapchuck@luxoft.com> | 2019-08-19 14:31:07 +0300 |
commit | 96268f85a5c1d42d5e7866966ecb8ca356ab580a (patch) | |
tree | 87bfceb5c2800fa9c55b310cc4385e54ab39be88 | |
parent | c6e9a9bb55b14571d1f389c75b515a2c1c102f95 (diff) | |
download | sdl_core-96268f85a5c1d42d5e7866966ecb8ca356ab580a.tar.gz |
Feature/Pixel density and scale
Add new parameters to VideoStreamingCapability structure:
- diagonalScreenSize - diagonal screen size of the screen;
- pixelPerInch - Pixel per inch (PPI) of the screen;
- scale - Scale value to determine how the app should scale
the captured view.
Add new parameters with default values to hmi_capabilities.json:
- diagonalScreenSize
- pixelPerInch
- scale
6 files changed, 35 insertions, 2 deletions
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json index 1aa8b86842..84b0784824 100755 --- a/src/appMain/hmi_capabilities.json +++ b/src/appMain/hmi_capabilities.json @@ -320,7 +320,10 @@ "protocol": "RAW", "codec": "H264" }], - "hapticSpatialDataSupported": false + "hapticSpatialDataSupported": false, + "diagonalScreenSize": 8, + "pixelPerInch": 117, + "scale": 1 }, "remoteControlCapability": { "buttonCapabilities": [ diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h index 2ee5daaed6..93ab9c74fe 100644 --- a/src/components/application_manager/include/application_manager/smart_object_keys.h +++ b/src/components/application_manager/include/application_manager/smart_object_keys.h @@ -444,6 +444,9 @@ extern const char* const resolution_height; extern const char* const max_bitrate; extern const char* const supported_formats; extern const char* const haptic_spatial_data_supported; +extern const char* const diagonal_screen_size; +extern const char* const pixel_per_inch; +extern const char* const scale; extern const char* const haptic_rect_data; extern const char* const rect; extern const char* const x; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc index 3fd3a39dca..503a0b3dbe 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc @@ -279,7 +279,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) { video_streaming_capability[strings::preferred_resolution] [strings::resolution_width] = 800; video_streaming_capability[strings::preferred_resolution] - [strings::resolution_height] = 350; + [strings::resolution_height] = 354; video_streaming_capability[strings::max_bitrate] = 10000; @@ -297,6 +297,12 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) { video_streaming_capability[strings::haptic_spatial_data_supported] = true; + video_streaming_capability[strings::diagonal_screen_size] = 7.47; + + video_streaming_capability[strings::pixel_per_inch] = 117.f; + + video_streaming_capability[strings::scale] = 1.f; + ResponseFromHMIPtr command( CreateCommand<UIGetCapabilitiesResponse>(command_msg)); diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc index fbca1366b8..3f8b2c5813 100644 --- a/src/components/application_manager/src/smart_object_keys.cc +++ b/src/components/application_manager/src/smart_object_keys.cc @@ -405,6 +405,9 @@ const char* const resolution_height = "resolutionHeight"; const char* const max_bitrate = "maxBitrate"; const char* const supported_formats = "supportedFormats"; const char* const haptic_spatial_data_supported = "hapticSpatialDataSupported"; +const char* const diagonal_screen_size = "diagonalScreenSize"; +const char* const pixel_per_inch = "pixelPerInch"; +const char* const scale = "scale"; const char* const haptic_rect_data = "hapticRectData"; const char* const rect = "rect"; const char* const x = "x"; diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 0944e71b53..a21c45d97b 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -3368,6 +3368,15 @@ <param name="hapticSpatialDataSupported" type="Boolean" mandatory="false"> <description>True if the system can utilize the haptic spatial data from the source being streamed. </description> </param> + <param name="diagonalScreenSize" type="Float" mandatory="false"> + <description>The diagonal screen size in inches.</description> + </param> + <param name="pixelPerInch" type="Float" mandatory="false"> + <description>PPI is the diagonal resolution in pixels divided by the diagonal screen size in inches.</description> + </param> + <param name="scale" type="Float" mandatory="false"> + <description>The scaling factor the app should use to change the size of the projecting view.</description> + </param> </struct> <struct name="SystemCapabilities"> diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index b62b70003c..62237b666a 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -2928,6 +2928,15 @@ <param name="hapticSpatialDataSupported" type="Boolean" mandatory="false"> <description>True if the system can utilize the haptic spatial data from the source being streamed. If not included, it can be assumed the module doesn't support haptic spatial data'. </description> </param> + <param name="diagonalScreenSize" type="Float" mandatory="false" since="6.0"> + <description>The diagonal screen size in inches.</description> + </param> + <param name="pixelPerInch" type="Float" mandatory="false" since="6.0"> + <description>PPI is the diagonal resolution in pixels divided by the diagonal screen size in inches.</description> + </param> + <param name="scale" type="Float" mandatory="false" since="6.0"> + <description>The scaling factor the app should use to change the size of the projecting view.</description> + </param> </struct> <struct name="RGBColor" since="5.0"> |