RDK Documentation (Open Sourced RDK Components)
dsVideoPort.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 /**
21  * @file dsVideoPort.h
22  */
23 
24 
25 
26 /**
27 * @defgroup devicesettings
28 * @{
29 * @defgroup hal
30 * @{
31 **/
32 
33 
34 #ifndef _DS_VIDEOPORT_H
35 #define _DS_VIDEOPORT_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #include "dsError.h"
42 #include "dsTypes.h"
43 
44 
45 /**
46  * @brief Callback function used to notify applications of Video Format change
47  *
48  * HAL Implementation should call this method to deliver updated Video Format info
49  * to the application
50  *
51  * @param audioFormat Current video format of the content playing
52  *
53  *
54  * @return None.
55  */
56 typedef void (*dsVideoFormatUpdateCB_t)(dsHDRStandard_t videoFormat);
57 /**
58  * @addtogroup DSHAL_VIDEOPORT_API Device Settings HAL Video Port Public API
59  * @ingroup devicesettingshalapi
60  *
61  * Described herein are the DeviceSettings HAL types and functions that are part of the
62  * Video Port subsystem. The Video Port subsystem manages video output port hardware operations.
63  * @{
64  */
65 
66 /**
67  * @brief Initialize underlying Video Port sub-system.
68  *
69  * This function must initialize all the video specific output ports.
70  *
71  * @return dsError_t
72  * @retval dsERR_NONE If sucessfully dsVideoportinit api has been called using IARM support.
73  * @retval dsERR_GENERAL General failure.
74  */
76 
77 /**
78  * @brief Get the video port handle.
79  *
80  * This function gets the handle for the type of video port requested. It must return
81  * ::dsERR_OPERATION_NOT_SUPPORTED if the requested video port is unavailable.
82  *
83  * @param[in] type Type of video port (e.g. HDMI).
84  * @param[in] index The index of the video device (0, 1, ...).
85  * @param[out] handle The address of a location to hold the video device handle on return.
86  * @return Device Settings error code
87  * @retval dsERR_NONE If sucessfully dsgetvideoport api has been called using IARM support.
88  * @retval dsERR_GENERAL General failure.
89  */
90 dsError_t dsGetVideoPort(dsVideoPortType_t type, int index, intptr_t *handle);
91 
92 /**
93  * @brief Indicate whether a video port is enabled.
94  *
95  * This function indicates whether the specified video port is enabled or not.
96  *
97  * @param[in] handle Handle of the video port.
98  * @param[out] enabled The address of a location to hold the video port enable state
99  * on return (@a true when port is enabled, @a false otherwise).
100  * @return Device Settings error code
101  * @retval dsERR_NONE If sucessfully dsIsVideoPortEnabled api has been called using IARM support.
102  * @retval dsERR_GENERAL General failure .
103  */
104 dsError_t dsIsVideoPortEnabled(intptr_t handle, bool *enabled);
105 
106 /**
107  * @brief Indicate whether a video port is connected to a display.
108  *
109  * This function is used to find out whether the video port is connected to a display or not.
110  *
111  * @param[in] handle Handle of the video port.
112  * @param[out] connected The address of a location to hold the connection state on
113  * return (@a true when connected, @a false otherwise).
114  * @return Device Settings error code
115  * @retval dsERR_NONE If sucessfully dsIsDisplayConnected api has been called using IARM support.
116  * @retval dsERR_GENERAL General failure.
117  */
118 dsError_t dsIsDisplayConnected(intptr_t handle, bool *connected);
119 
120 /**
121  * @brief This function is used to indicate if the display connected supports surround audio.
122  *
123  * @param[in] handle Handle of the video port.
124  * @param[out] surround It is set to True if the display supports surround audio.
125  *
126  * @return Device Settings error code
127  * @retval dsERR_NONE Indicates dsIsDisplaySurround api has been called using IARM support.
128  * @retval dsERR_GENERAL General failure.
129  */
130 dsError_t dsIsDisplaySurround(intptr_t handle, bool *surround);
131 
132 /**
133  * @brief This function is used to get supported surround mode.
134  *
135  * @param[in] handle Handle of the video port.
136  * @param[out] surround mode.
137  *
138  * @return Device Settings error code
139  * @retval dsERR_NONE Indicates dsGetSurroundMode api has been called using IARM support.
140  * @retval dsERR_GENERAL General failure.
141  */
142 dsError_t dsGetSurroundMode(intptr_t handle, int *surround);
143 
144 
145 /**
146  * @brief This function is used to indicate whether a video port is connected to a display.
147  *
148  * @param[in] handle Handle of the video port.
149  * @param[out] connected The address of a location to hold the connection state on
150  * return (@a true when connected, @a false otherwise).
151  * @return Device Settings error code
152  * @retval dsERR_NONE If sucessfully dsIsDisplayConnected api has been called using IARM support.
153  * @retval dsERR_GENERAL General failure.
154  */
155 dsError_t dsIsVideoPortActive(intptr_t handle, bool *active);
156 
157 
158 /**
159  * @brief Toggle DTCP protection of a video port.
160  *
161  * This function is used to turn on/off the DTCP content protection for the specified
162  * video port. Must return ::dsERR_OPERATION_NOT_SUPPORTED if DTCP content protection
163  * is not available.
164  *
165  * @param [in] handle Handle of the video port.
166  * @param [in] contentProtect Flag to control DTCP content protection
167  * (@a true for enabled, @a false for disabled).
168  * @return Device Settings error code
169  * @retval ::dsError_t
170  */
171 dsError_t dsEnableDTCP(intptr_t handle, bool contentProtect);
172 
173 /**
174  * @brief Toggle HDCP protection of a video port.
175  *
176  * This function is used to turn on/off the HDCP content protection for the specified
177  * video port. Must return ::dsERR_OPERATION_NOT_SUPPORTED if HDCP content protection
178  * is not available.
179  *
180  * @param[in] handle Handle of the video port.
181  * @param[in] contentProtect Flag to control HDCP content protection
182  * (@a true for enabled, @a false for disabled).
183  * @param[in] hdcpKey HDCP key.
184  * @param[in] keySize HDCP key size.
185  * @return Device Settings error code
186  * @retval dsERR_NONE If sucessfully dsEnableHDCP api has been called using IARM support.
187  * @retval dsERR_GENERAL General failure.
188  * @retval dsERR_INVALID_PARAM If invalid HCDP key is used.
189  */
190 dsError_t dsEnableHDCP(intptr_t handle, bool contentProtect, char *hdcpKey, size_t keySize);
191 
192 /**
193  * @brief Indicate whether a video port is DTCP protected.
194  *
195  * This function indicates whether the specified video port is configured for DTCP
196  * content protection. It must return ::dsERR_OPERATION_NOT_SUPPORTED if content protection
197  * is not supported.
198  *
199  * @param [in] handle Handle of the video port.
200  * @param [out] *pContentProtected The address of a location to hold the DTCP content
201  * protection state on return (@a true when enabled,
202  * @a false otherwise).
203  * @return Device Settings error code
204  * @retval ::dsError_t
205  */
206 dsError_t dsIsDTCPEnabled (intptr_t handle, bool* pContentProtected);
207 
208  /**
209  * @brief Indicate whether a video port is HDCP protected.
210  *
211  * @param[in] handle Handle of the video port.
212  * @param[out] enabled The address of a location to hold the HDCP content
213  * protection state on return (@a true when enabled,
214  * @a false otherwise).
215  * @return Device Settings error code
216  * @retval dsERR_NONE If sucessfully dsIsHDCPEnabled api has been called using IARM support.
217  * @retval dsERR_GENERAL General failure.
218  */
219 dsError_t dsIsHDCPEnabled (intptr_t handle, bool* pContentProtected);
220 
221  /**
222  * @brief Enable/disable a video port.
223  *
224  * This function enables or disables the specified video port.
225  *
226  * @param [in] handle Handle of the video port.
227  * @param [in] enabled Flag to control the video port state
228  * (@a true to enable, @a false to disable)
229  * @return Device Settings error code
230  * @retval dsERR_NONE If sucessfully dsEnableVideoPort api has been called using IARM support.
231  * @retval dsERR_GENERAL General failure.
232  */
233 dsError_t dsEnableVideoPort(intptr_t handle, bool enabled);
234 
235 /**
236  * @brief Set video port's display resolution.
237  *
238  * This function sets the resolution for the video corresponding to the specified port handle.
239  *
240  * @param [in] handle Handle of the video port.
241  * @param [in] *resolution The address of a structure containing the video port
242  * resolution settings.
243  * @param [in] persist In false state allows disabling persist of resolution value.
244  * @return Device Settings error code
245  * @retval dsERR_NONE If sucessfully dsSetResolution api has been called using IARM support.
246  * @retval dsERR_GENERAL General failure.
247  */
248 dsError_t dsSetResolution(intptr_t handle, dsVideoPortResolution_t *resolution, bool persist);
249 
250 /**
251  * @brief Get the video display resolution.
252  *
253  * This function Gets the resolution for the video corresponding to the specified port and index.
254  *
255  * @param [in] handle Handle of the video output port.
256  * @param [in] *resolution The address of a structure containing the video output port
257  * resolution settings.
258  * @return Device Settings error code
259  * @retval dsERR_NONE If sucessfully dsGetResolution api has been called using IARM support.
260  * @retval dsERR_GENERAL General failure.
261  */
262 dsError_t dsGetResolution(intptr_t handle, dsVideoPortResolution_t *resolution);
263 
264 /**
265  * @brief Set the port to the the active source.
266  *
267  * @param handle Handle of the video port.
268  *
269  * @return Device Settings error code
270  * @retval ::dsError_t
271  */
272 dsError_t dsSetActiveSource(intptr_t handle);
273 
274  /**
275  * @brief Terminate the Video Port sub-system.
276  *
277  * This function must terminate all the video output ports. It must reset any data
278  * structures used within video port module and release any video port specific handles.
279  *
280 * @return Device Settings error code
281  * @retval dsERR_NONE If sucessfully dsVideoPortTerm api has been called using IARM support.
282  * @retval dsERR_GENERAL General failure.
283  */
285 
286 /**
287  * @brief Initialize the Video Resolution
288  *
289  * This function Initialize the Video Resolution
290  *
291  * @param [in] Initialize the Video Resolution
292  *
293  * @return Device Settings error code
294  * @retval ::dsError_t
295  */
297 
298 
299 /**
300  * @brief Callback function used to notify applications of HDCP status
301  *
302  * HAL Implementation should call this method to delivery HDCP status
303  * to the application (e.g. Authentication , Failure etc.).
304  *
305  * @param handle Handle of the display device.
306  * @param event Display HDCP status.
307  *
308  *
309  *
310  * @return None.
311  */
312 typedef void (*dsHDCPStatusCallback_t)(intptr_t handle, dsHdcpStatus_t status);
313 
314 
315 /**
316  * @brief Register a callback function to listen for HDCP status
317  *
318  * This function registers a callback function for getting the HDCP status on HDMI Ports
319  *
320  * @note Application should install at most one callback function per handle.
321  * Multiple listeners are supported at application layer and thus not
322  * required in HAL implementation.
323  *
324  * @param handle Handle of the display device.
325  * @param cb The callback function.
326  * @return Error code.
327  * @retval ::dsError_t
328  */
330 
331  /**
332  * @brief Get current HDCP status
333  *
334  * @param[in] status Handle HDCP status
335  * @return Device Settings error code
336  * @retval dsERR_NONE If sucessfully dsGetHDCPStatus api has been called using IARM support.
337  * @retval dsERR_GENERAL General failure.
338  */
339 dsError_t dsGetHDCPStatus (intptr_t handle, dsHdcpStatus_t *status);
340 
341 /**
342 * @brief Get STB HDCP protocol version
343 *
344 * @param handle Handle of the display device.
345 * @param[in/out] HDCP protocol version
346 * @return Device Settings error code
347 * @retval dsERR_NONE If sucessfully dsGetHDCPProtocol api has been called.
348 * @retval dsERR_GENERAL General failure.
349 */
350 dsError_t dsGetHDCPProtocol (intptr_t handle,dsHdcpProtocolVersion_t *protocolVersion);
351 
352 /**
353 * @brief Get Receiver/TV HDCP protocol version
354 *
355 * @param handle Handle of the display device.
356 * @param[in/out] HDCP protocol version
357 * @return Device Settings error code
358 * @retval dsERR_NONE If sucessfully dsGetHDCPProtocol api has been called.
359 * @retval dsERR_GENERAL General failure.
360 */
361 dsError_t dsGetHDCPReceiverProtocol (intptr_t handle,dsHdcpProtocolVersion_t *protocolVersion);
362 
363 /**
364 * @brief Get current used HDCP protocol version
365 *
366 * @param handle Handle of the display device.
367 * @param[in/out] HDCP protocol version
368 * @return Device Settings error code
369 * @retval dsERR_NONE If sucessfully dsGetHDCPProtocol api has been called.
370 * @retval dsERR_GENERAL General failure.
371 */
372 dsError_t dsGetHDCPCurrentProtocol (intptr_t handle,dsHdcpProtocolVersion_t *protocolVersion);
373 
374 /**
375  * @brief To find the HDR capabilities of TV
376  *
377  * This function is used to get the HDR capabilities supported by the TV.
378  *
379  * @param [in] handle Handle for the video device (video decoder)
380  * @param [out] *capabilities OR-ed value of supported HDR standards.
381  * @return dsError_t Error code.
382  */
383 dsError_t dsGetTVHDRCapabilities(intptr_t handle, int *capabilities);
384 
385 /**
386  * @brief To find the TV supported resolutions.
387  *
388  * This function is used to get the TV supported resolutions.
389  *
390  * @param [in] handle Handle for the video device (video decoder)
391  * @param [out] *resolution OR-ed value supported by TV.
392  * @return dsError_t Error code.
393  */
394 dsError_t dsSupportedTvResolutions(intptr_t handle, int *resolutions);
395 dsError_t dsSetForceDisable4KSupport(intptr_t handle, bool disable);
396 dsError_t dsGetForceDisable4KSupport(intptr_t handle, bool *disable);
397 
398  /**
399  * @brief Sets various SCART parameters
400  *
401  * Supported values:
402  * parameter_str value_str
403  * "aspect_ratio" "4x3", 16x9"
404  * "tv_startup" "on", "off"
405  * "tv_startup" "on", "off"
406  * "rgb" "on" (disables cvbs)
407  * "cvbs" "on" (disables rgb)
408  * "macrovision", "*" (not implemented)
409  * "cgms", "disabled"
410  * "cgms", "copyNever"
411  * "cgms", "copyOnce"
412  * "cgms", "copyFreely"
413  * "cgms", "copyNoMore"
414  * "port" "on", "off"
415  *
416  * @param[in] parameter_str - a name of parameter
417  * @param[in] value_str - a value of parameter
418  * @retval dsERR_NONE on success
419  * @retval dsERR_GENERAL General failure.
420  */
421 dsError_t dsSetScartParameter(intptr_t handle, const char* parameter_str, const char* value_str);
422 
423 /**
424  * @brief Get current video Electro-Optical Transfer Function (EOT) value;
425  *
426  * @param[in] handle - Handle of the display device.
427  * @param[out] video_eotf - pointer to EOFF value
428  *
429  * @return Device Settings error code
430  * @retval dsERR_NONE on success
431  * @retval dsERR_GENERAL General failure.
432  */
433 dsError_t dsGetVideoEOTF(intptr_t handle, dsHDRStandard_t *video_eotf);
434 
435 /**
436  * @brief Get current matrix coefficients value.
437  *
438  * @param[in] handle - Handle of the display device.
439  * @param[out] matrix_coefficients - pointer to matrix coefficients value
440  *
441  * @return Device Settings error code
442  * @retval dsERR_NONE on success
443  * @retval dsERR_GENERAL General failure.
444  */
445 dsError_t dsGetMatrixCoefficients(intptr_t handle, dsDisplayMatrixCoefficients_t *matrix_coefficients);
446 
447 /**
448  * @brief Get current color depth value.
449  *
450  * @param[in] handle - Handle of the display device.
451  * @param[out] color_depth - pointer to color depths value.
452  *
453  * @return Device Settings error code
454  * @retval dsERR_NONE on success
455  * @retval dsERR_GENERAL General failure.
456  */
457 dsError_t dsGetColorDepth(intptr_t handle, unsigned int* color_depth);
458 
459 /**
460  * @brief Get current color space setting.
461  *
462  * @param[in] handle - Handle of the display device.
463  * @param[out] color_space - pointer to color space value.
464  *
465  * @return Device Settings error code
466  * @retval dsERR_NONE on success
467  * @retval dsERR_GENERAL General failure.
468  */
469 dsError_t dsGetColorSpace(intptr_t handle, dsDisplayColorSpace_t* color_space);
470 
471 /**
472  * @brief Get quatization range.
473  *
474  * @param[in] handle - Handle of the display device.
475  * @param[out] quantization_range - pointer to quantization range value.
476  *
477  * @return Device Settings error code
478  * @retval dsERR_NONE on success
479  * @retval dsERR_GENERAL General failure.
480  */
481 dsError_t dsGetQuantizationRange(intptr_t handle, dsDisplayQuantizationRange_t* quantization_range);
482 
483 /**
484  * @brief Get current color space setting, color depth, matrix coefficients, video Electro-Optical Transfer Function (EOT)
485  * and quantization range in one call
486  *
487  * @param[in] handle - Handle of the display device.
488  * @param[out] video_eotf - pointer to EOFF value
489  * @param[out] matrix_coefficients - pointer to matrix coefficients value
490  * @param[out] color_space - pointer to color space value.
491  * @param[out] color_depth - pointer to color depths value.
492  * @param[out] quantization_range - pointer to quantization range value.
493  *
494  * @return Device Settings error code
495  * @retval dsERR_NONE on success
496  * @retval dsERR_GENERAL General failure.
497  */
498 dsError_t dsGetCurrentOutputSettings(intptr_t handle, dsHDRStandard_t* video_eotf, dsDisplayMatrixCoefficients_t* matrix_coefficients, dsDisplayColorSpace_t* color_space, unsigned int* color_depth, dsDisplayQuantizationRange_t* quantization_range);
499 
500 /**
501  * @brief Check Video Output is HDR or not.
502  *
503  * This function checks if the video output is HDR or not.
504  *
505  * @param [in] handle Handle of the video port.
506  * @param [in] *hdr The bool pointer
507  *
508  * @return Error Code.
509  * @retval ::dsError_t
510  */
511 dsError_t dsIsOutputHDR(intptr_t handle, bool *hdr);
512 
513 /**
514  * @brief Reset Video Output to SDR
515  *
516  * This function resets the video output to SDR
517  *
518  * @return Error Code.
519  * @retval ::dsError_t
520  */
522 
523 /**
524  * @brief This API is used to set the Preferred HDMI Protocol
525  *
526  * This function sets the Preferred HDMI Protocol
527  *
528  * @param [in] handle Handle of the video port.
529  * @param [in] *hdcpCurrentProtocol Address of the structure containing
530  * HDCP Protocol version enums
531  * dsHDCP_VERSION_1X = 0, < HDCP Protocol version 1.x
532  * dsHDCP_VERSION_2X, < HDCP Protocol version 2.x
533  * dsHDCP_VERSION_MAX < Maximum index for HDCP protocol.
534  *
535  * @return Error Code.
536  * @retval ::dsError_t
537  */
538 dsError_t dsSetHdmiPreference(intptr_t handle, dsHdcpProtocolVersion_t *hdcpCurrentProtocol);
539 
540 /**
541  * @brief This API is used to get the Preferred HDMI Protocol
542  *
543  * This function gets the Preferred HDMI Protocol and updates the
544  * *hdcpCurrentProtocol accordingly
545  *
546  * @param [in] handle Handle of the video port.
547  * @param [in] *hdcpCurrentProtocol Address of the structure containing
548  * HDCP Protocol version enums
549  * dsHDCP_VERSION_1X = 0, < HDCP Protocol version 1.x
550  * dsHDCP_VERSION_2X, < HDCP Protocol version 2.x
551  * dsHDCP_VERSION_MAX < Maximum index for HDCP protocol.
552  *
553  * @return Error Code.
554  * @retval ::dsError_t
555  */
556 dsError_t dsGetHdmiPreference(intptr_t handle, dsHdcpProtocolVersion_t *hdcpCurrentProtocol);
557 
558 dsError_t dsGetIgnoreEDIDStatus(intptr_t handle, bool* status);
559 
560 /**
561  * @brief This API is used to set the background color for video port
562  *
563  * This function sets the background color for video port.
564  *
565  * @param [in] handle Handle of the video port.
566  * @param [in] color color to be set
567  *
568  * @return Error Code.
569  * @retval ::dsError_t
570  */
572 
573 /**
574  * @brief This API is used to set/reset force HDR mode
575  *
576  * This function set/reset force HDR mode for video port.
577  *
578  * @param [in] handle Handle of the video port.
579  * @param [in] mode dsHDRStandard_t type
580  *
581  * @return Error Code.
582  * @retval ::dsError_t
583  */
584 dsError_t dsSetForceHDRMode(intptr_t handle, dsHDRStandard_t mode);
585 
586 /**
587  * @brief To find the color depth capabilities.
588  *
589  * This function is used to get the supported color depth capabilities.
590  *
591  * @param [in] handle Handle for the video port.
592  * @param [out] *capabilities OR-ed value of supported color depth standards.
593  * @return dsError_t Error code.
594  */
595 dsError_t dsColorDepthCapabilities(intptr_t handle, unsigned int *colorDepthCapability );
596 
597 /**
598  * @brief To get the preffered color depth mode.
599  *
600  * This function is used to get the preffered color depth mode.
601  *
602  * @param [in] handle Handle for the video port.
603  * @param [out] colorDepth color depth value.
604  * @return dsError_t Error code.
605  */
606 dsError_t dsGetPreferredColorDepth(intptr_t handle, dsDisplayColorDepth_t *colorDepth, bool persist );
607 
608 /**
609  * @brief To set the preffered color depth mode.
610  *
611  * This function is used to set the preffered color depth mode.
612  *
613  * @param [in] handle Handle for the video port.
614  * @param [in] colorDepth color depth value.
615  * @param [in] persist to persist value
616  * @return dsError_t Error code.
617  */
618 dsError_t dsSetPreferredColorDepth(intptr_t handle,dsDisplayColorDepth_t colorDepth, bool persist );
619 
620 /**
621  * @}
622  */
623 
624 #ifdef __cplusplus
625 }
626 #endif
627 #endif /* _DS_VIDEOPORT_H */
628 
629 
630 /** @} */
631 /** @} */
dsGetHDCPProtocol
dsError_t dsGetHDCPProtocol(intptr_t handle, dsHdcpProtocolVersion_t *protocolVersion)
Get STB HDCP protocol version.
Definition: dsVideoPort.c:177
dsGetTVHDRCapabilities
dsError_t dsGetTVHDRCapabilities(intptr_t handle, int *capabilities)
To find the HDR capabilities of TV.
Definition: dsVideoPort.c:605
dsRegisterHdcpStatusCallback
dsError_t dsRegisterHdcpStatusCallback(intptr_t handle, dsHDCPStatusCallback_t cb)
Register a callback function to listen for HDCP status.
dsGetColorSpace
dsError_t dsGetColorSpace(intptr_t handle, dsDisplayColorSpace_t *color_space)
Get current color space setting.
Definition: dsVideoPort.c:883
dsGetMatrixCoefficients
dsError_t dsGetMatrixCoefficients(intptr_t handle, dsDisplayMatrixCoefficients_t *matrix_coefficients)
Get current matrix coefficients value.
Definition: dsVideoPort.c:825
dsSetBackgroundColor
dsError_t dsSetBackgroundColor(intptr_t handle, dsVideoBackgroundColor_t color)
This API is used to set the background color for video port.
dsSetHdmiPreference
dsError_t dsSetHdmiPreference(intptr_t handle, dsHdcpProtocolVersion_t *hdcpCurrentProtocol)
This API is used to set the Preferred HDMI Protocol.
Definition: dsVideoPort.c:741
dsVideoPortTerm
dsError_t dsVideoPortTerm()
Terminate the Video Port sub-system.
Definition: dsVideoPort.c:511
dsVideoFormatUpdateCB_t
void(* dsVideoFormatUpdateCB_t)(dsHDRStandard_t videoFormat)
Callback function used to notify applications of Video Format change.
Definition: dsVideoPort.h:56
dsTypes.h
Device Settings HAL types.
dsEnableDTCP
dsError_t dsEnableDTCP(intptr_t handle, bool contentProtect)
Toggle DTCP protection of a video port.
dsVideoPortType_t
enum _dsVideoPortType_t dsVideoPortType_t
dsIsDTCPEnabled
dsError_t dsIsDTCPEnabled(intptr_t handle, bool *pContentProtected)
Indicate whether a video port is DTCP protected.
dsEnableVideoPort
dsError_t dsEnableVideoPort(intptr_t handle, bool enabled)
Enable/disable a video port.
Definition: dsVideoPort.c:328
dsError.h
Device Settings HAL error codes.
dsGetHDCPStatus
dsError_t dsGetHDCPStatus(intptr_t handle, dsHdcpStatus_t *status)
Get current HDCP status.
Definition: dsVideoPort.c:154
dsGetColorDepth
dsError_t dsGetColorDepth(intptr_t handle, unsigned int *color_depth)
Get current color depth value.
Definition: dsVideoPort.c:854
dsGetCurrentOutputSettings
dsError_t dsGetCurrentOutputSettings(intptr_t handle, dsHDRStandard_t *video_eotf, dsDisplayMatrixCoefficients_t *matrix_coefficients, dsDisplayColorSpace_t *color_space, unsigned int *color_depth, dsDisplayQuantizationRange_t *quantization_range)
Get current color space setting, color depth, matrix coefficients, video Electro-Optical Transfer Fun...
Definition: dsVideoPort.c:941
dsIsHDCPEnabled
dsError_t dsIsHDCPEnabled(intptr_t handle, bool *pContentProtected)
Indicate whether a video port is HDCP protected.
Definition: dsVideoPort.c:96
dsIsDisplaySurround
dsError_t dsIsDisplaySurround(intptr_t handle, bool *surround)
This function is used to indicate if the display connected supports surround audio.
Definition: dsVideoPort.c:273
dsSetForceHDRMode
dsError_t dsSetForceHDRMode(intptr_t handle, dsHDRStandard_t mode)
This API is used to set/reset force HDR mode.
Definition: dsVideoPort.c:974
dsGetPreferredColorDepth
dsError_t dsGetPreferredColorDepth(intptr_t handle, dsDisplayColorDepth_t *colorDepth, bool persist)
To get the preffered color depth mode.
Definition: dsVideoPort.c:436
dsVideoBackgroundColor_t
enum _dsVideoBackgroundColor_t dsVideoBackgroundColor_t
dsColorDepthCapabilities
dsError_t dsColorDepthCapabilities(intptr_t handle, unsigned int *colorDepthCapability)
To find the color depth capabilities.
Definition: dsVideoPort.c:488
dsIsOutputHDR
dsError_t dsIsOutputHDR(intptr_t handle, bool *hdr)
Check Video Output is HDR or not.
Definition: dsVideoPort.c:693
dsIsVideoPortEnabled
dsError_t dsIsVideoPortEnabled(intptr_t handle, bool *enabled)
Indicate whether a video port is enabled.
Definition: dsVideoPort.c:125
dsGetHdmiPreference
dsError_t dsGetHdmiPreference(intptr_t handle, dsHdcpProtocolVersion_t *hdcpCurrentProtocol)
This API is used to get the Preferred HDMI Protocol.
Definition: dsVideoPort.c:768
dsVideoPortInit
dsError_t dsVideoPortInit()
Initialize underlying Video Port sub-system.
Definition: dsVideoPort.c:45
dsSupportedTvResolutions
dsError_t dsSupportedTvResolutions(intptr_t handle, int *resolutions)
To find the TV supported resolutions.
Definition: dsVideoPort.c:627
dsSetResolution
dsError_t dsSetResolution(intptr_t handle, dsVideoPortResolution_t *resolution, bool persist)
Set video port's display resolution.
Definition: dsVideoPort.c:409
dsGetHDCPReceiverProtocol
dsError_t dsGetHDCPReceiverProtocol(intptr_t handle, dsHdcpProtocolVersion_t *protocolVersion)
Get Receiver/TV HDCP protocol version.
Definition: dsVideoPort.c:200
dsHDRStandard_t
enum _dsHDRStandard_t dsHDRStandard_t
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
dsIsVideoPortActive
dsError_t dsIsVideoPortActive(intptr_t handle, bool *active)
This function is used to indicate whether a video port is connected to a display.
Definition: dsVideoPort.c:577
dsHDCPStatusCallback_t
void(* dsHDCPStatusCallback_t)(intptr_t handle, dsHdcpStatus_t status)
Callback function used to notify applications of HDCP status.
Definition: dsVideoPort.h:312
dsGetResolution
dsError_t dsGetResolution(intptr_t handle, dsVideoPortResolution_t *resolution)
Get the video display resolution.
Definition: dsVideoPort.c:353
dsSetActiveSource
dsError_t dsSetActiveSource(intptr_t handle)
Set the port to the the active source.
dsSetScartParameter
dsError_t dsSetScartParameter(intptr_t handle, const char *parameter_str, const char *value_str)
Sets various SCART parameters.
Definition: dsVideoPort.c:380
dsGetQuantizationRange
dsError_t dsGetQuantizationRange(intptr_t handle, dsDisplayQuantizationRange_t *quantization_range)
Get quatization range.
Definition: dsVideoPort.c:912
dsIsDisplayConnected
dsError_t dsIsDisplayConnected(intptr_t handle, bool *connected)
Indicate whether a video port is connected to a display.
Definition: dsVideoPort.c:245
dsGetHDCPCurrentProtocol
dsError_t dsGetHDCPCurrentProtocol(intptr_t handle, dsHdcpProtocolVersion_t *protocolVersion)
Get current used HDCP protocol version.
Definition: dsVideoPort.c:223
dsEnableHDCP
dsError_t dsEnableHDCP(intptr_t handle, bool contentProtect, char *hdcpKey, size_t keySize)
Toggle HDCP protection of a video port.
Definition: dsVideoPort.c:530
dsGetSurroundMode
dsError_t dsGetSurroundMode(intptr_t handle, int *surround)
This function is used to get supported surround mode.
Definition: dsVideoPort.c:301
dsGetVideoEOTF
dsError_t dsGetVideoEOTF(intptr_t handle, dsHDRStandard_t *video_eotf)
Get current video Electro-Optical Transfer Function (EOT) value;.
Definition: dsVideoPort.c:796
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
dsSetPreferredColorDepth
dsError_t dsSetPreferredColorDepth(intptr_t handle, dsDisplayColorDepth_t colorDepth, bool persist)
To set the preffered color depth mode.
Definition: dsVideoPort.c:463
dsInitResolution
dsError_t dsInitResolution(dsVideoPortResolution_t *)
Initialize the Video Resolution.
dsResetOutputToSDR
dsError_t dsResetOutputToSDR()
Reset Video Output to SDR.
Definition: dsVideoPort.c:721
dsGetVideoPort
dsError_t dsGetVideoPort(dsVideoPortType_t type, int index, intptr_t *handle)
Get the video port handle.
Definition: dsVideoPort.c:64