RDK Documentation (Open Sourced RDK Components)
dsVideoDevice.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 dsVideoDevice.h
22  */
23 
24 
25 
26 /**
27 * @defgroup devicesettings
28 * @{
29 * @defgroup hal
30 * @{
31 **/
32 
33 
34 #ifndef _DS_VIDEODEVICE_H_
35 #define _DS_VIDEODEVICE_H_
36 
37 #include <sys/types.h>
38 #include "dsError.h"
39 #include "dsTypes.h"
40 
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
47 /** @addtogroup DSHAL_VIDEODEVICE_API Device Settings HAL Video Device Public API
48  * @ingroup devicesettingshalapi
49  *
50  * Described herein are the DeviceSettings HAL types and functions that are part of the
51  * Video Device subsystem. The Video Device subsystem manages video decoder hardware
52  * operations.
53  *
54  * @{
55  */
56 
57 /**
58  * @brief This function initialize all the video devices in the system.
59  *
60  * @return dsError_t
61  * @retval dsERR_NONE If sucessfully dsVideoDeviceInit api has been called using IARM support.
62  * @retval dsERR_GENERAL General failure.
63  */
65 
66 /**
67  * @brief This function gets the handle for the video device requested.
68  *
69  * @param[in] index Index of video device (0, 1, ...).
70  * @param[out] handle The address of a location to hold the video device handle on
71  * return.
72  * @return dsError_t
73  * @retval dsERR_NONE If sucessfully dsGetVideoDevice api has been called using IARM support.
74  * @retval dsERR_GENERAL General failure.
75  */
76 dsError_t dsGetVideoDevice(int index, intptr_t *handle);
77 
78 /**
79  * @brief This function is used to set the screen zoom mode (decoder format conversion).
80  * This function sets the screen zoom mode (Pan & Scan, LetterBox, PillarBox, etc.) for the specified video device.
81  *
82  * @param[in] handle Handle of the video output port.
83  * @param[in] dfc Type of zoom mode to be used.
84  * @return dsError_t
85  * @retval dsERR_NONE If sucessfully dsSetDFC api has been called using IARM support.
86  * @retval dsERR_GENERAL General failure.
87  */
88 dsError_t dsSetDFC(intptr_t handle, dsVideoZoom_t dfc);
89 
90 /**
91  * @brief This function is used to get the screen zoom mode (decoder format conversion).
92  * This function Gets the screen zoom mode (None,Full ,Pan & Scan, LetterBox, PillarBox, etc.) for the specified video device.
93  *
94  * @param[in] handle Handle of the video output port.
95  * @param[in] dfc Type of zoom mode to be used.
96  * @return dsError_t
97  * @retval dsERR_NONE If sucessfully dsGetDFC api has been called using IARM support.
98  * @retval dsERR_GENERAL General failure.
99  */
100 dsError_t dsGetDFC(intptr_t handle, dsVideoZoom_t *dfc);
101 
102 /**
103  * @brief This function deinitialize all the video devices in the system.
104  * It reset any data structures used within this module and release any handles specific to the video devices.
105  *
106  * @return dsError_t
107  * @retval dsERR_NONE If sucessfully dsVideoDeviceTerm has been called using IARM support.
108  * @retval dsERR_GENERAL General failure.
109  */
111 /**
112  * @brief To find the HDR capabilities of SoC
113  *
114  * This function is used to check which HDR capabilities the SoC supports
115  *
116  * @param [in] handle Handle for the video device (video decoder)
117  * @param [out] *capabilities OR-ed value of supported HDR standards.
118  * @return dsError_t Error code.
119  */
120 dsError_t dsGetHDRCapabilities(intptr_t handle, int *capabilities);
121 
122 /**
123  * @brief To find the Video formats supported by the SoC.
124  *
125  * This function is used to check which video formats the SoC supports
126  *
127  * @param [in] handle Handle for the video device (video decoder)
128  * @param [out] supported_formats OR-ed value of supported video codec formats.
129  *
130  * @return dsError_t Error code.
131  */
132 dsError_t dsGetSupportedVideoCodingFormats(intptr_t handle, unsigned int * supported_formats);
133 
134 /**
135  * @brief This API is used to get the video codec information.
136  *
137  * @param [in] handle Handle for the video device (video decoder)
138  * @param [in] codec OR-ed value of supported video codec formats.
139  * @param [out] info Video codec information like profile, level etc.
140  *
141  * @return dsError_t Error code.
142  */
143 dsError_t dsGetVideoCodecInfo(intptr_t handle, dsVideoCodingFormat_t codec, dsVideoCodecInfo_t * info);
144 
145 dsError_t dsForceDisableHDRSupport(intptr_t handle, bool disable);
146 
147 /* End of DSHAL_VIDEODEVICE_API doxygen group */
148 /**
149  * @}
150  */
151 dsError_t dsSetFRFMode(intptr_t handle, int frfmode);
152 dsError_t dsGetFRFMode(intptr_t handle, int *frfmode);
153 dsError_t dsGetCurrentDisplayframerate(intptr_t handle, char *framerate);
154 dsError_t dsSetDisplayframerate(intptr_t handle, char *framerate);
155 
156 typedef void (*dsRegisterFrameratePreChangeCB_t)(unsigned int tSecond);
157 dsError_t dsRegisterFrameratePreChangeCB(dsRegisterFrameratePreChangeCB_t CBFunc);
158 
159 typedef void (*dsRegisterFrameratePostChangeCB_t)(unsigned int tSecond);
160 dsError_t dsRegisterFrameratePostChangeCB(dsRegisterFrameratePostChangeCB_t CBFunc);
161 #ifdef __cplusplus
162 }
163 #endif
164 #endif /* _DS_VIDEODEVICE_H_ */
165 
166 
167 /** @} */
168 /** @} */
dsVideoDeviceTerm
dsError_t dsVideoDeviceTerm()
This function deinitialize all the video devices in the system. It reset any data structures used wit...
Definition: dsVideoDevice.c:144
dsGetSupportedVideoCodingFormats
dsError_t dsGetSupportedVideoCodingFormats(intptr_t handle, unsigned int *supported_formats)
To find the Video formats supported by the SoC.
Definition: dsVideoDevice.c:183
dsTypes.h
Device Settings HAL types.
dsError.h
Device Settings HAL error codes.
dsGetHDRCapabilities
dsError_t dsGetHDRCapabilities(intptr_t handle, int *capabilities)
To find the HDR capabilities of SoC.
Definition: dsVideoDevice.c:162
dsVideoDeviceInit
dsError_t dsVideoDeviceInit()
This function initialize all the video devices in the system.
Definition: dsVideoDevice.c:46
dsVideoZoom_t
enum _dsVideoZoom_t dsVideoZoom_t
dsSetDFC
dsError_t dsSetDFC(intptr_t handle, dsVideoZoom_t dfc)
This function is used to set the screen zoom mode (decoder format conversion). This function sets the...
Definition: dsVideoDevice.c:89
dsGetVideoCodecInfo
dsError_t dsGetVideoCodecInfo(intptr_t handle, dsVideoCodingFormat_t codec, dsVideoCodecInfo_t *info)
This API is used to get the video codec information.
Definition: dsVideoDevice.c:203
dsGetDFC
dsError_t dsGetDFC(intptr_t handle, dsVideoZoom_t *dfc)
This function is used to get the screen zoom mode (decoder format conversion). This function Gets the...
Definition: dsVideoDevice.c:117
dsVideoCodecInfo_t
Definition: dsTypes.h:1111
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
dsGetVideoDevice
dsError_t dsGetVideoDevice(int index, intptr_t *handle)
This function gets the handle for the video device requested.
Definition: dsVideoDevice.c:64