Skip to content

Commit b6986b8

Browse files
committed
Renamed the PictureModes modes and resolved the setPictureMode issue
1 parent fb2a876 commit b6986b8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

AVOutput/AVOutputTV.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,7 @@ namespace Plugin {
29942994
returnResponse(false);
29952995
}
29962996

2997-
std::vector<std::string> extraModes = {"DVIQ", "Dark", "AIPQ", "Bright"};
2997+
std::vector<std::string> extraModes = {"IQ", "Dark", "AI PQ", "Bright"};
29982998

29992999
// Check if value is in the list of four modes
30003000
auto iter = std::find(extraModes.begin(), extraModes.end(), value);
@@ -3006,7 +3006,8 @@ namespace Plugin {
30063006
if( isSetRequired("Current",inputInfo.source,inputInfo.format) ) {
30073007
LOGINFO("Proceed with SetTVPictureMode\n");
30083008
if (isDolbyPQmode) {
3009-
ret = SetTVPictureMode("EnergySaving");
3009+
LOGINFO("PQ mode =%s\n",value.c_str());
3010+
returnResponse(true);
30103011
}
30113012
else {
30123013
ret = SetTVPictureMode(value.c_str());

AVOutput/AVOutputTVHelper.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ namespace Plugin {
672672
}
673673
if (param == "PictureMode") {
674674
// Add extra accepted parameters
675-
std::vector<std::string> extraModes = {"DVIQ", "Dark", "AIPQ", "Bright"};
675+
std::vector<std::string> extraModes = {"IQ", "Dark", "AI PQ", "Bright"};
676676
info.rangeVector.insert(info.rangeVector.end(), extraModes.begin(), extraModes.end());
677677
}
678678

@@ -1274,8 +1274,12 @@ namespace Plugin {
12741274
convertVideoFormatToString(formatType)+"."+"PictureModeString";
12751275

12761276
err = getLocalParam(rfc_caller_id, tr181_param_name.c_str(), &param);
1277-
if ( tr181Success == err ) {
1277+
1278+
if ( tr181Success == err ) {
12781279
std::string local = param.value;
1280+
if (local == "Dark" || local == "Bright" || local == "IQ" || local =="AI PQ"){
1281+
local = "EnergySaving";
1282+
}
12791283
int pqmodeindex = (int)getPictureModeIndex(local);
12801284

12811285
tvError_t tv_err = SaveSourcePictureMode(sourceType, formatType, pqmodeindex);
@@ -2290,17 +2294,19 @@ namespace Plugin {
22902294
}
22912295
#define HAL_NOT_READY 1
22922296
#if HAL_NOT_READY
2293-
#define CAPABLITY_FILE_NAMEV2 "/opt/panel/pq_capabilities.json"
2297+
#define CAPABLITY_FILE_NAMEV2 "/etc/pq_capabilities.json"
22942298
// Ensure maps are defined
22952299
typedef std::map<tvPQModeIndex_t, std::string> PqModeMap;
22962300
typedef std::map<tvVideoFormatType_t, std::string> VideoFormatMap;
22972301
typedef std::map<tvVideoSrcType_t, std::string> VideoSrcMap;
22982302

22992303
const std::map<int, std::string> AVOutputTV::pqModeMap = {
23002304
{PQ_MODE_SPORTS, "Sports"},
2305+
{PQ_MODE_THEATER, "Theater"},
23012306
{PQ_MODE_GAME, "Game"},
2302-
{PQ_MODE_DVIQ, "DV IQ"},
2303-
{PQ_MODE_DARK, "DV Dark"},
2307+
{PQ_MODE_DVIQ, "IQ"},
2308+
{PQ_MODE_DARK, "Dark"},
2309+
{PQ_MODE_BRIGHT, "Bright"},
23042310
{PQ_MODE_AIPQ, "AI PQ"},
23052311
{PQ_MODE_STANDARD, "Standard"},
23062312
{PQ_MODE_VIVID, "Vivid"},

0 commit comments

Comments
 (0)