RDK Documentation (Open Sourced RDK Components)
videoOutputPortType.hpp
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 
22 /**
23 * @defgroup devicesettings
24 * @{
25 * @defgroup ds
26 * @{
27 **/
28 
29 
30 #ifndef _DS_VIDEOOUTPUTPORTTYPE_H_
31 #define _DS_VIDEOOUTPUTPORTTYPE_H_
32 
33 #include "dsConstant.hpp"
34 #include <string>
35 
36 #include <vector>
37 #include <map>
38 #include <list>
39 #include <string>
40 #include "list.hpp"
41 
42 #include "videoResolution.hpp"
43 #include "videoOutputPort.hpp"
44 #include "dsTypes.h"
45 
46 
47 /**
48  * @file videoOutputPortType.hpp
49  * @brief It contains structures and class referenced by the videoOutputportTypes.cpp file.
50  */
51 namespace device {
52 
53 
54 /**
55  * @class VideoOutputPortType
56  * @brief Class extending DSConstant to implement the VideoOutputporttype interface.
57  * @ingroup devicesettingsclass
58  */
60 
61  bool _dtcpSupported; //!< Method variable to check whether dtcp is supported or not.
62  bool _hdcpSupported; //!< Method variable to check whether hdcp is supported o rnot.
63  bool _dynamic; //!< Method variable to check whether dynamic resolution is supported or not.
64  int _restrictedResolution;
65  List<VideoResolution> _supportedResolutions;
66  List<VideoOutputPort> _vPorts;
67  //std::map<VideoResolution , VideoResolution> _dynamicResolutionMappins;
68 
69 public:
70  static const int kRF;
71  static const int kBaseband;
72  static const int kSVideo;
73  static const int k1394;
74  static const int kDVI;
75  static const int kComponent;
76  static const int kHDMI;
77  static const int kInternal;
78  static const int kScart;
79  static const int kMax;
80 
81 
82  static VideoOutputPortType & getInstance(const int id);
83  static VideoOutputPortType & getInstance(const std::string &name);
84 
85 
86  VideoOutputPortType(const int id);
87  virtual ~VideoOutputPortType();
88 
89  int getTypeId() const;
90  bool isDTCPSupported() const;
91  bool isHDCPSupported() const;
92  bool isDynamicResolutionsSupported() const;
93  int getRestrictedResolution() const ;
95  const VideoResolution & getOutputResolution(const VideoResolution &inputResolution) const;
96  const List<VideoOutputPort> getPorts() const;
97 
98  void enabledDTCP();
99  void enabledHDCP(bool contentProtect = true, char *dhcpKey = 0, size_t keySize = 0);
100  void setRestrictedResolution(int resolution);
101  void addResolution(const VideoResolution &resolution);
102  void addPort( const VideoOutputPort &port);
103 
104 };
105 
106 }
107 
108 #endif /* VIDEOOUTPUTPORTTYPE_H_ */
109 
110 
111 /** @} */
112 /** @} */
device::VideoOutputPortType::getInstance
static VideoOutputPortType & getInstance(const int id)
This function is used to get the instance of the video output port type based on the port id....
Definition: videoOutputPortType.cpp:109
device::List
This class is implemented using templates and it is used to maintain a container with the list of sup...
Definition: list.hpp:51
device::VideoOutputPortType::_dtcpSupported
bool _dtcpSupported
Method variable to check whether dtcp is supported or not.
Definition: videoOutputPortType.hpp:61
device::VideoOutputPortType::_hdcpSupported
bool _hdcpSupported
Method variable to check whether hdcp is supported o rnot.
Definition: videoOutputPortType.hpp:62
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::VideoResolution
Class extending DSConstant to implement the videoResolution interface.
Definition: videoResolution.hpp:57
device::VideoOutputPortType::setRestrictedResolution
void setRestrictedResolution(int resolution)
This function is used to set the restricted resolution of the videooutput port type.
Definition: videoOutputPortType.cpp:231
device::VideoOutputPortType::isDTCPSupported
bool isDTCPSupported() const
This API is used to query if DTCP is supported by the port type.
Definition: videoOutputPortType.cpp:258
device::VideoOutputPort
Class extending enumerable to implement the videoooutputport interface.
Definition: videoOutputPort.hpp:59
dsTypes.h
Device Settings HAL types.
device::DSConstant
This class is used to store and manage the names and id's. It is derived by many classes like VideoRe...
Definition: dsConstant.hpp:52
device::VideoOutputPortType::isHDCPSupported
bool isHDCPSupported() const
This API is used to query if HDCP is supported by the port type.
Definition: videoOutputPortType.cpp:272
device::VideoOutputPortType::isDynamicResolutionsSupported
bool isDynamicResolutionsSupported() const
This function is used to query if dynamic resolutions are supported by the port type.
Definition: videoOutputPortType.cpp:286
device::VideoOutputPortType::getPorts
const List< VideoOutputPort > getPorts() const
This function is used to get the list of videooutputporttype.
Definition: videoOutputPortType.cpp:184
videoResolution.hpp
It contains class and structure refrenced by the videoResolution.cpp file.
device::VideoOutputPortType::addPort
void addPort(const VideoOutputPort &port)
This function is used to add video output port type in the videooutputport list.
Definition: videoOutputPortType.cpp:244
device::VideoOutputPortType::getSupportedResolutions
const List< VideoResolution > getSupportedResolutions() const
This API is used to get a list of supported Video Resolutions by the port type.
Definition: videoOutputPortType.cpp:311
device::VideoOutputPortType::~VideoOutputPortType
virtual ~VideoOutputPortType()
This is a default destructor of the class VideoOutputPortType.
Definition: videoOutputPortType.cpp:173
videoOutputPort.hpp
It contains class and structure refrenced by the videooutputport.cpp file.
device::VideoOutputPortType::getRestrictedResolution
int getRestrictedResolution() const
This function is used to get the resolution type which has been restricted from usage.
Definition: videoOutputPortType.cpp:298
device::VideoOutputPortType
Class extending DSConstant to implement the VideoOutputporttype interface.
Definition: videoOutputPortType.hpp:59
device::VideoOutputPortType::_dynamic
bool _dynamic
Method variable to check whether dynamic resolution is supported or not.
Definition: videoOutputPortType.hpp:63
device::VideoOutputPortType::enabledHDCP
void enabledHDCP(bool contentProtect=true, char *dhcpKey=0, size_t keySize=0)
This function is used to enable the HDCP content protection.
Definition: videoOutputPortType.cpp:212
device::VideoOutputPortType::enabledDTCP
void enabledDTCP()
This function is used to enable the DTCP for videooutputport type.
Definition: videoOutputPortType.cpp:196