RDK Documentation (Open Sourced RDK Components)
videoResolution.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 /**
24 * @defgroup devicesettings
25 * @{
26 * @defgroup ds
27 * @{
28 **/
29 
30 
31 #ifndef _DS_VIDEORESOLUTION_H_
32 #define _DS_VIDEORESOLUTION_H_
33 
34 #include "dsTypes.h"
35 #include "aspectRatio.hpp"
36 #include "pixelResolution.hpp"
37 #include "stereoScopicMode.hpp"
38 #include "frameRate.hpp"
39 #include "dsConstant.hpp"
40 
41 #include <string>
42 #include <vector>
43 
44 
45 /**
46  * @file videoResolution.hpp
47  * @brief It contains class and structure refrenced by the videoResolution.cpp file.
48  */
49 namespace device {
50 
51 
52 /**
53  * @calss VideoResolution
54  * @brief Class extending DSConstant to implement the videoResolution interface.
55  * @ingroup devicesettingsclass
56  */
57 class VideoResolution : public DSConstant {
58 
59  int _pixelResolutionId; //!< Indicates the video resolution.
60  int _aspectRatioId; //!< Indicates aspect ratio type of the video.
61  int _stereoScopicModeId; //!< Indicates the stereoscopic mode of the video.
62  int _frameRateId; //!< Indicates frame rate of the video.
63 
64  bool _interlaced; //!< TRUE indicates interlaced scan and FALSE indicates progressive scan.
65  bool _enabled; //!< TRUE indicates this video resolution is enabled otherwise disabled.
66 
67 
68 public:
69 
70  static const VideoResolution & getInstance(int id);
71  static const VideoResolution & getInstance(const std::string &name, bool isIgnoreEdid=false);
72 
73 
74  VideoResolution(const int id, const std::string &name,
75  int resolutionId, int ratioid, int ssModeId,
76  int frameRateId, bool interlacedId, bool enabled = true);
77  virtual ~VideoResolution();
78  const PixelResolution & getPixelResolution() const;
79  const AspectRatio & getAspectRatio() const;
81  const FrameRate & getFrameRate() const;
82  bool isInterlaced() const;
83  bool isEnabled() const;
84 };
85 
86 }
87 
88 #endif /* VIDEORESOLUTION_H_ */
89 
90 
91 /** @} */
92 /** @} */
device::StereoScopicMode
This class extentds DSConstant to implement StereoScopicMode. It manages the stereoscopic mode of the...
Definition: stereoScopicMode.hpp:50
device::VideoResolution::_enabled
bool _enabled
TRUE indicates this video resolution is enabled otherwise disabled.
Definition: videoResolution.hpp:65
device::VideoResolution::getFrameRate
const FrameRate & getFrameRate() const
This API is used to get the frame rate of the given video output port.
Definition: videoResolution.cpp:172
device::DSConstant::enabled
bool enabled
Indicates the port or port attributes inheriting this class is enabled or not.
Definition: dsConstant.hpp:54
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::PixelResolution
This class extends DSConstant to manages the pixel resolution of the video.
Definition: pixelResolution.hpp:51
device::FrameRate
This class extends DSConstant to handle the video frame rate.
Definition: frameRate.hpp:49
aspectRatio.hpp
This file defines AspectRatio class for managing aspect ratio types.
dsTypes.h
Device Settings HAL types.
device::VideoResolution::VideoResolution
VideoResolution(const int id, const std::string &name, int resolutionId, int ratioid, int ssModeId, int frameRateId, bool interlacedId, bool enabled=true)
This function is a default constructor for videoResolution. It initialises the data members of video ...
Definition: videoResolution.cpp:101
device::VideoResolution::_stereoScopicModeId
int _stereoScopicModeId
Indicates the stereoscopic mode of the video.
Definition: videoResolution.hpp:61
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::VideoResolution::getStereoscopicMode
const StereoScopicMode & getStereoscopicMode() const
This API is used to get the stereoscopic mode of the given video output port.
Definition: videoResolution.cpp:161
device::VideoResolution::isInterlaced
bool isInterlaced() const
This API is used to check the video is interlaced or not.
Definition: videoResolution.cpp:185
device::VideoResolution::_frameRateId
int _frameRateId
Indicates frame rate of the video.
Definition: videoResolution.hpp:62
device::VideoResolution::getInstance
static const VideoResolution & getInstance(int id)
This API is used to get the instance of the video resolution port based on the port id returned by th...
Definition: videoResolution.cpp:56
frameRate.hpp
This file defines FrameRate class to manage the video frame rate types.
device::VideoResolution::getPixelResolution
const PixelResolution & getPixelResolution() const
This API is used to get the pixel format of the given video output port.
Definition: videoResolution.cpp:134
device::VideoResolution::~VideoResolution
virtual ~VideoResolution()
This is a default destructor of class VideoResolution.
Definition: videoResolution.cpp:123
device::AspectRatio
This class extends DSConstant to implement AspectRatio. It manages the aspect ratios of the videos.
Definition: aspectRatio.hpp:50
device::VideoResolution::_aspectRatioId
int _aspectRatioId
Indicates aspect ratio type of the video.
Definition: videoResolution.hpp:60
stereoScopicMode.hpp
This file defines StereoScopicMode class to manage the video stereoscopy types.
device::VideoResolution::getAspectRatio
const AspectRatio & getAspectRatio() const
This API is used to get the current Aspect Ratio setting of the Display Device (i....
Definition: videoResolution.cpp:149
device::VideoResolution::isEnabled
bool isEnabled() const
This API is used to check whether the current resolution is enabled or not.
Definition: videoResolution.cpp:198
pixelResolution.hpp
This file defines PixelResolution class for managing video resolution types.
device::VideoResolution::_pixelResolutionId
int _pixelResolutionId
Indicates the video resolution.
Definition: videoResolution.hpp:59
device::VideoResolution::_interlaced
bool _interlaced
TRUE indicates interlaced scan and FALSE indicates progressive scan.
Definition: videoResolution.hpp:64