RDK Documentation (Open Sourced RDK Components)
Device Settings - Video Output Port APIs

Description

Functions

static VideoOutputPortdevice::VideoOutputPort::getInstance (int id)
 This API is used to get the instance of the video output port based on the port id returned by the getsupported videooutput port. More...
 
static VideoOutputPortdevice::VideoOutputPort::getInstance (const std::string &name)
 This API is used to get the instance of the video output port based on the port name returned by the getsupported videooutput port. More...
 
 device::VideoOutputPort::VideoOutputPort (const int type, const int index, const int id, int audioPortId, const std::string &resolution)
 This function is a parameterised constructor for videooutputport. It initialises the data members of VideoOutputPort instance with the parameters passed. It also updates the details about the video port to indicate if the video port is enabled or not and also if its connected to the display or not. An IllegalArgumentException is thrown if any error occurs while accessing the information about the video port. More...
 
bool device::VideoOutputPort::setScartParameter (const std::string parameter, const std::string value)
 
int device::VideoOutputPort::getVideoEOTF () const
 
int device::VideoOutputPort::getMatrixCoefficients () const
 
int device::VideoOutputPort::getColorDepth () const
 
int device::VideoOutputPort::getColorSpace () const
 
int device::VideoOutputPort::getQuantizationRange () const
 
void device::VideoOutputPort::getCurrentOutputSettings (int &videoEOTF, int &matrixCoefficients, int &colorSpace, int &colorDepth, int &quantizationRange) const
 
virtual device::VideoOutputPort::~VideoOutputPort ()
 This is a default destructor of class VideoOutputPort. More...
 
const VideoOutputPortTypedevice::VideoOutputPort::getType () const
 This API is used to get the type of the video output port. A type of the video output port represent the general capabilities of the port. More...
 
AudioOutputPortdevice::VideoOutputPort::getAudioOutputPort ()
 This API is used to get the audio output port connected to the video output port. This connection is established during library initialization and cannot be modified. An Video port is connected to at most one Audio port. An Audio port however can be connected to multiple Video ports. UnsupportedOperationException will be thrown if the this Video Output Port is not connected to any Audio Output Port (i.e. on a Video-only device) More...
 
const VideoResolutiondevice::VideoOutputPort::getResolution ()
 This API is used to get the current video resolution output from the video output port. Upon library initialization, the resolution from the persistence storage will be loaded as the initial Resolution for the video output port. More...
 
const VideoResolutiondevice::VideoOutputPort::getDefaultResolution () const
 This API is used to get the default resolution supported by the video output port. More...
 
const VideoOutputPort::Displaydevice::VideoOutputPort::getDisplay ()
 This API is used to get the display device information currently connected to the output port. Application can use isDisplayConnected() to query the display connection status before trying to get an instance of the display. More...
 
bool device::VideoOutputPort::isDisplayConnected () const
 This API is used to Check if the port is currently connected to any display device. More...
 
bool device::VideoOutputPort::isEnabled () const
 This API is used to check whether this Video output port is enabled or not. More...
 
bool device::VideoOutputPort::isActive () const
 This API is used to check if Port is connected to active port of Sink device. More...
 
bool device::VideoOutputPort::isDynamicResolutionSupported () const
 This API is used to check whether the video output port supports the dynamic super resolution or not. More...
 
void device::VideoOutputPort::setResolution (const std::string &resolution, bool persist=true, bool isIgnoreEdid=false)
 This API is used to set the output resolution of the port by ID or its Name. The specified resolution must be one of the resolutions supported by the port. The list of supported resolutions can be retrieved via VideoOutputPortType:: getSupportedResolutions(); IllegalArgumentException will be thrown if the specified name or ID of the resolution is not recognized. More...
 
void device::VideoOutputPort::setPreferredColorDepth (const unsigned int colordepth, bool persist=true)
 
const unsigned int device::VideoOutputPort::getPreferredColorDepth (bool persist=true)
 
void device::VideoOutputPort::getColorDepthCapabilities (unsigned int *capabilities) const
 
void device::VideoOutputPort::setDisplayConnected (const bool connected)
 This API is used to set the video output port display to be connected. More...
 
bool device::VideoOutputPort::isContentProtected () const
 This API is used to Check if the port or the content output on the port has DTCP or HDCP in use. More...
 
void device::VideoOutputPort::enable ()
 This API is used to enable the video output port. More...
 
 device::VideoOutputPort::Display::Display (VideoOutputPort &vPort)
 This function is used to get the display handle of a given video device. More...
 
bool device::VideoOutputPort::Display::hasSurround () const
 This function returns true if connected display supports surround audio. More...
 
int device::VideoOutputPort::Display::getSurroundMode () const
 This function returns surround mode supported by connected display. More...
 
void device::VideoOutputPort::Display::getEDIDBytes (std::vector< uint8_t > &edid) const
 This function is used to get the EDID information of the connected video display. After it gets the EDID information , it clears the old edid information and inserts it. The EDID bytes are verified before returning them. If invalid EDID bytes are detected, the EDID bytes are read again after READ_EDID_RETRY_MS millis. This repeats for a maximum of READ_EDID_RETRY_TOTAL_MS millis. If ret is not equal to dsERR_NONE, it will throw the ret to exception handler and it will pass message as "dsGetEDIDBytes failed". If invalid EDID is read, even after retries, it throws exception with message "EDID verification failed" If EDID bytes length > 1024 it throws exception with message "EDID length > 1024". More...
 
virtual device::VideoOutputPort::Display::~Display ()
 This function is a default destructor of class Display. More...
 
int device::VideoOutputPort::getHDCPStatus ()
 
int device::VideoOutputPort::getHDCPProtocol ()
 
int device::VideoOutputPort::getHDCPReceiverProtocol ()
 
int device::VideoOutputPort::getHDCPCurrentProtocol ()
 
void device::VideoOutputPort::getTVHDRCapabilities (int *capabilities) const
 This API is used to get HDR format supported by TV. More...
 
void device::VideoOutputPort::getSupportedTvResolutions (int *resolutions) const
 This API is used to get TV supported Video Resolutions. More...
 
int device::VideoOutputPort::forceDisable4KSupport (bool disable)
 
bool device::VideoOutputPort::setForceHDRMode (dsHDRStandard_t status)
 This API is used to set/reset force HDR mode. More...
 
bool device::VideoOutputPort::IsOutputHDR ()
 This API is used to check if Video output is HDR or not. More...
 
void device::VideoOutputPort::ResetOutputToSDR ()
 This API is used to reset the video output to SDR if it is HDR. More...
 
bool device::VideoOutputPort::SetHdmiPreference (dsHdcpProtocolVersion_t hdcpProtocol)
 This API is used to set the Preferred HDMI Protocol. More...
 
int device::VideoOutputPort::GetHdmiPreference ()
 This API is used to get the HDMI Preference. More...
 

Function Documentation

◆ getInstance() [1/2]

VideoOutputPort & device::VideoOutputPort::getInstance ( int  id)
static

This API is used to get the instance of the video output port based on the port id returned by the getsupported videooutput port.

Parameters
[in]idport id
Returns
Reference to the instance of the port id

Definition at line 85 of file videoOutputPort.cpp.

◆ getInstance() [2/2]

VideoOutputPort & device::VideoOutputPort::getInstance ( const std::string &  name)
static

This API is used to get the instance of the video output port based on the port name returned by the getsupported videooutput port.

Parameters
[in]nameName of the port
Returns
Reference to the instance of the name of the port

Definition at line 99 of file videoOutputPort.cpp.

◆ VideoOutputPort()

device::VideoOutputPort::VideoOutputPort ( const int  type,
const int  index,
const int  id,
int  audioPortId,
const std::string &  resolution 
)

This function is a parameterised constructor for videooutputport. It initialises the data members of VideoOutputPort instance with the parameters passed. It also updates the details about the video port to indicate if the video port is enabled or not and also if its connected to the display or not. An IllegalArgumentException is thrown if any error occurs while accessing the information about the video port.

Parameters
[in]typeType of video output port (HDMI).
[in]indexIndex of video output port (0,1,...)
[in]idVideooutput port id.
[in]audioPortIdAudioOutput Porttype id.
[in]resolutionSupported videooutput port resolution.
Returns
None

Definition at line 122 of file videoOutputPort.cpp.

◆ ~VideoOutputPort()

device::VideoOutputPort::~VideoOutputPort ( )
virtual

This is a default destructor of class VideoOutputPort.

Returns
None.

Definition at line 253 of file videoOutputPort.cpp.

◆ getType()

const VideoOutputPortType & device::VideoOutputPort::getType ( ) const

This API is used to get the type of the video output port. A type of the video output port represent the general capabilities of the port.

Returns
An instance to the type of the video output port

Definition at line 265 of file videoOutputPort.cpp.

◆ getAudioOutputPort()

AudioOutputPort & device::VideoOutputPort::getAudioOutputPort ( )

This API is used to get the audio output port connected to the video output port. This connection is established during library initialization and cannot be modified. An Video port is connected to at most one Audio port. An Audio port however can be connected to multiple Video ports. UnsupportedOperationException will be thrown if the this Video Output Port is not connected to any Audio Output Port (i.e. on a Video-only device)

Returns
Reference to the audio output port connected

Definition at line 280 of file videoOutputPort.cpp.

◆ getResolution()

const VideoResolution & device::VideoOutputPort::getResolution ( )

This API is used to get the current video resolution output from the video output port. Upon library initialization, the resolution from the persistence storage will be loaded as the initial Resolution for the video output port.

Returns
Reference to the output resolution

Definition at line 293 of file videoOutputPort.cpp.

◆ getDefaultResolution()

const VideoResolution & device::VideoOutputPort::getDefaultResolution ( ) const

This API is used to get the default resolution supported by the video output port.

Returns
Reference to the default output resolution

Definition at line 314 of file videoOutputPort.cpp.

◆ getDisplay()

const VideoOutputPort::Display & device::VideoOutputPort::getDisplay ( )

This API is used to get the display device information currently connected to the output port. Application can use isDisplayConnected() to query the display connection status before trying to get an instance of the display.

Returns
Returns a reference to the connected display device. If the vedio port is not connected to the display then it throws an IllegalStateException.

Definition at line 328 of file videoOutputPort.cpp.

◆ isDisplayConnected()

bool device::VideoOutputPort::isDisplayConnected ( ) const

This API is used to Check if the port is currently connected to any display device.

If ret is not equal to dsERR_NONE, it will throw the ret to exception handler and it will pass message as "No message for this Exception".

Returns
True or False
Return values
1if display is connected
0if display is not connected

Definition at line 381 of file videoOutputPort.cpp.

◆ isEnabled()

bool device::VideoOutputPort::isEnabled ( ) const

This API is used to check whether this Video output port is enabled or not.

Returns
None

Definition at line 398 of file videoOutputPort.cpp.

◆ isActive()

bool device::VideoOutputPort::isActive ( ) const

This API is used to check if Port is connected to active port of Sink device.

Returns
None

Definition at line 415 of file videoOutputPort.cpp.

◆ isDynamicResolutionSupported()

bool device::VideoOutputPort::isDynamicResolutionSupported ( ) const

This API is used to check whether the video output port supports the dynamic super resolution or not.

Returns
True or False
Return values
TrueIf video output port supports Dynamic super resolution
FalseIf video output port doesnot support Dynamic super resolution

Definition at line 438 of file videoOutputPort.cpp.

◆ setResolution()

void device::VideoOutputPort::setResolution ( const std::string &  resolution,
bool  persist = true,
bool  isIgnoreEdid = false 
)

This API is used to set the output resolution of the port by ID or its Name. The specified resolution must be one of the resolutions supported by the port. The list of supported resolutions can be retrieved via VideoOutputPortType:: getSupportedResolutions(); IllegalArgumentException will be thrown if the specified name or ID of the resolution is not recognized.

Parameters
[in]resolutionNameName of the Resoultion
[in]persistFlag to inform whether or not to persist the resolution
[in]isIgnoreEdidFlag to inform whether to ignore the EDID data or not
Returns
None

Definition at line 457 of file videoOutputPort.cpp.

◆ setDisplayConnected()

void device::VideoOutputPort::setDisplayConnected ( const bool  connected)

This API is used to set the video output port display to be connected.

Parameters
connectedTrue if display is connected or False if display is not connencted
Returns
None

Definition at line 521 of file videoOutputPort.cpp.

◆ isContentProtected()

bool device::VideoOutputPort::isContentProtected ( ) const

This API is used to Check if the port or the content output on the port has DTCP or HDCP in use.

Parameters
None
Returns
True or False
Return values
1if content from this port is protected by DTCP or HDCP.Otherwise
0if content from this port is not protected by DTCP or HDCP

Definition at line 538 of file videoOutputPort.cpp.

◆ enable()

void device::VideoOutputPort::enable ( )

This API is used to enable the video output port.

Returns
None

Definition at line 552 of file videoOutputPort.cpp.

◆ Display()

device::VideoOutputPort::Display::Display ( VideoOutputPort vPort)

This function is used to get the display handle of a given video device.

Parameters
[in]vPortVideo port handle associated with connected display.
Returns
None.

Definition at line 583 of file videoOutputPort.cpp.

◆ hasSurround()

bool device::VideoOutputPort::Display::hasSurround ( ) const

This function returns true if connected display supports surround audio.

Return values
true/false
Parameters
None.
Returns
true if the connected sink has surround capability.

Definition at line 605 of file videoOutputPort.cpp.

◆ getSurroundMode()

int device::VideoOutputPort::Display::getSurroundMode ( ) const

This function returns surround mode supported by connected display.

This function returns the supports surround audio Mode.

Return values
int
Parameters
None.
Returns
enum for the surround capability.

Definition at line 633 of file videoOutputPort.cpp.

◆ getEDIDBytes()

void device::VideoOutputPort::Display::getEDIDBytes ( std::vector< uint8_t > &  edid) const

This function is used to get the EDID information of the connected video display. After it gets the EDID information , it clears the old edid information and inserts it. The EDID bytes are verified before returning them. If invalid EDID bytes are detected, the EDID bytes are read again after READ_EDID_RETRY_MS millis. This repeats for a maximum of READ_EDID_RETRY_TOTAL_MS millis. If ret is not equal to dsERR_NONE, it will throw the ret to exception handler and it will pass message as "dsGetEDIDBytes failed". If invalid EDID is read, even after retries, it throws exception with message "EDID verification failed" If EDID bytes length > 1024 it throws exception with message "EDID length > 1024".

Parameters
edidThe EDID raw buffer of the display. The HAL implementation should malloc() the buffer and return it to the application. The application is required to free() the buffer after using it; If HDMI is not connected no data should be returned, and the API returns dsERR_INVALID_STATE.
Returns
None.

Definition at line 673 of file videoOutputPort.cpp.

◆ ~Display()

device::VideoOutputPort::Display::~Display ( )
virtual

This function is a default destructor of class Display.

Returns
None.

Definition at line 738 of file videoOutputPort.cpp.

◆ getTVHDRCapabilities()

void device::VideoOutputPort::getTVHDRCapabilities ( int *  capabilities) const

This API is used to get HDR format supported by TV.

Returns
HDR capabilities supported by TV

Definition at line 802 of file videoOutputPort.cpp.

◆ getSupportedTvResolutions()

void device::VideoOutputPort::getSupportedTvResolutions ( int *  resolutions) const

This API is used to get TV supported Video Resolutions.

Returns
Resolutions supported by TV

Definition at line 813 of file videoOutputPort.cpp.

◆ setForceHDRMode()

bool device::VideoOutputPort::setForceHDRMode ( dsHDRStandard_t  mode)

This API is used to set/reset force HDR mode.

Returns
bool status

Definition at line 833 of file videoOutputPort.cpp.

◆ IsOutputHDR()

bool device::VideoOutputPort::IsOutputHDR ( )

This API is used to check if Video output is HDR or not.

Returns
True if video output is HDR

Definition at line 844 of file videoOutputPort.cpp.

◆ ResetOutputToSDR()

void device::VideoOutputPort::ResetOutputToSDR ( )

This API is used to reset the video output to SDR if it is HDR.

Returns
None

Definition at line 858 of file videoOutputPort.cpp.

◆ SetHdmiPreference()

bool device::VideoOutputPort::SetHdmiPreference ( dsHdcpProtocolVersion_t  hdcpProtocol)

This API is used to set the Preferred HDMI Protocol.

Parameters
enumdsHdcpProtocolVersion dsHDCP_VERSION_1X = 0, < HDCP Protocol version 1.x dsHDCP_VERSION_2X, < HDCP Protocol version 2.x dsHDCP_VERSION_MAX < Maximum index for HDCP protocol.
Returns
true if no error.

Definition at line 883 of file videoOutputPort.cpp.

◆ GetHdmiPreference()

int device::VideoOutputPort::GetHdmiPreference ( )

This API is used to get the HDMI Preference.

Returns
int value corresponding to : enum dsHdcpProtocolVersion dsHDCP_VERSION_1X = 0, < HDCP Protocol version 1.x dsHDCP_VERSION_2X, < HDCP Protocol version 2.x dsHDCP_VERSION_MAX < Maximum index for HDCP protocol.

Definition at line 904 of file videoOutputPort.cpp.