Skip to content

Commit

Permalink
Merge pull request rdkcentral#3518 from apatel859/main
Browse files Browse the repository at this point in the history
RDK-38773: Display video format indicator
  • Loading branch information
anand-ky authored Dec 9, 2022
2 parents 9851a59 + bc73631 commit 556e81d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
4 changes: 4 additions & 0 deletions DisplaySettings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
## [1.0.16] - 2022-12-09
### Fixed
- Fixed Added support for HDRPLUS format support

## [1.0.15] - 2022-11-15
### Fixed
- Fixed No Audio issue while playing Dolby Mat and HDMI hotplug
Expand Down
21 changes: 17 additions & 4 deletions DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ using namespace std;

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 0
#define API_VERSION_NUMBER_PATCH 15
#define API_VERSION_NUMBER_PATCH 16

static bool isCecArcRoutingThreadEnabled = false;
static bool isCecEnabled = false;
Expand Down Expand Up @@ -1835,9 +1835,11 @@ namespace WPEFramework {

if(!capabilities)hdrCapabilities.Add("none");
if(capabilities & dsHDRSTANDARD_HDR10)hdrCapabilities.Add("HDR10");
if(capabilities & dsHDRSTANDARD_HDR10PLUS)hdrCapabilities.Add("HDR10PLUS");
if(capabilities & dsHDRSTANDARD_HLG)hdrCapabilities.Add("HLG");
if(capabilities & dsHDRSTANDARD_DolbyVision)hdrCapabilities.Add("Dolby Vision");
if(capabilities & dsHDRSTANDARD_TechnicolorPrime)hdrCapabilities.Add("Technicolor Prime");
if(capabilities & dsHDRSTANDARD_SDR)hdrCapabilities.Add("SDR");

if(capabilities)
{
Expand Down Expand Up @@ -1880,9 +1882,11 @@ namespace WPEFramework {

if(!capabilities)hdrCapabilities.Add("none");
if(capabilities & dsHDRSTANDARD_HDR10)hdrCapabilities.Add("HDR10");
if(capabilities & dsHDRSTANDARD_HDR10PLUS)hdrCapabilities.Add("HDR10PLUS");
if(capabilities & dsHDRSTANDARD_HLG)hdrCapabilities.Add("HLG");
if(capabilities & dsHDRSTANDARD_DolbyVision)hdrCapabilities.Add("Dolby Vision");
if(capabilities & dsHDRSTANDARD_TechnicolorPrime)hdrCapabilities.Add("Technicolor Prime");
if(capabilities & dsHDRSTANDARD_SDR)hdrCapabilities.Add("SDR");

if(capabilities)
{
Expand Down Expand Up @@ -5558,11 +5562,12 @@ namespace WPEFramework {
return videoFormats;
}

videoFormats.Add("SDR");
if(capabilities & dsHDRSTANDARD_HDR10)videoFormats.Add("HDR10");
if(capabilities & dsHDRSTANDARD_HLG)videoFormats.Add("HLG");
if(capabilities & dsHDRSTANDARD_DolbyVision)videoFormats.Add("DV");
if(capabilities & dsHDRSTANDARD_TechnicolorPrime)videoFormats.Add("Technicolor Prime");
if(capabilities & dsHDRSTANDARD_HDR10PLUS)videoFormats.Add("HDR10PLUS");
if(capabilities & dsHDRSTANDARD_SDR)videoFormats.Add("SDR");
for (uint32_t i = 0; i < videoFormats.Length(); i++)
{
LOGINFO("capabilities: %s", videoFormats[i].String().c_str());
Expand All @@ -5575,14 +5580,18 @@ namespace WPEFramework {
const char *strValue = "NONE";
switch (format)
{
case dsHDRSTANDARD_NONE:
case dsHDRSTANDARD_SDR:
LOGINFO("Video Format: SDR\n");
strValue = "SDR";
break;
case dsHDRSTANDARD_HDR10:
LOGINFO("Video Format: HDR10\n");
strValue = "HDR10";
break;
case dsHDRSTANDARD_HDR10PLUS:
LOGINFO("Video Format: HDR10PLUS\n");
strValue = "HDR10PLUS";
break;
case dsHDRSTANDARD_HLG:
LOGINFO("Video Format: HLG\n");
strValue = "HLG";
Expand All @@ -5606,10 +5615,14 @@ namespace WPEFramework {
dsHDRStandard_t DisplaySettings::getVideoFormatTypeFromString(const char *strFormat)
{
dsHDRStandard_t mode = dsHDRSTANDARD_NONE;
if(strcmp(strFormat,"SDR")== 0 || strcmp(strFormat,"NONE")== 0 )
if(strcmp(strFormat,"SDR")== 0 )
mode = dsHDRSTANDARD_SDR;
else if(strcmp(strFormat,"NONE")== 0)
mode = dsHDRSTANDARD_NONE;
else if(strcmp(strFormat,"HDR10")== 0)
mode = dsHDRSTANDARD_HDR10;
else if(strcmp(strFormat,"HDR10PLUS")== 0)
mode = dsHDRSTANDARD_HDR10PLUS;
else if(strcmp(strFormat,"DV")== 0)
mode = dsHDRSTANDARD_DolbyVision;
else if(strcmp(strFormat,"HLG")== 0)
Expand Down
8 changes: 4 additions & 4 deletions DisplaySettings/DisplaySettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"type": "array",
"items": {
"type": "string",
"example": "`SDR`, `HDR10`, `HLG`, `DV`, `Technicolor Prime`"
"example": "`SDR`, `HDR10`, `HDR10PLUS`, `HLG`, `DV`, `Technicolor Prime`"
}
},
"currentAudioFormat": {
Expand Down Expand Up @@ -141,7 +141,7 @@
"example":"STEREO"
},
"standards": {
"summary": "A string [] of HDR capabilities. Possible values: `none`, `HDR10`, `Dolby Vision`, `Technicolor Prime`",
"summary": "A string [] of HDR capabilities. Possible values: `none`, `HDR10`, `HDR10PLUS`, `Dolby Vision`, `Technicolor Prime`, `SDR`",
"type": "array",
"items": {
"type": "string",
Expand Down Expand Up @@ -418,7 +418,7 @@
"example": 0
},
"videoEOTF": {
"summary": "HDR standard. Possible values: `0x0` (dsHDRSTANDARD_NONE), `0x01` (dsHDRSTANDARD_HDR10), `0x02` (dsHDRSTANDARD_HLG), `0x04` (dsHDRSTANDARD_DolbyVision), `0x08` (dsHDRSTANDARD_TechnicolorPrime), `0x80` (dsHDRSTANDARD_Invalid)",
"summary": "HDR standard. Possible values: `0x0` (dsHDRSTANDARD_NONE), `0x01` (dsHDRSTANDARD_HDR10), `0x02` (dsHDRSTANDARD_HLG), `0x04` (dsHDRSTANDARD_DolbyVision), `0x08` (dsHDRSTANDARD_TechnicolorPrime), `0x10` (dsHDRSTANDARD_HDR10PLUS), `0x20` (dsHDRSTANDARD_SDR), `0x80` (dsHDRSTANDARD_Invalid)",
"type": "integer",
"example": 0
},
Expand Down Expand Up @@ -1272,7 +1272,7 @@
}
},
"getTVHDRCapabilities":{
"summary": "Gets HDR capabilities supported by the TV. The following values (OR-ed value) are possible: \n* 0 - HDRSTANDARD_NONE \n* 1 - HDRSTANDARD_HDR10 \n* 2 - HDRSTANDARD_HLG \n* 4 - HDRSTANDARD_DolbyVision \n* 8 - HDRSTANDARD_TechnicolorPrime.",
"summary": "Gets HDR capabilities supported by the TV. The following values (OR-ed value) are possible: \n* 0x0 - HDRSTANDARD_NONE \n* 0x1 - HDRSTANDARD_HDR10 \n* 0x2 - HDRSTANDARD_HLG \n* 0x4 - HDRSTANDARD_DolbyVision \n* 0x8 - HDRSTANDARD_TechnicolorPrime. \n* 0x10 - HDRSTANDARD_HDR10PLUS \n* 0x20 - HDRSTANDARD_SDR",
"result": {
"type":"object",
"properties": {
Expand Down

0 comments on commit 556e81d

Please sign in to comment.