Skip to content

Commit

Permalink
Merge branch 'rdkcentral:sprint/2401' into for_checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
gururaajar authored Mar 22, 2024
2 parents 88ad8d2 + 436bb02 commit 41981c0
Show file tree
Hide file tree
Showing 25 changed files with 1,185 additions and 60 deletions.
53 changes: 34 additions & 19 deletions AVOutput/AVOutputTV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3377,6 +3377,8 @@ namespace Plugin {
std::string source;
std::string format;
int lowLatencyIndex = 0;
int prevLowLatencyIndex = 0;
int params[3]={0};
tvError_t ret = tvERROR_NONE;

value = parameters.HasLabel("LowLatencyState") ? parameters["LowLatencyState"].String() : "";
Expand All @@ -3396,35 +3398,48 @@ namespace Plugin {
}

if( !isCapablityCheckPassed(pqmode, source, format, "LowLatencyState" ))
{
{
LOGERR("%s: CapablityCheck failed for LowLatencyState\n", __FUNCTION__);
returnResponse(false);
}

if( isSetRequired(pqmode,source,format) )
{
LOGINFO("Proceed with setLowLatencyState\n");
ret = SetLowLatencyState( lowLatencyIndex );
/* Usually low latency is enabled with Game mode but when setLowLatency is done seperatly, it requires PQ Mode reload.
To allow pq reload to fetch latest low latency values, save low latency before set is done. */
ret = GetLowLatencyState(&prevLowLatencyIndex);
if(ret != tvERROR_NONE) {
LOGERR("Get previous low latency state failed\n");
returnResponse(false);
}

if(ret != tvERROR_NONE)
{
LOGERR("Failed to setLowLatency\n");
returnResponse(false);
params[0]=lowLatencyIndex;
int retval= UpdateAVoutputTVParam("set","LowLatencyState",pqmode,source,format,PQ_PARAM_LOWLATENCY_STATE,params);
if(retval != 0 )
{
LOGERR("Failed to SaveLowLatency to ssm_data\n");
returnResponse(false);
}
else
{
int params[3]={0};
params[0]=lowLatencyIndex;
int retval= UpdateAVoutputTVParam("set","LowLatencyState",pqmode,source,format,PQ_PARAM_LOWLATENCY_STATE,params);
if(retval != 0 )
else
{
if( isSetRequired(pqmode,source,format) )
{
LOGERR("Failed to SaveLowLatency to ssm_data\n");
returnResponse(false);
LOGINFO("Proceed with setLowLatencyState\n");
ret = SetLowLatencyState( lowLatencyIndex );
if(ret != tvERROR_NONE)
{
params[0]=prevLowLatencyIndex;
LOGERR("Failed to set low latency. Fallback to previous state %d\n", prevLowLatencyIndex);

retval= UpdateAVoutputTVParam("set","LowLatencyState",pqmode,source,format,PQ_PARAM_LOWLATENCY_STATE,params);
if(retval != 0 ){
LOGERR("Fallback to previous low latency state %d failed.\n", prevLowLatencyIndex);
}

returnResponse(false);
}
}
LOGINFO("Exit : setLowLatency successful to value: %d\n", lowLatencyIndex);
returnResponse(true);
}
LOGINFO("Exit : setLowLatency successful to value: %d\n", lowLatencyIndex);
returnResponse(true);
}

uint32_t AVOutputTV::getLowLatencyState(const JsonObject& parameters, JsonObject& response)
Expand Down
4 changes: 4 additions & 0 deletions AVOutput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.4] - 2024-03-05
### Fixed
- allm set after sync as it requires pq reload

## [1.0.3] - 2024-02-26
### Fixed
- Header cleanup
Expand Down
6 changes: 5 additions & 1 deletion DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static bool isCecEnabled = false;
static int hdmiArcPortId = -1;
static int retryPowerRequestCount = 0;
static int hdmiArcVolumeLevel = 0;
std::thread audioPortInitThread;
std::vector<int> sad_list;
#ifdef USE_IARM
namespace
Expand Down Expand Up @@ -560,6 +561,9 @@ namespace WPEFramework {
{
if (m_sendMsgThread.joinable())
m_sendMsgThread.join();
if(audioPortInitThread.joinable()){
audioPortInitThread.join();
}
}
catch(const std::system_error& e)
{
Expand Down Expand Up @@ -4677,7 +4681,7 @@ namespace WPEFramework {
try
{
LOGWARN("creating worker thread for initAudioPortsWorker ");
std::thread audioPortInitThread = std::thread(initAudioPortsWorker);
audioPortInitThread = std::thread(initAudioPortsWorker);
audioPortInitThread.detach();
}
catch(const std::system_error& e)
Expand Down
55 changes: 27 additions & 28 deletions Network/NetworkConnectivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ namespace WPEFramework {
}
}
}
//else
// LOGERR("endpoint = <%s> error = %d (%s)", endpoint, msg->data.result, curl_easy_strerror(msg->data.result));
else
LOGERR("endpoint = <%s> curl error = %d (%s)", endpoint, msg->data.result, curl_easy_strerror(msg->data.result));
http_responses.push_back(response_code);
}
time_earlier = time_now;
Expand Down Expand Up @@ -429,7 +429,11 @@ namespace WPEFramework {
break;
default:
InternetConnectionState = NO_INTERNET;
LOGINFO("Internet State: NO_INTERNET Response code: <%d> %.1f%%", static_cast<int>(http_response_code), (percentage*100));
if(http_response_code == -1)
LOGERR("Internet State: NO_INTERNET curl error");
else
LOGWARN("Internet State: NO_INTERNET Received http response code: <%d> %.1f%%", static_cast<int>(http_response_code), percentage * 100);
break;
}
}

Expand Down Expand Up @@ -513,29 +517,31 @@ namespace WPEFramework {

bool ConnectivityMonitor::stopInitialConnectivityMonitoring()
{
if (isMonitorThreadRunning())

if(isContinuesMonitoringNeeded)
{
LOGWARN("Continuous Connectivity Monitor is running");
return true;
}
else
{
if(isContinuesMonitoringNeeded)
if (!isMonitorThreadRunning())
{
LOGWARN("Continuous Connectivity Monitor is running");
return true;
LOGWARN("Connectivity monitor not running");
}
else
{
stopFlag = true;
cv_.notify_all();

if (thread_.joinable()) {
thread_.join();
threadRunning = false;
LOGINFO("Stoping Initial Connectivity Monitor");
}
else
LOGWARN("thread not joinable !");
stopFlag = true;
cv_.notify_all();

if (thread_.joinable())
{
thread_.join();
threadRunning = false;
LOGINFO("Stoping Initial Connectivity Monitor");
}
else
LOGWARN("thread not joinable !");
}
else
LOGWARN("Continuous Connectivity Monitor not running");

return true;
}
Expand All @@ -545,11 +551,9 @@ namespace WPEFramework {
if (!isMonitorThreadRunning())
{
LOGWARN("Connectivity monitor not running");
return false;
}
cv_.notify_all();
stopFlag = true;
LOGINFO("stoping connectivityMonitor...");

if (thread_.joinable())
{
Expand Down Expand Up @@ -595,17 +599,12 @@ namespace WPEFramework {

if(stopFlag)
{
LOGWARN("stopFlag true exiting");
threadRunning = false;
break;
}
//wait for next timout or conditon signal
std::unique_lock<std::mutex> lock(mutex_);
if (cv_.wait_for(lock, std::chrono::seconds(timeout.load())) == std::cv_status::timeout)
{
LOGINFO("Connectivity monitor thread timeout");
}
else
if (cv_.wait_for(lock, std::chrono::seconds(timeout.load())) != std::cv_status::timeout)
{
if(!stopFlag)
{
Expand Down
14 changes: 13 additions & 1 deletion PersistentStore/grpc/Store2.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ namespace Plugin {
uint32_t SetValue(const ScopeType scope, const string& ns, const string& key, const string& value, const uint32_t ttl) override
{
ASSERT(scope == ScopeType::ACCOUNT);
if (scope != ScopeType::ACCOUNT) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -186,6 +189,9 @@ namespace Plugin {
uint32_t GetValue(const ScopeType scope, const string& ns, const string& key, string& value, uint32_t& ttl) override
{
ASSERT(scope == ScopeType::ACCOUNT);
if (scope != ScopeType::ACCOUNT) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -239,6 +245,9 @@ namespace Plugin {
uint32_t DeleteKey(const ScopeType scope, const string& ns, const string& key) override
{
ASSERT(scope == ScopeType::ACCOUNT);
if (scope != ScopeType::ACCOUNT) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -271,6 +280,9 @@ namespace Plugin {
uint32_t DeleteNamespace(const ScopeType scope, const string& ns) override
{
ASSERT(scope == ScopeType::ACCOUNT);
if (scope != ScopeType::ACCOUNT) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -307,7 +319,7 @@ namespace Plugin {
index(_clients.begin());

while (index != _clients.end()) {
(*index)->ValueChanged(ScopeType::DEVICE, ns, key, value);
(*index)->ValueChanged(ScopeType::ACCOUNT, ns, key, value);
index++;
}
}
Expand Down
12 changes: 12 additions & 0 deletions PersistentStore/sqlite/Store2.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ namespace Plugin {
uint32_t SetValue(const ScopeType scope, const string& ns, const string& key, const string& value, const uint32_t ttl) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -195,6 +198,9 @@ namespace Plugin {
uint32_t GetValue(const ScopeType scope, const string& ns, const string& key, string& value, uint32_t& ttl) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -253,6 +259,9 @@ namespace Plugin {
uint32_t DeleteKey(const ScopeType scope, const string& ns, const string& key) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand All @@ -279,6 +288,9 @@ namespace Plugin {
uint32_t DeleteNamespace(const ScopeType scope, const string& ns) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down
9 changes: 9 additions & 0 deletions PersistentStore/sqlite/StoreInspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ namespace Plugin {
uint32_t GetKeys(const ScopeType scope, const string& ns, RPC::IStringIterator*& keys) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -114,6 +117,9 @@ namespace Plugin {
uint32_t GetNamespaces(const ScopeType scope, RPC::IStringIterator*& namespaces) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand All @@ -139,6 +145,9 @@ namespace Plugin {
uint32_t GetStorageSizes(const ScopeType scope, INamespaceSizeIterator*& storageList) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down
6 changes: 6 additions & 0 deletions PersistentStore/sqlite/StoreLimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ namespace Plugin {
uint32_t SetNamespaceStorageLimit(const ScopeType scope, const string& ns, const uint32_t size) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down Expand Up @@ -129,6 +132,9 @@ namespace Plugin {
uint32_t GetNamespaceStorageLimit(const ScopeType scope, const string& ns, uint32_t& size) override
{
ASSERT(scope == ScopeType::DEVICE);
if (scope != ScopeType::DEVICE) {
return Core::ERROR_GENERAL;
}

uint32_t result;

Expand Down
4 changes: 4 additions & 0 deletions WebKitBrowser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.1.20] - 2023-12-21
### Changed
- Add test runner support

## [1.1.19] - 2023-11-22
### Changed
- Fix memory pressure settings config generation
Expand Down
7 changes: 7 additions & 0 deletions WebKitBrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ option(PLUGIN_APPS_ENABLE_JIT "Enable the use of JIT javascript optimalization"
option(PLUGIN_APPS_ENABLE_DFG "Enable the use of DFG javascript optimalization" OFF)
option(PLUGIN_WEBKITBROWSER_CLOUD_COOKIEJAR "Enable support for exporting/importing cookie jar" OFF)
option(PLUGIN_WEBKITBROWSER_LOGGING_UTILS "Enable possibility to redirect stdout/err to specific systemd service" OFF)
option(PLUGIN_WEBKITBROWSER_TESTING "Enable testing framework with custom JS APIs" OFF)

set(PLUGIN_WEBKITBROWSER_IMPLEMENTATION "${MODULE_NAME}Impl" CACHE STRING "Specify a library with a webkit implementation." )

Expand Down Expand Up @@ -277,6 +278,12 @@ if (PLUGIN_WEBKITBROWSER_LOGGING_UTILS)
target_sources(${PLUGIN_WEBKITBROWSER_IMPLEMENTATION} PRIVATE LoggingUtils.cpp)
endif()

if (PLUGIN_WEBKITBROWSER_TESTING AND WEBKIT_GLIB_API)
# Enable for GLIB Api only
target_compile_definitions(${PLUGIN_WEBKITBROWSER_IMPLEMENTATION} PRIVATE ENABLE_TESTING)
include(Testing/CMakeLists.txt)
endif()

if(WPE_WEBKIT_DEPRECATED_API)
target_compile_definitions(${PLUGIN_WEBKITBROWSER_IMPLEMENTATION} PRIVATE WPE_WEBKIT_DEPRECATED_API)
endif()
Expand Down
Loading

0 comments on commit 41981c0

Please sign in to comment.