RDK Documentation (Open Sourced RDK Components)
pixelResolution.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  * @file pixelResolution.hpp
24  * @brief This file defines PixelResolution class for managing video resolution types.
25  */
26 
27 
28 
29 /**
30 * @defgroup devicesettings
31 * @{
32 * @defgroup ds
33 * @{
34 **/
35 
36 
37 #ifndef _DS_PIXELRESOLUTION_HPP_
38 #define _DS_PIXELRESOLUTION_HPP_
39 
40 #include "dsConstant.hpp"
41 #include <string>
42 
43 namespace device {
44 
45 
46 /**
47  * @class PixelResolution
48  * @brief This class extends DSConstant to manages the pixel resolution of the video.
49  * @ingroup devicesettingsclass
50  */
51 class PixelResolution : public DSConstant {
52 
53 public:
54 
55  static const int k720x480; //!< Indicates 720x480 video resolution.
56  static const int k720x576; //!< Indicates 720x576 video resolution.
57  static const int k1280x720; //!< Indicates 1280x720 video resolution.
58  static const int k1920x1080; //!< Indicates 1920x1080 video resolution.
59 
60  static const int k3840x2160; //!< Indicates 3840x2160 video resolution.
61  static const int k4096x2160; //!< Indicates 4096x2160 video resolution.
62 
63  static const int kMax; //!< Indicates the maximum number of video resolutions supported.
64 
65  static const PixelResolution & getInstance(int id);
66  static const PixelResolution & getInstance(const std::string &name);
67 
68  PixelResolution(int id);
69  virtual ~PixelResolution();
70 };
71 
72 }
73 
74 #endif /* _DS_PIXELRESOLUTION_HPP_ */
75 
76 
77 /** @} */
78 /** @} */
device::PixelResolution::kMax
static const int kMax
Indicates the maximum number of video resolutions supported.
Definition: pixelResolution.hpp:63
device::PixelResolution::k1280x720
static const int k1280x720
Indicates 1280x720 video resolution.
Definition: pixelResolution.hpp:57
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::PixelResolution
This class extends DSConstant to manages the pixel resolution of the video.
Definition: pixelResolution.hpp:51
device::PixelResolution::getInstance
static const PixelResolution & getInstance(int id)
This function gets the instance of PixelResolution against the specified id, only if the id passed is...
Definition: pixelResolution.cpp:85
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::PixelResolution::k3840x2160
static const int k3840x2160
Indicates 3840x2160 video resolution.
Definition: pixelResolution.hpp:60
device::PixelResolution::k1920x1080
static const int k1920x1080
Indicates 1920x1080 video resolution.
Definition: pixelResolution.hpp:58
device::PixelResolution::k720x480
static const int k720x480
Indicates 720x480 video resolution.
Definition: pixelResolution.hpp:55
device::PixelResolution::k4096x2160
static const int k4096x2160
Indicates 4096x2160 video resolution.
Definition: pixelResolution.hpp:61
device::PixelResolution::k720x576
static const int k720x576
Indicates 720x576 video resolution.
Definition: pixelResolution.hpp:56
device::PixelResolution::~PixelResolution
virtual ~PixelResolution()
This function is the default destructor for PixelResolution.
Definition: pixelResolution.cpp:125
device::PixelResolution::PixelResolution
PixelResolution(int id)
This function is a parameterised constructor for PixelResolution. It initializes the instance with th...
Definition: pixelResolution.cpp:107