35 #include "illegalArgumentException.hpp"
36 #include "videoOutputPortConfig.hpp"
57 extern "C" dsError_t dsEnableHDCP(intptr_t handle,
bool contentProtect,
char *hdcpKey,
size_t keySize);
60 const char *_names[] = {
73 inline const bool isValid(
int id) {
112 return VideoOutputPortConfig::getInstance().getPortType(
id);
132 for (
size_t i = 0; i <
dsUTL_DIM(_names); i++) {
133 if (name.compare(_names[i]) == 0) {
134 return VideoOutputPortConfig::getInstance().getPortType(i);
150 VideoOutputPortType::VideoOutputPortType(
const int id)
152 _dtcpSupported =
false;
153 _hdcpSupported =
false;
155 _restrictedResolution = 0;
158 _name = std::string(_names[
id]);
161 throw IllegalArgumentException();
173 VideoOutputPortType::~VideoOutputPortType()
196 void VideoOutputPortType::enabledDTCP()
198 _dtcpSupported =
true;
212 void VideoOutputPortType::enabledHDCP(
bool contentProtect ,
char *hdcpKey ,
size_t keySize )
215 ret = dsEnableHDCP(0, contentProtect, hdcpKey, keySize);
220 _hdcpSupported =
true;
231 void VideoOutputPortType::setRestrictedResolution(
int resolution)
233 _restrictedResolution = resolution;
246 _vPorts.push_back(port);
258 bool VideoOutputPortType::isDTCPSupported()
const
260 return _dtcpSupported;
272 bool VideoOutputPortType::isHDCPSupported()
const
274 return _hdcpSupported;
286 bool VideoOutputPortType::isDynamicResolutionsSupported()
const
298 int VideoOutputPortType::getRestrictedResolution()
const
300 return _restrictedResolution;
313 return VideoOutputPortConfig::getInstance().getSupportedResolutions();