diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2015-02-27 15:21:45 +0200 |
---|---|---|
committer | Artem Nosach <ANosach@luxoft.com> | 2015-04-23 15:33:25 +0300 |
commit | 6451d66a31db67c0e936980eb6c4c5cd4cc4811e (patch) | |
tree | cc74e492705a0aea0973f3bb823e2eebae3424e0 | |
parent | b0795c8b20a54f0e18e671d1b52925bbbf3890e6 (diff) | |
download | sdl_core-6451d66a31db67c0e936980eb6c4c5cd4cc4811e.tar.gz |
Implemented new RPC support for audio/video streaming availability.
13 files changed, 387 insertions, 19 deletions
diff --git a/customer-specific/pasa/src/appMain/smartDeviceLink.ini b/customer-specific/pasa/src/appMain/smartDeviceLink.ini index bde0a5eaea..d292c042d2 100644 --- a/customer-specific/pasa/src/appMain/smartDeviceLink.ini +++ b/customer-specific/pasa/src/appMain/smartDeviceLink.ini @@ -81,6 +81,10 @@ RecordingFileSource = audio.8bit.wav ; Recording file for audio pass thru RecordingFileName = audio.wav MQAudioPath = /dev/mqueue/AppLinkAudioPass +; Defines time in milliseconds for SDL to wait for the next package of raw data over audio service +AudioDataStoppedTimeout = 1000 +; Defines time in milliseconds for SDL to wait for the next package of raw data over video service +VideoDataStoppedTimeout = 1000 ; HelpPromt and TimeOutPrompt is a vector of strings separated by comma diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt index dcc5a74570..bef3cdd8fe 100644 --- a/src/components/application_manager/CMakeLists.txt +++ b/src/components/application_manager/CMakeLists.txt @@ -115,6 +115,8 @@ file (GLOB MOBILE_COMMANDS_SOURCES ${AM_SOURCE_DIR}/src/commands/hmi/on_update_device_list.cc ${AM_SOURCE_DIR}/src/commands/hmi/update_device_list_request.cc ${AM_SOURCE_DIR}/src/commands/hmi/update_device_list_response.cc + ${AM_SOURCE_DIR}/src/commands/hmi/on_audio_data_streaming_notification.cc + ${AM_SOURCE_DIR}/src/commands/hmi/on_video_data_streaming_notification.cc ${AM_SOURCE_DIR}/src/commands/hmi/on_sdl_consent_needed_notification.cc ${AM_SOURCE_DIR}/src/commands/hmi/on_sdl_persistence_complete_notification.cc ${AM_SOURCE_DIR}/src/commands/hmi/on_exit_all_applications_notification.cc diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h new file mode 100644 index 0000000000..97a979065e --- /dev/null +++ b/src/components/application_manager/include/application_manager/commands/hmi/on_audio_data_streaming_notification.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_ + +#include "application_manager/commands/hmi/notification_to_hmi.h" + +namespace application_manager { + +namespace commands { + +/** + * @brief OnAudioDataStreamingNotification command class + **/ +class OnAudioDataStreamingNotification : public NotificationToHMI { + public: + /** + * @brief OnAudioDataStreamingNotification class constructor + * + * @param message Incoming SmartObject message + **/ + explicit OnAudioDataStreamingNotification(const MessageSharedPtr& message); + + /** + * @brief OnAudioDataStreamingNotification class destructor + **/ + virtual ~OnAudioDataStreamingNotification(); + + /** + * @brief Execute command + **/ + virtual void Run(); + + private: + DISALLOW_COPY_AND_ASSIGN(OnAudioDataStreamingNotification); +}; + +} // namespace commands + +} // namespace application_manager + +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_AUDIO_DATA_STREAMING_NOTIFICATION_H_ + diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h new file mode 100644 index 0000000000..38749ba8f8 --- /dev/null +++ b/src/components/application_manager/include/application_manager/commands/hmi/on_video_data_streaming_notification.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_ + +#include "application_manager/commands/hmi/notification_to_hmi.h" + +namespace application_manager { + +namespace commands { + +/** + * @brief OnVideoDataStreamingNotification command class + **/ +class OnVideoDataStreamingNotification : public NotificationToHMI { + public: + /** + * @brief OnVideoDataStreamingNotification class constructor + * + * @param message Incoming SmartObject message + **/ + explicit OnVideoDataStreamingNotification(const MessageSharedPtr& message); + + /** + * @brief OnVideoDataStreamingNotification class destructor + **/ + virtual ~OnVideoDataStreamingNotification(); + + /** + * @brief Execute command + **/ + virtual void Run(); + + private: + DISALLOW_COPY_AND_ASSIGN(OnVideoDataStreamingNotification); +}; + +} // namespace commands + +} // namespace application_manager + +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VIDEO_DATA_STREAMING_NOTIFICATION_H_ + diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h index a2d51da416..12705c619a 100644 --- a/src/components/application_manager/include/application_manager/message_helper.h +++ b/src/components/application_manager/include/application_manager/message_helper.h @@ -402,6 +402,9 @@ class MessageHelper { */ static void SendAudioStopStream(int32_t connection_key); + static void SendOnDataStreaming(protocol_handler::ServiceType service, + bool available); + /* * @brief Sends notification to HMI to stop audioPathThru * diff --git a/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc b/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc new file mode 100644 index 0000000000..d94d298509 --- /dev/null +++ b/src/components/application_manager/src/commands/hmi/on_audio_data_streaming_notification.cc @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, 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 "application_manager/commands/hmi/on_audio_data_streaming_notification.h" + +namespace application_manager { + +namespace commands { + +OnAudioDataStreamingNotification::OnAudioDataStreamingNotification( + const MessageSharedPtr& message) + : NotificationToHMI(message) { +} + +OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() { +} + +void OnAudioDataStreamingNotification::Run() { + LOG4CXX_AUTO_TRACE(logger_); + SendNotification(); +} + +} // namespace commands + +} // namespace application_manager + diff --git a/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc b/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc new file mode 100644 index 0000000000..12642a75f2 --- /dev/null +++ b/src/components/application_manager/src/commands/hmi/on_video_data_streaming_notification.cc @@ -0,0 +1,55 @@ + +/* + * Copyright (c) 2015, 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 "application_manager/commands/hmi/on_video_data_streaming_notification.h" + +namespace application_manager { + +namespace commands { + +OnVideoDataStreamingNotification::OnVideoDataStreamingNotification( + const MessageSharedPtr& message) + : NotificationToHMI(message) { +} + +OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() { +} + +void OnVideoDataStreamingNotification::Run() { + LOG4CXX_AUTO_TRACE(logger_); + SendNotification(); +} + +} // namespace commands + +} // namespace application_manager diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc index 67e7ab6956..f8bf47bb71 100644 --- a/src/components/application_manager/src/hmi_command_factory.cc +++ b/src/components/application_manager/src/hmi_command_factory.cc @@ -63,6 +63,8 @@ #include "application_manager/commands/hmi/on_app_permission_changed_notification.h" #include "application_manager/commands/hmi/on_app_permission_consent_notification.h" #include "application_manager/commands/hmi/on_app_activated_notification.h" +#include "application_manager/commands/hmi/on_audio_data_streaming_notification.h" +#include "application_manager/commands/hmi/on_video_data_streaming_notification.h" #include "application_manager/commands/hmi/on_sdl_consent_needed_notification.h" #include "application_manager/commands/hmi/on_exit_all_applications_notification.h" #include "application_manager/commands/hmi/on_exit_application_notification.h" @@ -1962,6 +1964,14 @@ CommandSharedPtr HMICommandFactory::CreateCommand( } break; } + case hmi_apis::FunctionID::Navigation_OnAudioDataStreaming: { + command.reset(new commands::OnAudioDataStreamingNotification(message)); + break; + } + case hmi_apis::FunctionID::Navigation_OnVideoDataStreaming: { + command.reset(new commands::OnVideoDataStreamingNotification(message)); + break; + } case hmi_apis::FunctionID::VR_PerformInteraction: { if (is_response) { command.reset(new commands::VRPerformInteractionResponse(message)); diff --git a/src/components/application_manager/src/message_helper.cc b/src/components/application_manager/src/message_helper.cc index e578be23ee..461c2d169a 100644 --- a/src/components/application_manager/src/message_helper.cc +++ b/src/components/application_manager/src/message_helper.cc @@ -1842,6 +1842,36 @@ void MessageHelper::SendAudioStopStream(int32_t connection_key) { ApplicationManagerImpl::instance()->ManageHMICommand(stop_stream); } +void MessageHelper::SendOnDataStreaming(protocol_handler::ServiceType service, + bool available) { + using namespace protocol_handler; + smart_objects::SmartObjectSPtr notification = new smart_objects::SmartObject( + smart_objects::SmartType_Map); + + if (!notification) { + return; + } + + if (ServiceType::kAudio != service && ServiceType::kMobileNav != service) { + return; + } + + (*notification)[strings::params][strings::function_id] = + ServiceType::kAudio == service + ? hmi_apis::FunctionID::Navigation_OnAudioDataStreaming + : hmi_apis::FunctionID::Navigation_OnVideoDataStreaming; + (*notification)[strings::params][strings::message_type] = + hmi_apis::messageType::notification; + (*notification)[strings::params][strings::protocol_version] = + commands::CommandImpl::protocol_version_; + (*notification)[strings::params][strings::protocol_type] = + commands::CommandImpl::hmi_protocol_type_; + + (*notification)[strings::msg_params]["available"] = available; + + ApplicationManagerImpl::instance()->ManageHMICommand(notification); +} + bool MessageHelper::SendStopAudioPathThru() { LOG4CXX_INFO(logger_, "MessageHelper::SendAudioStopAudioPathThru"); diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h index e81bda6fb9..c372109c29 100644 --- a/src/components/config_profile/include/config_profile/profile.h +++ b/src/components/config_profile/include/config_profile/profile.h @@ -240,6 +240,19 @@ class Profile : public utils::Singleton<Profile> { * @brief Returns path to testing file to which redirects audio stream */ const std::string& audio_stream_file() const; + + /** + * @brief Returns timeout for SDL to wait for the next package of raw data + * over audio service + */ + const std::uint32_t audio_data_stopped_timeout() const; + + /** + * @brief Returns timeout for SDL to wait for the next package of raw data + * over video service + */ + const std::uint32_t video_data_stopped_timeout() const; + /** * @brief Returns allowable max amount of requests per time scale for * application in hmi level none @@ -661,6 +674,8 @@ private: std::string system_files_path_; uint16_t transport_manager_tcp_adapter_port_; std::string tts_delimiter_; + std::uint32_t audio_data_stopped_timeout_; + std::uint32_t video_data_stopped_timeout_; std::string mme_db_name_; std::string event_mq_name_; std::string ack_mq_name_; diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc index 8fc48c6ff1..1522228d2a 100644 --- a/src/components/config_profile/src/profile.cc +++ b/src/components/config_profile/src/profile.cc @@ -99,8 +99,8 @@ const char* kNamedVideoPipePathKey = "NamedVideoPipePath"; const char* kNamedAudioPipePathKey = "NamedAudioPipePath"; const char* kVideoStreamFileKey = "VideoStreamFile"; const char* kAudioStreamFileKey = "AudioStreamFile"; - - +const char* kAudioDataStoppedTimeoutKey = "AudioDataStoppedTimeout"; +const char* kVideoDataStoppedTimeoutKey = "VideoDataStoppedTimeout"; const char* kMixingAudioSupportedKey = "MixingAudioSupported"; const char* kHelpPromptKey = "HelpPromt"; const char* kTimeoutPromptKey = "TimeOutPromt"; @@ -172,6 +172,8 @@ const char* kDefaultServerAddress = "127.0.0.1"; const char* kDefaultAppInfoFileName = "app_info.dat"; const char* kDefaultSystemFilesPath = "/tmp/fs/mp/images/ivsu_cache"; const char* kDefaultTtsDelimiter = ","; +const uint32_t kDefaultAudioDataStoppedTimeout = 1000; +const uint32_t kDefaultVideoDataStoppedTimeout = 1000; const char* kDefaultMmeDatabaseName = "/dev/qdb/mediaservice_db"; const char* kDefaultEventMQ = "/dev/mqueue/ToSDLCoreUSBAdapter"; const char* kDefaultAckMQ = "/dev/mqueue/FromSDLCoreUSBAdapter"; @@ -285,23 +287,25 @@ Profile::Profile() system_files_path_(kDefaultSystemFilesPath), transport_manager_tcp_adapter_port_(kDefautTransportManagerTCPPort), tts_delimiter_(kDefaultTtsDelimiter), - mme_db_name_(kDefaultMmeDatabaseName), - event_mq_name_(kDefaultEventMQ), - ack_mq_name_(kDefaultAckMQ), - recording_file_source_(kDefaultRecordingFileSourceName), - recording_file_name_(kDefaultRecordingFileName), - application_list_update_timeout_(kDefaultApplicationListUpdateTimeout), - iap_legacy_protocol_mask_(kDefaultLegacyProtocolMask), - iap_hub_protocol_mask_(kDefaultHubProtocolMask), - iap_pool_protocol_mask_(kDefaultPoolProtocolMask), - iap_system_config_(kDefaultIAPSystemConfig), - iap2_system_config_(kDefaultIAP2SystemConfig), - iap2_hub_connect_attempts_(kDefaultIAP2HubConnectAttempts), - iap_hub_connection_wait_timeout_(kDefaultIAPHubConnectionWaitTimeout), - tts_global_properties_timeout_(kDefaultTTSGlobalPropertiesTimeout), - attempts_to_open_policy_db_(kDefaultAttemptsToOpenPolicyDB), - open_attempt_timeout_ms_(kDefaultAttemptsToOpenPolicyDB), - hash_string_size_(kDefaultHashStringSize) { + audio_data_stopped_timeout_(kDefaultAudioDataStoppedTimeout), + video_data_stopped_timeout_(kDefaultVideoDataStoppedTimeout), + mme_db_name_(kDefaultMmeDatabaseName), + event_mq_name_(kDefaultEventMQ), + ack_mq_name_(kDefaultAckMQ), + recording_file_source_(kDefaultRecordingFileSourceName), + recording_file_name_(kDefaultRecordingFileName), + application_list_update_timeout_(kDefaultApplicationListUpdateTimeout), + iap_legacy_protocol_mask_(kDefaultLegacyProtocolMask), + iap_hub_protocol_mask_(kDefaultHubProtocolMask), + iap_pool_protocol_mask_(kDefaultPoolProtocolMask), + iap_system_config_(kDefaultIAPSystemConfig), + iap2_system_config_(kDefaultIAP2SystemConfig), + iap2_hub_connect_attempts_(kDefaultIAP2HubConnectAttempts), + iap_hub_connection_wait_timeout_(kDefaultIAPHubConnectionWaitTimeout), + tts_global_properties_timeout_(kDefaultTTSGlobalPropertiesTimeout), + attempts_to_open_policy_db_(kDefaultAttemptsToOpenPolicyDB), + open_attempt_timeout_ms_(kDefaultAttemptsToOpenPolicyDB), + hash_string_size_(kDefaultHashStringSize) { } Profile::~Profile() { @@ -464,6 +468,13 @@ const std::string& Profile::audio_stream_file() const { return audio_stream_file_; } +const std::uint32_t Profile::audio_data_stopped_timeout() const { + return audio_data_stopped_timeout_; +} + +const std::uint32_t Profile::video_data_stopped_timeout() const { + return video_data_stopped_timeout_; +} const uint32_t& Profile::app_time_scale() const { return app_requests_time_scale_; @@ -902,6 +913,17 @@ void Profile::UpdateValues() { LOG_UPDATED_VALUE(audio_stream_file_, kAudioStreamFileKey, kMediaManagerSection); + ReadUIntValue(&audio_data_stopped_timeout_, kDefaultAudioDataStoppedTimeout, + kMediaManagerSection, kAudioDataStoppedTimeoutKey); + + LOG_UPDATED_VALUE(audio_data_stopped_timeout_, kAudioDataStoppedTimeoutKey, + kMediaManagerSection); + + ReadUIntValue(&video_data_stopped_timeout_, kDefaultVideoDataStoppedTimeout, + kMediaManagerSection, kVideoDataStoppedTimeoutKey); + + LOG_UPDATED_VALUE(video_data_stopped_timeout_, kVideoDataStoppedTimeoutKey, + kMediaManagerSection); // Mixing audio parameter std::string mixing_audio_value; diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 77e3a0d382..8652c8e414 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -3201,6 +3201,18 @@ </function> <function name="StopAudioStream" messagetype="response"> </function> + <function name="OnAudioDataStreaming" messagetype="notification"> + <description>Sender: SDL->HMI. Purpose: notify about raw audio data presence over the URL provided via StartAudioStream SDL's request.</description> + <param name="available" type="Boolean" mandatory="true"> + <description>If "true" - audio data started. If "false" - audio data stopped.</description> + </param> + </function> + <function name="OnVideoDataStreaming" messagetype="notification"> + <description>Sender: SDL->HMI. Purpose: notify about raw video data presence over the URL provided via StartStream SDL's request.</description> + <param name="available" type="Boolean" mandatory="true"> + <description>If "true" - video data started. If "false" - video data stopped.</description> + </param> + </function> </interface> diff --git a/src/components/interfaces/QT_HMI_API.xml b/src/components/interfaces/QT_HMI_API.xml index aa6990e69a..5b13cf020f 100644 --- a/src/components/interfaces/QT_HMI_API.xml +++ b/src/components/interfaces/QT_HMI_API.xml @@ -3074,7 +3074,21 @@ </function> <function name="StopAudioStream" messagetype="response"> </function> + <function name="OnAudioDataStreaming" messagetype="notification"> + <description>Sender: SDL->HMI. Purpose: notify about raw audio data presence over the URL provided via StartAudioStream SDL's request.</description> + <param name="available" type="Boolean" mandatory="true"> + <description>If "true" - audio data started. If "false" - audio data stopped.</description> + </param> + </function> + <function name="OnVideoDataStreaming" messagetype="notification"> + <description>Sender: SDL->HMI. Purpose: notify about raw video data presence over the URL provided via StartStream SDL's request.</description> + <param name="available" type="Boolean" mandatory="true"> + <description>If "true" - video data started. If "false" - video data stopped.</description> + </param> + </function> + </interface> + <interface name="VehicleInfo" version="1.0" date="2013-04-21"> <function name="IsReady" messagetype="request" provider="hmi"> <description>Method is invoked at system startup. Response should provide information about presence of any of vehicle information modules (ECU, GPS, etc) and their readiness to cooperate with SDL.</description> |