diff options
author | Igor Gapchuk (GitHub) <41586842+IGapchuk@users.noreply.github.com> | 2019-08-21 18:23:54 +0300 |
---|---|---|
committer | Collin <iCollin@users.noreply.github.com> | 2019-08-21 11:23:54 -0400 |
commit | 038666ade2fda1164596568a8ab852b9db48036f (patch) | |
tree | db05f91f9250b3759e0a4b81b9d288baa2d45f4f | |
parent | fc98ca3a571be85cdbb6a3db3d621e7f10fae253 (diff) | |
download | sdl_core-038666ade2fda1164596568a8ab852b9db48036f.tar.gz |
Feature/Pixel density and scale (#2757)
* 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
* Add min and max value for "scale" parameter.
Add min and max values for parameter scale in Structs index for
VideoStreamingCapabilities struct.
6 files changed, 35 insertions, 2 deletions
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json index 4cb3cdc597..4f35059bd5 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 62fbe41d64..9bffc37bf6 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 @@ -445,6 +445,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 f2feb75b63..dc97a12ce4 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 @@ -310,7 +310,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; @@ -328,6 +328,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 4dd431e8cb..809d465d20 100644 --- a/src/components/application_manager/src/smart_object_keys.cc +++ b/src/components/application_manager/src/smart_object_keys.cc @@ -406,6 +406,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 f710d4c593..cb317a227b 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" minvalue="1" maxvalue="10" 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..3f2ffb47f2 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" minvalue="1" maxvalue="10" 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"> |