RDK Documentation (Open Sourced RDK Components)
dsCompositeIn.h
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  * If not stated otherwise in this file or this component's Licenses.txt file the
21  * following copyright and licenses apply:
22  *
23  * Copyright ARRIS Enterprises, Inc. 2015.
24  *
25  * Licensed under the Apache License, Version 2.0 (the "License");
26  * you may not use this file except in compliance with the License.
27  * You may obtain a copy of the License at
28  *
29  * http://www.apache.org/licenses/LICENSE-2.0
30  *
31  * Unless required by applicable law or agreed to in writing, software
32  * distributed under the License is distributed on an "AS IS" BASIS,
33  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34  * See the License for the specific language governing permissions and
35  * limitations under
36 */
37 
38 
39 /**
40  * @file dsCompositeIn.h
41  *
42  * @brief Device Settings HAL COMPOSITE Input Public API.
43  * This API defines the HAL for the Device Settings COMPOSITE Input interface.
44  *
45  * @par Document
46  * Document reference.
47  *
48  * @par Open Issues (in no particular order)
49  * -# None
50  *
51  * @par Assumptions
52  * -# None
53  *
54  * @par Abbreviations
55  * - BE: Big-Endian.
56  * - cb: Callback function (suffix).
57  * - DS: Device Settings.
58  * - FPD: Front-Panel Display.
59  * - HAL: Hardware Abstraction Layer.
60  * - LE: Little-Endian.
61  * - LS: Least Significant.
62  * - MBZ: Must be zero.
63  * - MS: Most Significant.
64  * - RDK: Reference Design Kit.
65  * - _t: Type (suffix).
66  *
67  * @par Implementation Notes
68  * -# None
69  *
70  */
71 
72 
73 
74 /**
75 * @defgroup devicesettings
76 * @{
77 * @defgroup hal
78 * @{
79 **/
80 
81 
82 #ifndef _DS_dsCompositeInH_
83 #define _DS_dsCompositeInH_
84 
85 #include <sys/types.h>
86 #include "dsError.h"
87 #include "dsTypes.h"
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 /** @addtogroup DSHAL_CompositeIn_API Device Settings HAL COMPOSITE Input Public APIs
94  * @ingroup devicesettingshalapi
95  * @{
96  */
97 
98 /**
99  * @brief Initialize the underlying COMPOSITE Input sub-system.
100  *
101  * This function must initialize the COMPOSITE Input module and any associated data
102  * structures.
103  *
104  * @param None
105  * @return Device Settings error code
106  * @retval ::dsError_t
107  */
109 
110 /**
111  * @brief Terminate the underlying COMPOSITE Input sub-system.
112  *
113  * This function must terminate the COMPOSITE Input module and any associated data
114  * structures.
115  *
116  * @param None
117  * @return Device Settings error code
118  * @retval ::dsError_t
119  */
121 
122 /**
123  * @brief Get the number of COMPOSITE Input ports on the set-top.
124  *
125  * This function is used to get the number of COMPOSITE Input ports on the set-top.
126  *
127  * @param [in]pNumberOfInputs number of COMPOSITE Input ports.
128  * @return Device Settings error code
129  * @retval ::dsError_t
130  */
131 dsError_t dsCompositeInGetNumberOfInputs (uint8_t *pNumberOfInputs);
132 
133 /**
134  * @brief Get the COMPOSITE Input Status.
135  *
136  * This function is used to get the current COMPOSITE Input Status.
137  *
138  * @param [in]pStatus COMPOSITE Input enabled, COMPOSITE Input port connected,
139  * Active COMPOSITE Input port, and HW Pass-Through enabled.
140  * @return Device Settings error code
141  * @retval ::dsError_t
142  */
144 
145 /**
146  * @brief Select the COMPOSITE Input port to be presented.
147  *
148  * This function is used to select the COMPOSITE Input port for presentation.
149  *
150  * @param [in]ePort COMPOSITE Input port to be presented,
151  * @return Device Settings error code
152  * @retval ::dsError_t
153  */
154 dsError_t dsCompositeInSelectPort (dsCompositeInPort_t Port);
155 
156 /**
157  * @brief Scale the COMPOSITE In video
158  * This function is used to scale the COMPOSITE In video.
159  *
160  * @param[in] x : x coordinate for the video
161  * @param[in] y : y coordinate for the video
162  * @param[in] width : width of the video
163  * @param[in] height : height of the video
164  *
165  * @return Device Settings error code
166  * @retval ::dsError_t
167  */
168 dsError_t dsCompositeInScaleVideo (int32_t x, int32_t y, int32_t width, int32_t height);
169 
170 
171 /**
172  * @brief Callback function used to notify applications of COMPOSITE In hot plug status
173  *
174  * HAL Implementation should call this method to deliver COMPOSITE In hot plug status
175  * to the application (e.g. Connect/Disconnect for Port 0/1).
176  *
177  * @param Port COMPOSITE Input port.
178  * @param isPortConnected Connection state of COMPOSITE In Port.
179  *
180  *
181  * @return None.
182  */
183 typedef void (*dsCompositeInConnectCB_t)(dsCompositeInPort_t Port, bool isPortConnected);
184 
185 
186 /**
187  * @brief Register for the COMPOSITE Input hot plug event.
188  *
189  * This function is used to register for the COMPOSITE Input hot plug event.
190  *
191  * @param[in] CBFunc COMPOSITE Input hot plug callback function.
192  * @return Device Settings error code
193  * @retval ::dsError_t
194  */
196 
197 
198 /**
199  * @brief Callback function used to notify applications of Composite In signal change status
200  *
201  * HAL Implementation should call this method to deliver Composite In signal change status
202  * to the application (e.g. NoSignal/UnstableSignal/NotSupportedSignal/StableSignal for Composite In ports).
203  *
204  * @param port Composite Input port.
205  * @param sigStatus signal Status of Composite In Port.
206  *
207  *
208  * @return None.
209  */
210 typedef void (*dsCompositeInSignalChangeCB_t)(dsCompositeInPort_t port, dsCompInSignalStatus_t sigStatus);
211 
212 
213 /**
214  * @brief Register for the Composite Input Signal Change event.
215  *
216  * This function is used to register for the Composite Input Signal Change event.
217  *
218  * @param[in] CBFunc Composite Input Signal change callback function.
219  * @return Device Settings error code
220  * @retval ::dsError_t
221  */
223 
224 
225 
226 /**
227  * @brief Callback function used to notify applications of Composite Input status
228  *
229  * HAL Implementation should call this method to deliver Composite Input status
230  * to the application (e.g. port, isPresented(true/false) etc. for Composite In ports).
231  *
232  * @param inputStatus Composite Input status of a specific Port.
233  *
234  *
235  * @return None.
236  */
238 
239 
240 /**
241  * @brief Register for the Composite Input Status Change event.
242  *
243  * This function is used to register for the Composite Input Status Change event.
244  *
245  * @param[in] CBFunc Composite Input Status change callback function.
246  * @return Device Settings error code
247  * @retval ::dsError_t
248  */
250 
251 
252 /* End of DSHAL_CompositeIn_API doxygen group */
253 /**
254  * @}
255  */
256 
257 #ifdef __cplusplus
258 }
259 #endif
260 #endif /* _DS_dsCompositeInH_ */
261 
262 /** @} */
263 /** @} */
dsCompositeInGetNumberOfInputs
dsError_t dsCompositeInGetNumberOfInputs(uint8_t *pNumberOfInputs)
Get the number of COMPOSITE Input ports on the set-top.
Definition: dsCompositeIn.c:100
dsCompositeInGetStatus
dsError_t dsCompositeInGetStatus(dsCompositeInStatus_t *pStatus)
Get the COMPOSITE Input Status.
Definition: dsCompositeIn.c:127
dsCompositeInRegisterStatusChangeCB
dsError_t dsCompositeInRegisterStatusChangeCB(dsCompositeInStatusChangeCB_t CBFunc)
Register for the Composite Input Status Change event.
dsCompositeInScaleVideo
dsError_t dsCompositeInScaleVideo(int32_t x, int32_t y, int32_t width, int32_t height)
Scale the COMPOSITE In video This function is used to scale the COMPOSITE In video.
Definition: dsCompositeIn.c:178
dsTypes.h
Device Settings HAL types.
dsCompositeInInit
dsError_t dsCompositeInInit(void)
Initialize the underlying COMPOSITE Input sub-system.
Definition: dsCompositeIn.c:58
dsCompositeInTerm
dsError_t dsCompositeInTerm(void)
Terminate the underlying COMPOSITE Input sub-system.
Definition: dsCompositeIn.c:79
dsCompositeInConnectCB_t
void(* dsCompositeInConnectCB_t)(dsCompositeInPort_t Port, bool isPortConnected)
Callback function used to notify applications of COMPOSITE In hot plug status.
Definition: dsCompositeIn.h:183
dsError.h
Device Settings HAL error codes.
dsCompositeInStatusChangeCB_t
void(* dsCompositeInStatusChangeCB_t)(dsCompositeInStatus_t inputStatus)
Callback function used to notify applications of Composite Input status.
Definition: dsCompositeIn.h:237
dsCompositeInSelectPort
dsError_t dsCompositeInSelectPort(dsCompositeInPort_t Port)
Select the COMPOSITE Input port to be presented.
Definition: dsCompositeIn.c:154
_dsCompositeInStatus_t
Definition: dsTypes.h:1076
dsCompositeInSignalChangeCB_t
void(* dsCompositeInSignalChangeCB_t)(dsCompositeInPort_t port, dsCompInSignalStatus_t sigStatus)
Callback function used to notify applications of Composite In signal change status.
Definition: dsCompositeIn.h:210
dsCompositeInRegisterConnectCB
dsError_t dsCompositeInRegisterConnectCB(dsCompositeInConnectCB_t CBFunc)
Register for the COMPOSITE Input hot plug event.
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
dsCompositeInRegisterSignalChangeCB
dsError_t dsCompositeInRegisterSignalChangeCB(dsCompositeInSignalChangeCB_t CBFunc)
Register for the Composite Input Signal Change event.