Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL-0274: add preferred FPS to VideoStreamingCapability #3437

Merged
merged 9 commits into from
Feb 4, 2021
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/smartdevicelink/jsoncpp.git
[submodule "tools/rpc_spec"]
path = tools/rpc_spec
url = https://github.com/smartdevicelink/rpc_spec.git
url = https://github.com/shiniwat/rpc_spec.git
shiniwat marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion src/appMain/hmi_capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
"hapticSpatialDataSupported": false,
"diagonalScreenSize": 8,
"pixelPerInch": 117,
"scale": 1
"scale": 1,
"preferredFPS": 15
},
"driverDistractionCapability": {
"menuLength": 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ extern const char* const haptic_rect_data;
extern const char* const rect;
extern const char* const x;
extern const char* const y;
extern const char* const preferred_fps;
} // namespace strings

namespace hmi_interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) {
video_streaming_capability[strings::pixel_per_inch] = 117.f;

video_streaming_capability[strings::scale] = 1.f;
video_streaming_capability[strings::preferred_fps] = 30;

ResponseFromHMIPtr command(
CreateCommand<UIGetCapabilitiesResponse>(command_msg));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ const char* const haptic_rect_data = "hapticRectData";
const char* const rect = "rect";
const char* const x = "x";
const char* const y = "y";
const char* const preferred_fps = "preferredFPS";
} // namespace strings

namespace hmi_interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ TEST_F(
vs_capability_so.keyExists(strings::haptic_spatial_data_supported));
EXPECT_FALSE(
vs_capability_so[strings::haptic_spatial_data_supported].asBool());
EXPECT_TRUE(vs_capability_so.keyExists(strings::preferred_fps));

EXPECT_TRUE(hmi_capabilities_->video_streaming_supported());
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/interfaces/HMI_API.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3606,6 +3606,9 @@
<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>
<param name="preferredFPS" type="Integer" minvalue="0" maxvalue="2147483647" mandatory="false">
<description>The preferred frame rate per second of the head unit. The mobile application / app library may take other factors into account that constrain the frame rate lower than this value, but it should not perform streaming at a higher frame rate than this value.</description>
</param>
</struct>

<struct name="DynamicUpdateCapabilities">
Expand Down