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-0296] Possibility to update video streaming capabilities during ignition cycle #3468

Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fa49029
Temporary commit to change URL of rpc_spec repository
IGapchuk Jul 7, 2020
decd04a
Change rpc_spec reference according to the new changes in the rpc_spe…
IGapchuk Jul 7, 2020
9ea01b6
Add the new OnAppCapabilityUpdated RPC with appropriate types to the …
IGapchuk Jul 7, 2020
36e891b
Add the smart objects keys for the new parameters
IGapchuk Jul 8, 2020
ec4bef8
Add OnAppCapabilityUpdatedNotification and BCOnAppCapabilityUpdatedNo…
IGapchuk Jul 14, 2020
e2ac645
Add Unit tests for the OnAppCapabilityUpdated RPCs
IGapchuk Jul 14, 2020
7a0ba7a
Fix code generation for recursive structures
YarikMamykin Jul 14, 2020
94577fc
Update OnBCSystemCapabilityUpdatedNotificationFromHMITest Unit tests
IGapchuk Jul 14, 2020
359d596
Add additionalVideoStreamingCapabilities to default hmi_capabilities
YarikMamykin Jul 16, 2020
2e2f1ef
Add Processing OnSystemCapabilityUpdated with videoStreamingCapabilities
IGapchuk Jul 20, 2020
995f8dc
Update Unit tests for OnSystemCapabilityUpdated notifications
IGapchuk Jul 20, 2020
95eca48
Add app_id to OnAppCapabilityUpdated notification to HMI
Aug 16, 2020
36f2f37
Updates during code review
Aug 18, 2020
752f3bc
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
Dec 1, 2020
a36ff38
Update logger
Dec 1, 2020
27459b0
Update link to rpc_spec
Dec 1, 2020
9b7293b
Return back the driverDistractionCapability that was missed during co…
Dec 2, 2020
5393355
Fix functionality that was broken during conflicts resolving
Dec 4, 2020
4c733a1
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
Dec 15, 2020
ddb936b
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
Dec 16, 2020
437ca22
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
Dec 17, 2020
8212d63
Updates during code review
Jan 27, 2021
d51b003
Update link to rpc_spec
Jan 27, 2021
868eccd
Revert "Fix streamer activity in case of suspend (#3488)"
AKalinich-Luxoft Jan 26, 2021
a6a06d4
Adjust old fix for all streaming transports
AKalinich-Luxoft Jan 26, 2021
89e27c5
Merge pull request #176 from LuxoftSDL/feature/0296_possibility_to_up…
AKalinich-Luxoft Jan 28, 2021
ccce573
Change commit to rpc_spec
AKalinich-Luxoft Jan 28, 2021
1f278a7
Update rpc_spec
dboltovskyi Jan 28, 2021
3396fd1
Merge remote-tracking branch 'smart/develop' into feature/0296_possib…
dboltovskyi Jan 28, 2021
3d6a459
Mark function as deprecated
Feb 1, 2021
f0de706
Updates during code review
Feb 1, 2021
177f079
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
Feb 12, 2021
31b0e74
Remove trailing whitespaces
Feb 12, 2021
bfade9a
Update link to rpc_spec
Feb 12, 2021
b6c98a4
Merge remote-tracking branch 'smart/develop' into feature/0296_possib…
dboltovskyi Feb 12, 2021
73f73ce
Update rpc_spec
dboltovskyi Feb 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/LuxoftSDL/rpc_spec.git
108 changes: 97 additions & 11 deletions src/appMain/hmi_capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,19 +311,105 @@
"dialNumberEnabled": true
},
"videoStreamingCapability": {
"preferredResolution": {
"preferredResolution": {
"resolutionWidth": 800,
"resolutionHeight": 380
},
"maxBitrate": 20000,
"supportedFormats": [
{
"protocol": "RAW",
"codec": "H264"
},
{
"protocol": "RTP",
"codec": "H264"
},
{
"protocol": "RTSP",
"codec": "Theora"
},
{
"protocol": "RTMP",
"codec": "VP8"
},
{
"protocol": "WEBM",
"codec": "VP9"
}
],
"hapticSpatialDataSupported": true,
"diagonalScreenSize": 8,
"pixelPerInch": 96,
"scale": 1,
"additionalVideoStreamingCapabilities": [
{
"preferredResolution":
{
"resolutionWidth": 800,
"resolutionHeight": 350
"resolutionHeight": 380
},
"hapticSpatialDataSupported": true,
"scale": 1,
"diagonalScreenSize": 8
},
{
"preferredResolution":
{
"resolutionWidth": 320,
"resolutionHeight": 200
},
"hapticSpatialDataSupported": false,
"diagonalScreenSize": 3
},
"maxBitrate": 10000,
"supportedFormats": [{
"protocol": "RAW",
"codec": "H264"
}],
"hapticSpatialDataSupported": false,
"diagonalScreenSize": 8,
"pixelPerInch": 117,
"scale": 1
{
"preferredResolution":
{
"resolutionWidth": 480,
"resolutionHeight": 320
},
"hapticSpatialDataSupported": true,
"diagonalScreenSize": 5
},
{
"preferredResolution":
{
"resolutionWidth": 400,
"resolutionHeight": 380
},
"hapticSpatialDataSupported": true,
"diagonalScreenSize": 4
},
{
"preferredResolution":
{
"resolutionWidth": 800,
"resolutionHeight": 240
},
"hapticSpatialDataSupported": true,
"diagonalScreenSize": 4
},
{
"preferredResolution":
{
"resolutionWidth": 800,
"resolutionHeight": 380
},
"hapticSpatialDataSupported": true,
"scale": 1.5,
"diagonalScreenSize": 5
},
{
"preferredResolution":
{
"resolutionWidth": 800,
"resolutionHeight": 380
},
"hapticSpatialDataSupported": true,
"scale": 2,
"diagonalScreenSize": 4
}
]
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions src/appMain/sdl_preloaded_pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@
"NONE"
]
},
"OnAppCapabilityUpdated": {
"hmi_levels": [
"BACKGROUND",
"FULL",
"LIMITED"
]
},
"OnAppInterfaceUnregistered": {
"hmi_levels": [
"BACKGROUND",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ extern const char* policy_type;
extern const char* property;
extern const char* displays;
extern const char* seat_location;
extern const char* app_capability;
extern const char* app_capability_type;

// PutFile
extern const char* sync_file_name;
Expand Down Expand Up @@ -473,6 +475,7 @@ 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 additional_video_streaming_capabilities;
extern const char* const haptic_rect_data;
extern const char* const rect;
extern const char* const x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

include_directories(include)
include_directories(
include
${CMAKE_CURRENT_SOURCE_DIR}/include/sdl_rpc_plugin
)

set (COMMANDS_SOURCE_DIR
${CMAKE_CURRENT_SOURCE_DIR}/src/commands
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of the Ford Motor Company nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_
ShobhitAd marked this conversation as resolved.
Show resolved Hide resolved
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_

#include "application_manager/commands/notification_to_hmi.h"

namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;

namespace commands {

class BCOnAppCapabilityUpdatedNotification
: public app_mngr::commands::NotificationToHMI {
public:
BCOnAppCapabilityUpdatedNotification(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
app_mngr::rpc_service::RPCService& rpc_service,
app_mngr::HMICapabilities& hmi_capabilities,
policy::PolicyHandlerInterface& policy_handle);

~BCOnAppCapabilityUpdatedNotification() OVERRIDE;

void Run() OVERRIDE;

private:
DISALLOW_COPY_AND_ASSIGN(BCOnAppCapabilityUpdatedNotification);
};

} // namespace commands
} // namespace sdl_rpc_plugin

#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ class OnBCSystemCapabilityUpdatedNotificationFromHMI
ProcessSystemDisplayCapabilitiesResult ProcessSystemDisplayCapabilities(
const smart_objects::SmartObject& display_capabilities);

/**
* @brief ProcessVideoStreamingCapability processes provided video
* streaming capabilities according to its structure
* @param system_capability capabilities to process
* @return true if video streaming capabilities have been processed
* properly, otherwise returns false
*/
bool ProcessVideoStreamingCapability(
const smart_objects::SmartObject& system_capability);

void RemoveAppIdFromNotification();

DISALLOW_COPY_AND_ASSIGN(OnBCSystemCapabilityUpdatedNotificationFromHMI);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of the Ford Motor Company nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_

#include "application_manager/commands/command_notification_from_mobile_impl.h"
#include "utils/macro.h"

namespace sdl_rpc_plugin {
namespace commands {
namespace mobile {

namespace app_mngr = application_manager;
class OnAppCapabilityUpdatedNotification
: public app_mngr::commands::CommandNotificationFromMobileImpl {
public:
/**
* @brief OnAppPermissionChangedNotification class constructor
* @param message Incoming SmartObject message
* @param application_manager Reference to the instance of the Application
*Manager
* @param rpc_service Reference to the instance of the RPCService
* @param hmi_capabilities Reference to the instance of the HMICapabilities
* @param policy_handle Reference to the instance of the PolicyHandler
**/
OnAppCapabilityUpdatedNotification(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
app_mngr::rpc_service::RPCService& rpc_service,
app_mngr::HMICapabilities& hmi_capabilities,
policy::PolicyHandlerInterface& policy_handle);

/**
* @brief OnAppPermissionChangedNotification class destructor
**/
~OnAppCapabilityUpdatedNotification() OVERRIDE;

/**
* @brief Execute command
**/
void Run() OVERRIDE;

private:
DISALLOW_COPY_AND_ASSIGN(OnAppCapabilityUpdatedNotification);
};

} // namespace mobile
} // namespace commands
} // namespace sdl_rpc_plugin

#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_APP_CAPABILITY_UPDATED_NOTIFICATION_H_
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of the Ford Motor Company nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "sdl_rpc_plugin/commands/hmi/bc_on_app_capability_updated_notification.h"

namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;

namespace commands {

BCOnAppCapabilityUpdatedNotification::BCOnAppCapabilityUpdatedNotification(
const application_manager::commands::MessageSharedPtr& message,
application_manager::ApplicationManager& application_manager,
application_manager::rpc_service::RPCService& rpc_service,
application_manager::HMICapabilities& hmi_capabilities,
policy::PolicyHandlerInterface& policy_handle)
: NotificationToHMI(message,
application_manager,
rpc_service,
hmi_capabilities,
policy_handle) {}

BCOnAppCapabilityUpdatedNotification::~BCOnAppCapabilityUpdatedNotification() {}

void BCOnAppCapabilityUpdatedNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);

SendNotification();
ShobhitAd marked this conversation as resolved.
Show resolved Hide resolved
}

} // namespace commands
} // namespace sdl_rpc_plugin
Loading