Device Settings HAL 0.2.0
 
Loading...
Searching...
No Matches
dsVideoDeviceSettings_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 Device subsystem. The Video Device subsystem manages system-specific HAL operations.
44 * @{
45 */
46
47/**
48 * @addtogroup dsVIDEODEVICE_HAL DS Video Device HAL
49 * @{
50 * @par Application API Specification
51 * dsVideoDevice HAL provides an interface for managing the VideoDevice settings for the device settings module
52 */
53
54/**
55 * @addtogroup DSHAL_VIDEODEVICE_SETTINGS_H DS Video Device Settings Header
56 * @{
57 * @par Application API Specification
58 */
59
60/**
61 * @file dsVideoDeviceSettings_sample.h
62 *
63 * <b> Following abbreviations present in HAL API </b>
64 *
65 * @par Abbreviations
66 * - cb: Callback function (suffix).
67 * - DS: Device Settings.
68 * - HAL: Hardware Abstraction Layer.
69 * - HDMI: High-Definition Multimedia Interface
70 * - DFC: Decoder format conversion
71 *
72 */
73
74#ifndef _DS_VIDEODEVICESETTINGS_H_
75#define _DS_VIDEODEVICESETTINGS_H_
76
77#include "dsUtl.h"
78#include "dsTypes.h"
79
80
81#ifdef __cplusplus
82extern "C" {
83#endif
84
85namespace {
86/*
87 * Enumerate supported DFCs.
88 */
89
90/**
91 * @brief A static constant array of supported ZOOM settings.
92 *
93 * The array is accessible only within the current translation unit and the
94 * values cannot be modified at runtime.
95 *
96 * @note The size of the array is fixed and cannot be changed.
97 */
98static const dsVideoZoom_t kSupportedDFCs[] = {
99 dsVIDEO_ZOOM_NONE, /*!< Decoder format conversion is inactive, */
100 dsVIDEO_ZOOM_FULL, /*!< Full screen (16:9 video is zoomed to fit 4:3 frame) */
101 dsVIDEO_ZOOM_PLATFORM}; /*!< Control over the decoder format conversions is managed by the platform. */
102
103/**
104 * @brief Default ZOOM Settings value
105 *
106 * The variable is accessible only within the current translation unit and the
107 * values cannot be modified at runtime.
108 *
109 */
110static const dsVideoZoom_t kDefaultDFC = dsVIDEO_ZOOM_FULL; /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */
111
112/**
113 * @brief Number of Video Devices supported
114 *
115 * The variable is accessible only within the current translation unit and the
116 * values cannot be modified at runtime.
117 *
118 */
119static const int kNumVideoDevices = 1;
120
121
122/**
123 * @brief A static constant array of the device configuration
124 *
125 * The variable is accessible only within the current translation unit and the
126 * values cannot be modified at runtime.
127 *
128 * @note The size of the array is fixed and cannot be changed.
129 */
130static const dsVideoConfig_t kConfigs[]= {
131 {
132 /*.numSupportedDFCs = */ dsUTL_DIM(kSupportedDFCs), /*!< Number of supported DFCs. 0 means "Info available at runtime" */
133 /*.supportedDFCs = */ kSupportedDFCs, /*!< Supported DFCs. */
134 /*.defaultDFC = */ dsVIDEO_ZOOM_FULL, /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame). */
135 },
136};
137
138/**
139 * @brief Checks if number of elements in ::kConfigs is the same as in ::kNumVideoDevices
140 *
141 */
142typedef int _SafetyCheck[(dsUTL_DIM(kConfigs) == kNumVideoDevices) ? 1 : -1];
143
144}
145#ifdef __cplusplus
146}
147#endif
148
149#endif /* _DS_VIDEODEVICESETTINGS_H_ */
150
151/** @} */ // End of DS Video Device Settings Header
152/** @} */ // End of DS Video Device HAK
153/** @} */ // End of Device Settings HAL
154/** @} */ // End of Device Settings Module
155/** @} */ // End of HPK
HAL types.
Device Settings HAL utilities.
enum _dsVideoZoom_t dsVideoZoom_t
This enumeration defines all of the standard screen zoom (format conversion) modes.
@ dsVIDEO_ZOOM_FULL
Definition dsTypes.h:535
@ dsVIDEO_ZOOM_PLATFORM
Definition dsTypes.h:543
@ dsVIDEO_ZOOM_NONE
Definition dsTypes.h:534
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
Definition dsUtl.h:98
Structure that defines video device configuration for the output.
Definition dsTypes.h:558