diff --git a/ds/hdmiIn.cpp b/ds/hdmiIn.cpp index 18b2ac97..927df499 100755 --- a/ds/hdmiIn.cpp +++ b/ds/hdmiIn.cpp @@ -678,6 +678,17 @@ void HdmiInput::getHdmiVersion (int iHdmiPort, dsHdmiMaxCapabilityVersion_t *cap printf ("%s:%d - HDMI Compatibility Version = %d\n", __PRETTY_FUNCTION__, __LINE__, *capversion); } +dsError_t HdmiInput::getHDMIARCPortId(int &portId) { + + dsError_t error = dsERR_GENERAL; + error = dsGetHDMIARCPortId(portId); + if(dsERR_NONE != error) + { + portId = -1; + } + return error; +} + } diff --git a/ds/include/hdmiIn.hpp b/ds/include/hdmiIn.hpp index eb2da3dc..0aeb9e25 100755 --- a/ds/include/hdmiIn.hpp +++ b/ds/include/hdmiIn.hpp @@ -52,7 +52,7 @@ #include #include "dsTypes.h" - +#include "dsError.h" /** * @file hdmiIn.hpp @@ -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); + dsError_t getHDMIARCPortId(int &portId); private: HdmiInput (); /* default constructor */ virtual ~HdmiInput (); /* destructor */ diff --git a/ds/include/videoOutputPort.hpp b/ds/include/videoOutputPort.hpp index a9b71ade..291af68a 100644 --- a/ds/include/videoOutputPort.hpp +++ b/ds/include/videoOutputPort.hpp @@ -38,6 +38,7 @@ #include #include "dsTypes.h" +#include "dsError.h" /** * @file videoOutputPort.hpp @@ -283,6 +284,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; + dsError_t SetStandbyVideoState(const string port , const bool enable); + dsError_t GetStandbyVideoState(const string port , bool &enable); private: Display _display; diff --git a/ds/videoOutputPort.cpp b/ds/videoOutputPort.cpp index c77aa5c4..b1431056 100644 --- a/ds/videoOutputPort.cpp +++ b/ds/videoOutputPort.cpp @@ -911,18 +911,28 @@ int VideoOutputPort::GetHdmiPreference() return hdcpProtocol; } +dsError_t VideoOutputPort::SetStandbyVideoState(const string port , const bool enable) +{ + return dsSetStandbyVideoState(port.c_str(), enable); +} + +dsError_t VideoOutputPort::GetStandbyVideoState(const string port, bool &isEnabled) +{ + return dsGetStandbyVideoState(port.c_str(), isEnabled); +} + /** * @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); diff --git a/rpc/cli/dsVideoPort.c b/rpc/cli/dsVideoPort.c index 5ff4c9e4..bab1aabd 100644 --- a/rpc/cli/dsVideoPort.c +++ b/rpc/cli/dsVideoPort.c @@ -965,6 +965,54 @@ dsError_t dsSetForceHDRMode(intptr_t handle, dsHDRStandard_t mode) return dsERR_GENERAL ; } +dsError_t dsSetStandbyVideoState(char *port, const bool enable) +{ + dsError_t dsErr = dsERR_GENERAL; + _DEBUG_ENTER(); + + if(NULL != port) + { + dsMgrStandbyVideoStateParam_t param = {0}; + strcpy(param.port, port); + param.isEnabled = enable; + param.result = -1; + + IARM_Result_t rpcRet = IARM_Bus_Call(IARM_BUS_DSMGR_NAME, + (char *)IARM_BUS_DSMGR_API_SetStandbyVideoState, + (void *)¶m, sizeof(param)); + + if (IARM_RESULT_SUCCESS == rpcRet && param.result == 0) + { + dsErr = dsERR_NONE; + } + } + return dsErr; +} + +dsError_t dsGetStandbyVideoState(char *port, bool &enable) +{ + dsError_t dsErr = dsERR_GENERAL; + _DEBUG_ENTER(); + + if(NULL != port) + { + dsMgrStandbyVideoStateParam_t param = {0}; + strcpy(param.port, port); + param.result = -1; + + IARM_Result_t rpcRet = IARM_Bus_Call(IARM_BUS_DSMGR_NAME, + (char *)IARM_BUS_DSMGR_API_GetStandbyVideoState, + (void *)¶m, + sizeof(param)); + + if (IARM_RESULT_SUCCESS == rpcRet && param.result == 0) + { + enable = param.isEnabled; + dsErr = dsERR_NONE; + } + } + return dsErr ; +} /** @} */ /** @} */ diff --git a/sample/hdmiIn.cpp b/sample/hdmiIn.cpp index 819eb919..c1e49a39 100644 --- a/sample/hdmiIn.cpp +++ b/sample/hdmiIn.cpp @@ -32,7 +32,6 @@ #include "hdmiIn.hpp" #include "manager.hpp" #include "dsUtl.h" -#include "dsError.h" #include #include #include