RDK Documentation (Open Sourced RDK Components)
dsVideoResolutionSettings_sample.h
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 hal
26 * @{
27 **/
28 
29 
30 #ifndef _DS_VIDEORESOLUTIONSETTINGS_H_
31 #define _DS_VIDEORESOLUTIONSETTINGS_H_
32 
33 #include "dsTypes.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 namespace {
38 #endif
39 
40 
41 #define _INTERLACED true
42 #define _PROGRESSIVE false
43 
44 #define dsVideoPortRESOLUTION_NUMMAX 32
45 
46 /* List all supported resolutions here */
47 
48 static dsVideoPortResolution_t kResolutions[] = {
49  { /*480i*/
50  /*.name = */ "480i",
51  /*.pixelResolution = */ dsVIDEO_PIXELRES_720x480,
52  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
53  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
54  /*.frameRate = */ dsVIDEO_FRAMERATE_29dot97,
55  /*.interlaced = */ _INTERLACED,
56  },
57  { /*480p*/
58  /*.name = */ "480p",
59  /*.pixelResolution = */ dsVIDEO_PIXELRES_720x480,
60  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
61  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
62  /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
63  /*.interlaced = */ _PROGRESSIVE,
64  },
65  { /*720i*/
66  /*.name = */ "576p50",
67  /*.pixelResolution = */ dsVIDEO_PIXELRES_720x576,
68  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
69  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
70  /*.frameRate = */ dsVIDEO_FRAMERATE_50,
71  /*.interlaced = */ _PROGRESSIVE,
72  },
73  { /*720p - Default - AutoSelect */
74  /*.name = */ "720p",
75  /*.pixelResolution = */ dsVIDEO_PIXELRES_1280x720,
76  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
77  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
78  /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
79  /*.interlaced = */ _PROGRESSIVE,
80  },
81  { /*720p - Default - AutoSelect */
82  /*.name = */ "720p50",
83  /*.pixelResolution = */ dsVIDEO_PIXELRES_1280x720,
84  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
85  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
86  /*.frameRate = */ dsVIDEO_FRAMERATE_50,
87  /*.interlaced = */ _PROGRESSIVE,
88  },
89  { /*1080p24*/
90  /*.name = */ "1080p24",
91  /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
92  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
93  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
94  /*.frameRate = */ dsVIDEO_FRAMERATE_50,
95  /*.interlaced = */ _PROGRESSIVE,
96  },
97  { /*1080p60*/
98  /*.name = */ "1080p60",
99  /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
100  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
101  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
102  /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
103  /*.interlaced = */ _PROGRESSIVE,
104  },
105  { /*1080i*/
106  /*.name = */ "1080i50",
107  /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
108  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
109  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
110  /*.frameRate = */ dsVIDEO_FRAMERATE_50,
111  /*.interlaced = */ _INTERLACED,
112  },
113  { /*1080p30*/
114  /*.name = */ "1080i",
115  /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
116  /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
117  /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
118  /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
119  /*.interlaced = */ _INTERLACED,
120  },
121 };
122 
123 static const int kDefaultResIndex = 3; //Pick one resolution from kResolutions[] as default
124 
125 #ifdef __cplusplus
126 }
127 }
128 #endif
129 
130 #endif /* VIDEORESOLUTIONSETTINGS_H_ */
131 
132 
133 /** @} */
134 /** @} */
dsVIDEO_PIXELRES_720x576
@ dsVIDEO_PIXELRES_720x576
Definition: dsTypes.h:460
dsVIDEO_FRAMERATE_59dot94
@ dsVIDEO_FRAMERATE_59dot94
Definition: dsTypes.h:511
dsVIDEO_ASPECT_RATIO_16x9
@ dsVIDEO_ASPECT_RATIO_16x9
Definition: dsTypes.h:549
dsTypes.h
Device Settings HAL types.
dsVIDEO_PIXELRES_1280x720
@ dsVIDEO_PIXELRES_1280x720
Definition: dsTypes.h:461
dsVIDEO_FRAMERATE_29dot97
@ dsVIDEO_FRAMERATE_29dot97
Definition: dsTypes.h:509
dsVIDEO_FRAMERATE_50
@ dsVIDEO_FRAMERATE_50
Definition: dsTypes.h:510
dsVIDEO_ASPECT_RATIO_4x3
@ dsVIDEO_ASPECT_RATIO_4x3
Definition: dsTypes.h:548
dsVIDEO_PIXELRES_720x480
@ dsVIDEO_PIXELRES_720x480
Definition: dsTypes.h:459
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
dsVIDEO_PIXELRES_1920x1080
@ dsVIDEO_PIXELRES_1920x1080
Definition: dsTypes.h:462
dsVIDEO_SSMODE_2D
@ dsVIDEO_SSMODE_2D
Definition: dsTypes.h:563