RDK Documentation (Open Sourced RDK Components)
videoDevice.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_VIDEODEVICE_HPP_
31 #define _DS_VIDEODEVICE_HPP_
32 
33 #include "dsConstant.hpp"
34 #include "videoDFC.hpp"
35 #include "videoResolution.hpp"
36 #include "list.hpp"
37 #include <string>
38 #include <list>
39 
40 
41 /**
42  * @file videoDevice.hpp
43  * @brief It contains class referenced by videoDevice.cpp file.
44  */
45 namespace device {
46 
47 
48 /**
49  * @class VideoDevice
50  * @brief class extending DSConstant to implement the videoDevice interface.
51  * @ingroup devicesettingsclass
52  */
53 class VideoDevice : public DSConstant {
54  intptr_t _handle;
55  int _dfc; //!< Decoder format converter variable.
56  List<VideoDFC> _supportedDFCs; //!< List of supported dfc's.
57  void setDFC(const VideoDFC & dfc);
58  void setDFC();
59 
60  static const char * kPropertyDFC;
61 
62 public:
63  static VideoDevice & getInstance(int id);
64  static VideoDevice & getInstance(const std::string &name);
65 
66  VideoDevice(int id);
67  void setDFC(const std::string & name);
68  void setDFC(int id);
69  void setPlatformDFC();
70  const VideoDFC & getDFC();
71  const List <VideoDFC> getSupportedDFCs() const;
72  void addDFC(const VideoDFC &dfc);
73  virtual ~VideoDevice();
74  void getHDRCapabilities(int *capabilities);
75  void getSettopSupportedResolutions(std::list<std::string>& stbSupportedResoltuions);
76  unsigned int getSupportedVideoCodingFormats() const;
77  dsVideoCodecInfo_t getVideoCodecInfo(dsVideoCodingFormat_t format) const;
78  int forceDisableHDRSupport(bool disable);
79  int getFRFMode(int *frfmode) const;
80  int setFRFMode(int frfmode) const;
81  int getCurrentDisframerate(char *framerate) const;
82  int setDisplayframerate(const char *framerate) const;
83 };
84 
85 }
86 
87 #endif /* _DS_VIDEODEVICE_HPP_ */
88 
89 
90 /** @} */
91 /** @} */
device::VideoDevice::getInstance
static VideoDevice & getInstance(int id)
This API is used to get the instance of the video device port based on the port id returned by the ge...
Definition: videoDevice.cpp:84
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
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
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::VideoDevice::VideoDevice
VideoDevice(int id)
Constructor for videodevice class. This function initializes the the handle for the corresponding vid...
Definition: videoDevice.cpp:104
device::VideoDevice::setPlatformDFC
void setPlatformDFC()
This API is used to set the DFC setting to the default one supported by the platform....
Definition: videoDevice.cpp:208
device::VideoDevice::~VideoDevice
virtual ~VideoDevice()
This is a default destructor of the class VideoDevice.
Definition: videoDevice.cpp:130
device::VideoDFC
This class extends DSConstant to manage the video Decoder Format Conversion.
Definition: videoDFC.hpp:50
videoResolution.hpp
It contains class and structure refrenced by the videoResolution.cpp file.
device::VideoDevice::getDFC
const VideoDFC & getDFC()
This API is used to get the current DFC setting.
Definition: videoDevice.cpp:220
device::VideoDevice::_supportedDFCs
List< VideoDFC > _supportedDFCs
List of supported dfc's.
Definition: videoDevice.hpp:56
device::VideoDevice::addDFC
void addDFC(const VideoDFC &dfc)
This function is used to push DFC into the list of supported DFC (i.e. Zoom Settings) by the device.
Definition: videoDevice.cpp:251
device::VideoDevice
class extending DSConstant to implement the videoDevice interface.
Definition: videoDevice.hpp:53
dsVideoCodecInfo_t
Definition: dsTypes.h:1111
device::VideoDevice::_dfc
int _dfc
Decoder format converter variable.
Definition: videoDevice.hpp:55
device::VideoDevice::setDFC
void setDFC()
This API is used to set the default dfc.
Definition: videoDevice.cpp:192
videoDFC.hpp
This file defines VideoDFC class for managing video decoder format conversion types.
device::VideoDevice::getSupportedDFCs
const List< VideoDFC > getSupportedDFCs() const
This API is used to get the list of supported DFC (i.e. Zoom Settings) by the video device.
Definition: videoDevice.cpp:238