Device Settings HAL 0.2.0
 
Loading...
Searching...
No Matches
dsVideoResolutionSettings_sample.h
Go to the documentation of this file.
1/*
2 * If not stated otherwise in this file or this component's LICENSE 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 * @addtogroup HPK Hardware Porting Kit
22 * @{
23 * @par The Hardware Porting Kit
24 * HPK is the next evolution of the well-defined Hardware Abstraction Layer
25 * (HAL), but augmented with more comprehensive documentation and test suites
26 * that OEM or SOC vendors can use to self-certify their ports before taking
27 * them to RDKM for validation or to an operator for final integration and
28 * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC
29 * vendor to self-certify their own Video Accelerator devices, with minimal RDKM
30 * assistance.
31 *
32 */
33
34/**
35 * @addtogroup Device_Settings Device Settings Module
36 * @{
37 */
38
39/**
40 * @addtogroup Device_Settings_HAL Device Settings HAL
41 * @par Application API Specification
42 * Described herein are the DeviceSettings HAL types and functions that are part of
43 * the Video Port subsystem. The Video Port subsystem manages system-specific HAL operations.
44 * @{
45 */
46
47/**
48 * @defgroup DSHAL_VIDEO_RESOLUTION_SETTINGS_H DS Video Resolution Settings Header
49 * @{
50 * @par Application API Specification
51 */
52
53/**
54 * @file dsVideoResolutionSettings_sample.h
55 *
56 * <b> Following abbreviations present in HAL API </b>
57 *
58 * @par Abbreviations
59 * - cb: Callback function (suffix).
60 * - DS: Device Settings.
61 * - HAL: Hardware Abstraction Layer.
62 * - HDMI: High-Definition Multimedia Interface
63 *
64 */
65
66#ifndef _DS_VIDEORESOLUTIONSETTINGS_H_
67#define _DS_VIDEORESOLUTIONSETTINGS_H_
68
69#include "dsTypes.h"
70
71#ifdef __cplusplus
72extern "C" {
73namespace {
74#endif
75
76
77#define _INTERLACED true
78#define _PROGRESSIVE false
79
80#define dsVideoPortRESOLUTION_NUMMAX 32
81
82/* List all supported resolutions here */
83
84static dsVideoPortResolution_t kResolutions[] = {
85 { /*480i*/
86 /*.name = */ "480i",
87 /*.pixelResolution = */ dsVIDEO_PIXELRES_720x480,
88 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
89 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
90 /*.frameRate = */ dsVIDEO_FRAMERATE_29dot97,
91 /*.interlaced = */ _INTERLACED,
92 },
93 { /*480p*/
94 /*.name = */ "480p",
95 /*.pixelResolution = */ dsVIDEO_PIXELRES_720x480,
96 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
97 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
98 /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
99 /*.interlaced = */ _PROGRESSIVE,
100 },
101 { /*720i*/
102 /*.name = */ "576p50",
103 /*.pixelResolution = */ dsVIDEO_PIXELRES_720x576,
104 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_4x3,
105 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
106 /*.frameRate = */ dsVIDEO_FRAMERATE_50,
107 /*.interlaced = */ _PROGRESSIVE,
108 },
109 { /*720p - Default - AutoSelect */
110 /*.name = */ "720p",
111 /*.pixelResolution = */ dsVIDEO_PIXELRES_1280x720,
112 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
113 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
114 /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
115 /*.interlaced = */ _PROGRESSIVE,
116 },
117 { /*720p - Default - AutoSelect */
118 /*.name = */ "720p50",
119 /*.pixelResolution = */ dsVIDEO_PIXELRES_1280x720,
120 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
121 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
122 /*.frameRate = */ dsVIDEO_FRAMERATE_50,
123 /*.interlaced = */ _PROGRESSIVE,
124 },
125 { /*1080p24*/
126 /*.name = */ "1080p24",
127 /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
128 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
129 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
130 /*.frameRate = */ dsVIDEO_FRAMERATE_50,
131 /*.interlaced = */ _PROGRESSIVE,
132 },
133 { /*1080p60*/
134 /*.name = */ "1080p60",
135 /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
136 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
137 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
138 /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
139 /*.interlaced = */ _PROGRESSIVE,
140 },
141 { /*1080i*/
142 /*.name = */ "1080i50",
143 /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
144 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
145 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
146 /*.frameRate = */ dsVIDEO_FRAMERATE_50,
147 /*.interlaced = */ _INTERLACED,
148 },
149 { /*1080p30*/
150 /*.name = */ "1080i",
151 /*.pixelResolution = */ dsVIDEO_PIXELRES_1920x1080,
152 /*.aspectRatio = */ dsVIDEO_ASPECT_RATIO_16x9,
153 /*.stereoscopicMode = */ dsVIDEO_SSMODE_2D,
154 /*.frameRate = */ dsVIDEO_FRAMERATE_59dot94,
155 /*.interlaced = */ _INTERLACED,
156 },
157};
158
159static const int kDefaultResIndex = 3; //Pick one resolution from kResolutions[] as default
160
161#ifdef __cplusplus
162}
163}
164#endif
165
166#endif /* _DS_VIDEORESOLUTIONSETTINGS_H_ */
167
168/** @} */ // End of DS Video Resolution Settings Header
169/** @} */ // End of Device Settings HAL
170/** @} */ // End of Device Settings Module
171/** @} */ // End of HPK
HAL types.
@ dsVIDEO_FRAMERATE_50
Played at 50 frames per second.
Definition dsTypes.h:456
@ dsVIDEO_FRAMERATE_29dot97
Played at 29.97 frames per second.
Definition dsTypes.h:455
@ dsVIDEO_FRAMERATE_59dot94
Played at 59.94 frames per second.
Definition dsTypes.h:457
@ dsVIDEO_PIXELRES_1280x720
1280x720 Resolution
Definition dsTypes.h:405
@ dsVIDEO_PIXELRES_1920x1080
1920x1080 Resolution
Definition dsTypes.h:406
@ dsVIDEO_PIXELRES_720x576
720x576 Resolution
Definition dsTypes.h:404
@ dsVIDEO_PIXELRES_720x480
720x480 Resolution
Definition dsTypes.h:403
@ dsVIDEO_SSMODE_2D
2D mode
Definition dsTypes.h:516
@ dsVIDEO_ASPECT_RATIO_16x9
16:9 aspect ratio
Definition dsTypes.h:500
@ dsVIDEO_ASPECT_RATIO_4x3
4:3 aspect ratio
Definition dsTypes.h:499
#define _PROGRESSIVE
Definition dsVideoResolutionSettings_sample.h:78
#define _INTERLACED
Definition dsVideoResolutionSettings_sample.h:77
Structure that defines video port resolution settings of output video device.
Definition dsTypes.h:582