Skip to content
13 changes: 13 additions & 0 deletions ds/hdmiIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,19 @@ void HdmiInput::getHdmiVersion (int iHdmiPort, dsHdmiMaxCapabilityVersion_t *cap
printf ("%s:%d - HDMI Compatibility Version = %d\n", __PRETTY_FUNCTION__, __LINE__, *capversion);
}

void HdmiInput::getHDMIARCPortId(int *portId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to propagate dsError_t

{
if(NULL != portId)
{
dsError_t error = dsERR_GENERAL;
error = dsGetHDMIARCPortId(portId);
if(dsERR_NONE != error)
{
*portId = -1;
}
}
}

}


Expand Down
1 change: 1 addition & 0 deletions ds/include/hdmiIn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class HdmiInput
void getVRRSupport (int iHdmiPort, bool *vrr_suppport);
void getVRRStatus (int iHdmiPort, dsHdmiInVrrStatus_t *vrrStatus);
void getHdmiVersion (int iHdmiPort, dsHdmiMaxCapabilityVersion_t *capversion);
void getHDMIARCPortId(int *portId);
private:
HdmiInput (); /* default constructor */
virtual ~HdmiInput (); /* destructor */
Expand Down
2 changes: 2 additions & 0 deletions ds/include/videoOutputPort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ class VideoOutputPort : public Enumerable {
unsigned int getPreferredColorDepth(bool persist = true) ;
void setPreferredColorDepth(const unsigned int colordepth, bool persist = true);
void getColorDepthCapabilities (unsigned int *capabilities) const;
void SetStandbyVideoState(const string port , const bool enable);
void GetStandbyVideoState(const string port , bool enable);

private:
Display _display;
Expand Down
36 changes: 28 additions & 8 deletions ds/videoOutputPort.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 908 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: ds/videoOutputPort.cpp)

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2009, 908 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/RDK-DEV-2009.tar.gz, file: ds/videoOutputPort.cpp)

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 908 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: ds/videoOutputPort.cpp)

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2009, 908 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/RDK-DEV-2009.tar.gz, file: ds/videoOutputPort.cpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -911,18 +911,38 @@
return hdcpProtocol;
}

bool VideoOutputPort::SetStandbyVideoState(const string port , const bool enable)
{
dsError_t ret = dsSetStandbyVideoState(port, enable);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to propagate dsError_t, applicable to other APIs too..

if (ret != dsERR_NONE) {
return false;
}
return true;

}

bool VideoOutputPort::GetStandbyVideoState(const string port, bool isEnabled)
{
dsError_t ret = dsGetStandbyVideoState(port, isEnabled);
if (ret != dsERR_NONE) {
return false;
}
return true;

}

/**
* @fn void setAllmEnabled(bool enable);
* @brief Enables/Disables ALLM mode for connected HDMI display.
*/
void VideoOutputPort::Display::setAllmEnabled(bool enable) const
{
printf("VideoOutputPort::Display::setAllmEnabled \r\n");
dsError_t ret = dsSetAllmEnabled(_handle,enable);
if (ret != dsERR_NONE) {
throw Exception(ret);
}
}
void VideoOutputPort::Display::setAllmEnabled(bool enable) const
{
printf("VideoOutputPort::Display::setAllmEnabled \r\n");
dsError_t ret = dsSetAllmEnabled(_handle,enable);
if (ret != dsERR_NONE) {
throw Exception(ret);
}
}

/**
* @fn void setAVIContentType(dsAviContentType_t contentType);
Expand Down
48 changes: 48 additions & 0 deletions rpc/cli/dsVideoPort.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 2 in rpc/cli/dsVideoPort.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/cli/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2008, 963 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2008.tar.gz, file: rpc/cli/dsVideoPort.c)

Check failure on line 2 in rpc/cli/dsVideoPort.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/cli/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 963 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: rpc/cli/dsVideoPort.c)

Check failure on line 2 in rpc/cli/dsVideoPort.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/cli/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2008, 963 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2008.tar.gz, file: rpc/cli/dsVideoPort.c)

Check failure on line 2 in rpc/cli/dsVideoPort.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/cli/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 963 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: rpc/cli/dsVideoPort.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -965,6 +965,54 @@
return dsERR_GENERAL ;
}

dsError_t dsSetStandbyVideoState(string port , const bool enable)
{
dsError_t dsErr = dsERR_GENERAL;
_DEBUG_ENTER();

if(!port.empty())
{
dsMgrStandbyVideoStateParam_t param;
param.port = port;
param.isEnabled = enable;
param.result = 0;

IARM_Result_t rpcRet = IARM_Bus_Call(IARM_BUS_DSMGR_NAME,
(char *)IARM_BUS_DSMGR_API_SetStandbyVideoState,
(void *)&param, sizeof(param));

if (IARM_RESULT_SUCCESS == rpcRet)
{
dsErr = dsERR_NONE;
}
}
return dsErr ;
}

dsError_t dsGetStandbyVideoState(string port , bool enable)
{
dsError_t dsErr = dsERR_GENERAL;
_DEBUG_ENTER();

if(!port.empty())
{
dsMgrStandbyVideoStateParam_t param;
param.port = port;
param.result = 0;

IARM_Result_t rpcRet = IARM_Bus_Call(IARM_BUS_DSMGR_NAME,
(char *)IARM_BUS_DSMGR_API_GetStandbyVideoState,
(void *)&param,
sizeof(param));

if (IARM_RESULT_SUCCESS == rpcRet)
{
enable = param.isEnabled;
dsErr = dsERR_NONE;
}
}
return dsErr ;
}

/** @} */
/** @} */
Loading