| 1 | /** |
| 2 | * FreeRDP: A Remote Desktop Protocol Implementation |
| 3 | * Video Capture Virtual Channel Extension |
| 4 | * |
| 5 | * Copyright 2026 Armin Novak <[email protected]> |
| 6 | * Copyright 2026 Thincast Technologies GmbH |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | |
| 21 | #pragma once |
| 22 | |
| 23 | #include <freerdp/config.h>cxx . . $ `<file>/build/include/freerdp/config.h`/ |
| 24 | |
| 25 | #if defined(CHANNEL_RDPECAMcxx . . $ `build/include/freerdp/config.h:138:9`!) |
| 26 | #include <stdbool.h> |
| 27 | #include <winpr/wtypes.h>cxx . . $ `<file>/winpr/include/winpr/wtypes.h`/ |
| 28 | #include <freerdp/channels/rdpecam.h>cxx . . $ `<file>/include/freerdp/channels/rdpecam.h`/ |
| 29 | |
| 30 | WINPR_ATTR_FORMAT_ARGcxx . . $ `winpr/include/winpr/platform.h:660:9`!(5, 6) |
| 31 | static inline void rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(wLogcxx . . $ wLog#* log, const char* file, const char* fkt, size_tcxx . . $ size_t# line, |
| 32 | WINPR_FORMAT_ARGcxx . . $ `winpr/include/winpr/platform.h:661:9`! const char* fmt, ...) |
| 33 | { |
| 34 | const DWORDcxx . . $ DWORD# level = WLOG_WARNcxx . . $ WLOG_WARN.; |
| 35 | va_listcxx . . $ va_list# ap = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!; |
| 36 | |
| 37 | va_startcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stdarg.h:51:9`!(ap, fmt); |
| 38 | if (WLog_IsLevelActivecxx . . $ WLog_IsLevelActive(be4366e4f452978f).(log, level)) |
| 39 | WLog_PrintTextMessageVAcxx . . $ WLog_PrintTextMessageVA(37fb0c7a0c6f4737).(log, level, line, file, fkt, fmt, ap); |
| 40 | va_endcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stdarg.h:53:9`!(ap); |
| 41 | } |
| 42 | |
| 43 | /** @brief check input data is a valid \ref CAM_MSG_ID value |
| 44 | * |
| 45 | * @param id The message id to check |
| 46 | * @param log The logger to use |
| 47 | * @param file The file name the function is called from |
| 48 | * @param fkt The function calling this function |
| 49 | * @param line The line number where the function is called |
| 50 | * |
| 51 | * @return \b true for success, \b false if invalid |
| 52 | * @since version 3.20.1 |
| 53 | */ |
| 54 | #define rdpecam_valid_messageIdcxx . . $ `channels/rdpecam/common/rdpecam-utils.h:54:9`!(id) \ |
| 55 | rdpecam_valid_messageId_((id), WLog_Get(TAGcxx . . $ `channels/rdpecam/server/camera_device_enumerator_main.c:30:9`!), __FILE__, __func__, __LINE__) |
| 56 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 57 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_messageId_cxx . . $ rdpecam_valid_messageId_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# id, wLogcxx . . $ wLog#* log, const char* file, const char* fkt, |
| 58 | size_tcxx . . $ size_t# line) |
| 59 | { |
| 60 | switch (id) |
| 61 | { |
| 62 | case CAM_MSG_ID_SuccessResponsecxx . . $ CAM_MSG_ID_SuccessResponse.: |
| 63 | case CAM_MSG_ID_ErrorResponsecxx . . $ CAM_MSG_ID_ErrorResponse.: |
| 64 | case CAM_MSG_ID_SelectVersionRequestcxx . . $ CAM_MSG_ID_SelectVersionRequest.: |
| 65 | case CAM_MSG_ID_SelectVersionResponsecxx . . $ CAM_MSG_ID_SelectVersionResponse.: |
| 66 | case CAM_MSG_ID_DeviceAddedNotificationcxx . . $ CAM_MSG_ID_DeviceAddedNotification.: |
| 67 | case CAM_MSG_ID_DeviceRemovedNotificationcxx . . $ CAM_MSG_ID_DeviceRemovedNotification.: |
| 68 | case CAM_MSG_ID_ActivateDeviceRequestcxx . . $ CAM_MSG_ID_ActivateDeviceRequest.: |
| 69 | case CAM_MSG_ID_DeactivateDeviceRequestcxx . . $ CAM_MSG_ID_DeactivateDeviceRequest.: |
| 70 | case CAM_MSG_ID_StreamListRequestcxx . . $ CAM_MSG_ID_StreamListRequest.: |
| 71 | case CAM_MSG_ID_StreamListResponsecxx . . $ CAM_MSG_ID_StreamListResponse.: |
| 72 | case CAM_MSG_ID_MediaTypeListRequestcxx . . $ CAM_MSG_ID_MediaTypeListRequest.: |
| 73 | case CAM_MSG_ID_MediaTypeListResponsecxx . . $ CAM_MSG_ID_MediaTypeListResponse.: |
| 74 | case CAM_MSG_ID_CurrentMediaTypeRequestcxx . . $ CAM_MSG_ID_CurrentMediaTypeRequest.: |
| 75 | case CAM_MSG_ID_CurrentMediaTypeResponsecxx . . $ CAM_MSG_ID_CurrentMediaTypeResponse.: |
| 76 | case CAM_MSG_ID_StartStreamsRequestcxx . . $ CAM_MSG_ID_StartStreamsRequest.: |
| 77 | case CAM_MSG_ID_StopStreamsRequestcxx . . $ CAM_MSG_ID_StopStreamsRequest.: |
| 78 | case CAM_MSG_ID_SampleRequestcxx . . $ CAM_MSG_ID_SampleRequest.: |
| 79 | case CAM_MSG_ID_SampleResponsecxx . . $ CAM_MSG_ID_SampleResponse.: |
| 80 | case CAM_MSG_ID_SampleErrorResponsecxx . . $ CAM_MSG_ID_SampleErrorResponse.: |
| 81 | case CAM_MSG_ID_PropertyListRequestcxx . . $ CAM_MSG_ID_PropertyListRequest.: |
| 82 | case CAM_MSG_ID_PropertyListResponsecxx . . $ CAM_MSG_ID_PropertyListResponse.: |
| 83 | case CAM_MSG_ID_PropertyValueRequestcxx . . $ CAM_MSG_ID_PropertyValueRequest.: |
| 84 | case CAM_MSG_ID_PropertyValueResponsecxx . . $ CAM_MSG_ID_PropertyValueResponse.: |
| 85 | case CAM_MSG_ID_SetPropertyValueRequestcxx . . $ CAM_MSG_ID_SetPropertyValueRequest.: |
| 86 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 87 | default: |
| 88 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_MSG_ID %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, id); |
| 89 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** @brief check input data is a valid \ref CAM_ERROR_CODE value |
| 94 | * |
| 95 | * @param code The code to check |
| 96 | * @param log The logger to use |
| 97 | * @param file The file name the function is called from |
| 98 | * @param fkt The function calling this function |
| 99 | * @param line The line number where the function is called |
| 100 | * |
| 101 | * @return \b true for success, \b false if invalid |
| 102 | * @since version 3.20.1 |
| 103 | */ |
| 104 | #define rdpecam_valid_CamErrorCodecxx . . $ `channels/rdpecam/common/rdpecam-utils.h:104:9`!(code) \ |
| 105 | rdpecam_valid_CamErrorCode_((code), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 106 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 107 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamErrorCode_cxx . . $ rdpecam_valid_CamErrorCode_(754ae63186c03f9).(UINT32cxx . . $ UINT32# code, wLogcxx . . $ wLog#* log, const char* file, |
| 108 | const char* fkt, size_tcxx . . $ size_t# line) |
| 109 | { |
| 110 | switch (code) |
| 111 | { |
| 112 | case CAM_ERROR_CODE_UnexpectedErrorcxx . . $ CAM_ERROR_CODE_UnexpectedError.: |
| 113 | case CAM_ERROR_CODE_InvalidMessagecxx . . $ CAM_ERROR_CODE_InvalidMessage.: |
| 114 | case CAM_ERROR_CODE_NotInitializedcxx . . $ CAM_ERROR_CODE_NotInitialized.: |
| 115 | case CAM_ERROR_CODE_InvalidRequestcxx . . $ CAM_ERROR_CODE_InvalidRequest.: |
| 116 | case CAM_ERROR_CODE_InvalidStreamNumbercxx . . $ CAM_ERROR_CODE_InvalidStreamNumber.: |
| 117 | case CAM_ERROR_CODE_InvalidMediaTypecxx . . $ CAM_ERROR_CODE_InvalidMediaType.: |
| 118 | case CAM_ERROR_CODE_OutOfMemorycxx . . $ CAM_ERROR_CODE_OutOfMemory.: |
| 119 | case CAM_ERROR_CODE_ItemNotFoundcxx . . $ CAM_ERROR_CODE_ItemNotFound.: |
| 120 | case CAM_ERROR_CODE_SetNotFoundcxx . . $ CAM_ERROR_CODE_SetNotFound.: |
| 121 | case CAM_ERROR_CODE_OperationNotSupportedcxx . . $ CAM_ERROR_CODE_OperationNotSupported.: |
| 122 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 123 | default: |
| 124 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_ERROR_CODE %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`!, code); |
| 125 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | /** @brief check input data is a valid \ref CAM_STREAM_FRAME_SOURCE_TYPES value |
| 130 | * |
| 131 | * @param val The value to check |
| 132 | * @param log The logger to use |
| 133 | * @param file The file name the function is called from |
| 134 | * @param fkt The function calling this function |
| 135 | * @param line The line number where the function is called |
| 136 | * |
| 137 | * @return \b true for success, \b false if invalid |
| 138 | * @since version 3.20.1 |
| 139 | */ |
| 140 | #define rdpecam_valid_CamStreamFrameSourceTypecxx . . $ `channels/rdpecam/common/rdpecam-utils.h:140:9`!(val) \ |
| 141 | rdpecam_valid_CamStreamFrameSourceType_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 142 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 143 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamStreamFrameSourceType_cxx . . $ rdpecam_valid_CamStreamFrameSourceType_(2ffffc84094ab52e).(UINT16cxx . . $ UINT16# val, wLogcxx . . $ wLog#* log, const char* file, |
| 144 | const char* fkt, size_tcxx . . $ size_t# line) |
| 145 | { |
| 146 | switch (val) |
| 147 | { |
| 148 | case CAM_STREAM_FRAME_SOURCE_TYPE_Colorcxx . . $ CAM_STREAM_FRAME_SOURCE_TYPE_Color.: |
| 149 | case CAM_STREAM_FRAME_SOURCE_TYPE_Infraredcxx . . $ CAM_STREAM_FRAME_SOURCE_TYPE_Infrared.: |
| 150 | case CAM_STREAM_FRAME_SOURCE_TYPE_Customcxx . . $ CAM_STREAM_FRAME_SOURCE_TYPE_Custom.: |
| 151 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 152 | default: |
| 153 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, |
| 154 | "Invalid CAM_STREAM_FRAME_SOURCE_TYPES %" PRIu16cxx . . $ `<external>/15933738808807975373/inttypes.h:108:10`!, val); |
| 155 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /** @brief check input data is a valid \ref CAM_STREAM_CATEGORY value |
| 160 | * |
| 161 | * @param val The value to check |
| 162 | * @param log The logger to use |
| 163 | * @param file The file name the function is called from |
| 164 | * @param fkt The function calling this function |
| 165 | * @param line The line number where the function is called |
| 166 | * |
| 167 | * @return \b true for success, \b false if invalid |
| 168 | * @since version 3.20.1 |
| 169 | */ |
| 170 | #define rdpecam_valid_CamStreamCategorycxx . . $ `channels/rdpecam/common/rdpecam-utils.h:170:9`!(val) \ |
| 171 | rdpecam_valid_CamStreamCategory_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 172 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 173 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamStreamCategory_cxx . . $ rdpecam_valid_CamStreamCategory_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# val, wLogcxx . . $ wLog#* log, const char* file, |
| 174 | const char* fkt, size_tcxx . . $ size_t# line) |
| 175 | { |
| 176 | switch (val) |
| 177 | { |
| 178 | case CAM_STREAM_CATEGORY_Capturecxx . . $ CAM_STREAM_CATEGORY_Capture.: |
| 179 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 180 | default: |
| 181 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_STREAM_CATEGORY %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, val); |
| 182 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | /** @brief check input data is a valid \ref CAM_MEDIA_FORMAT value |
| 187 | * |
| 188 | * @param val The value to check |
| 189 | * @param log The logger to use |
| 190 | * @param file The file name the function is called from |
| 191 | * @param fkt The function calling this function |
| 192 | * @param line The line number where the function is called |
| 193 | * |
| 194 | * @return \b true for success, \b false if invalid |
| 195 | * @since version 3.20.1 |
| 196 | */ |
| 197 | #define rdpecam_valid_CamMediaFormatcxx . . $ `channels/rdpecam/common/rdpecam-utils.h:197:9`!(val) \ |
| 198 | rdpecam_valid_CamMediaFormat_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 199 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 200 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamMediaFormat_cxx . . $ rdpecam_valid_CamMediaFormat_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# val, wLogcxx . . $ wLog#* log, const char* file, |
| 201 | const char* fkt, size_tcxx . . $ size_t# line) |
| 202 | { |
| 203 | switch (val) |
| 204 | { |
| 205 | case CAM_MEDIA_FORMAT_INVALIDcxx . . $ CAM_MEDIA_FORMAT_INVALID.: |
| 206 | case CAM_MEDIA_FORMAT_H264cxx . . $ CAM_MEDIA_FORMAT_H264.: |
| 207 | case CAM_MEDIA_FORMAT_MJPGcxx . . $ CAM_MEDIA_FORMAT_MJPG.: |
| 208 | case CAM_MEDIA_FORMAT_YUY2cxx . . $ CAM_MEDIA_FORMAT_YUY2.: |
| 209 | case CAM_MEDIA_FORMAT_NV12cxx . . $ CAM_MEDIA_FORMAT_NV12.: |
| 210 | case CAM_MEDIA_FORMAT_I420cxx . . $ CAM_MEDIA_FORMAT_I420.: |
| 211 | case CAM_MEDIA_FORMAT_RGB24cxx . . $ CAM_MEDIA_FORMAT_RGB24.: |
| 212 | case CAM_MEDIA_FORMAT_RGB32cxx . . $ CAM_MEDIA_FORMAT_RGB32.: |
| 213 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 214 | default: |
| 215 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_MEDIA_FORMAT %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, val); |
| 216 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** @brief check input data is a valid \ref CAM_MEDIA_TYPE_DESCRIPTION_FLAGS value |
| 221 | * |
| 222 | * @param val The value to check |
| 223 | * @param log The logger to use |
| 224 | * @param file The file name the function is called from |
| 225 | * @param fkt The function calling this function |
| 226 | * @param line The line number where the function is called |
| 227 | * |
| 228 | * @return \b true for success, \b false if invalid |
| 229 | * @since version 3.20.1 |
| 230 | */ |
| 231 | #define rdpecam_valid_MediaTypeDescriptionFlagscxx . . $ `channels/rdpecam/common/rdpecam-utils.h:231:9`!(val) \ |
| 232 | rdpecam_valid_MediaTypeDescriptionFlags_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 233 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 234 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_MediaTypeDescriptionFlags_cxx . . $ rdpecam_valid_MediaTypeDescriptionFlags_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# val, wLogcxx . . $ wLog#* log, const char* file, |
| 235 | const char* fkt, size_tcxx . . $ size_t# line) |
| 236 | { |
| 237 | switch (val) |
| 238 | { |
| 239 | case CAM_MEDIA_TYPE_DESCRIPTION_FLAG_DecodingRequiredcxx . . $ CAM_MEDIA_TYPE_DESCRIPTION_FLAG_DecodingRequired.: |
| 240 | case CAM_MEDIA_TYPE_DESCRIPTION_FLAG_BottomUpImagecxx . . $ CAM_MEDIA_TYPE_DESCRIPTION_FLAG_BottomUpImage.: |
| 241 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 242 | default: |
| 243 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, |
| 244 | "Invalid CAM_MEDIA_TYPE_DESCRIPTION_FLAGS %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, val); |
| 245 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | /** @brief check input data is a valid \ref CAM_PROPERTY_MODE value |
| 250 | * |
| 251 | * @param val The value to check |
| 252 | * @param log The logger to use |
| 253 | * @param file The file name the function is called from |
| 254 | * @param fkt The function calling this function |
| 255 | * @param line The line number where the function is called |
| 256 | * |
| 257 | * @return \b true for success, \b false if invalid |
| 258 | * @since version 3.20.1 |
| 259 | */ |
| 260 | #define rdpecam_valid_CamPropertyModecxx . . $ `channels/rdpecam/common/rdpecam-utils.h:260:9`!(val) \ |
| 261 | rdpecam_valid_CamPropertyMode_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 262 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamPropertyMode_cxx . . $ rdpecam_valid_CamPropertyMode_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# val, wLogcxx . . $ wLog#* log, const char* file, |
| 263 | const char* fkt, size_tcxx . . $ size_t# line) |
| 264 | { |
| 265 | switch (val) |
| 266 | { |
| 267 | case CAM_PROPERTY_MODE_Manualcxx . . $ CAM_PROPERTY_MODE_Manual.: |
| 268 | case CAM_PROPERTY_MODE_Autocxx . . $ CAM_PROPERTY_MODE_Auto.: |
| 269 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 270 | default: |
| 271 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_PROPERTY_MODE %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, val); |
| 272 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | /** @brief check input data is a valid \ref CAM_PROPERTY_SET value |
| 277 | * |
| 278 | * @param val The value to check |
| 279 | * @param log The logger to use |
| 280 | * @param file The file name the function is called from |
| 281 | * @param fkt The function calling this function |
| 282 | * @param line The line number where the function is called |
| 283 | * |
| 284 | * @return \b true for success, \b false if invalid |
| 285 | * @since version 3.20.1 |
| 286 | */ |
| 287 | #define rdpecam_valid_CamPropertySetcxx . . $ `channels/rdpecam/common/rdpecam-utils.h:287:9`!(val) \ |
| 288 | rdpecam_valid_CamPropertySet_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 289 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 290 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamPropertySet_cxx . . $ rdpecam_valid_CamPropertySet_(aa09a2faeb051b5a).(UINT8cxx . . $ UINT8# val, wLogcxx . . $ wLog#* log, const char* file, |
| 291 | const char* fkt, size_tcxx . . $ size_t# line) |
| 292 | { |
| 293 | switch (val) |
| 294 | { |
| 295 | case CAM_PROPERTY_SET_CameraControlcxx . . $ CAM_PROPERTY_SET_CameraControl.: |
| 296 | case CAM_PROPERTY_SET_VideoProcAmpcxx . . $ CAM_PROPERTY_SET_VideoProcAmp.: |
| 297 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 298 | default: |
| 299 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_PROPERTY_SET %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, val); |
| 300 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | /** @brief check input data is a valid \ref CAM_PROPERTY_CAPABILITIES value |
| 305 | * |
| 306 | * @param val The value to check |
| 307 | * @param log The logger to use |
| 308 | * @param file The file name the function is called from |
| 309 | * @param fkt The function calling this function |
| 310 | * @param line The line number where the function is called |
| 311 | * |
| 312 | * @return \b true for success, \b false if invalid |
| 313 | * @since version 3.20.1 |
| 314 | */ |
| 315 | #define rdpecam_valid_CamPropertyCapabilitiescxx . . $ `channels/rdpecam/common/rdpecam-utils.h:315:9`!(val) \ |
| 316 | rdpecam_valid_CamPropertyCapabilities_((val), WLog_Get(TAG), __FILE__, __func__, __LINE__) |
| 317 | WINPR_ATTR_NODISCARDcxx . . $ `winpr/include/winpr/platform.h:105:9`! |
| 318 | static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! rdpecam_valid_CamPropertyCapabilities_cxx . . $ rdpecam_valid_CamPropertyCapabilities_(754ae63186c03f9).(UINT32cxx . . $ UINT32# val, wLogcxx . . $ wLog#* log, const char* file, |
| 319 | const char* fkt, size_tcxx . . $ size_t# line) |
| 320 | { |
| 321 | if ((val & ~((UINT32cxx . . $ UINT32#)CAM_PROPERTY_CAPABILITY_Manualcxx . . $ CAM_PROPERTY_CAPABILITY_Manual. | CAM_PROPERTY_CAPABILITY_Autocxx . . $ CAM_PROPERTY_CAPABILITY_Auto.)) != 0) |
| 322 | { |
| 323 | rdpecam_PrintWarningcxx . . $ rdpecam_PrintWarning(d0fb1a4875300bc0).(log, file, fkt, line, "Invalid CAM_PROPERTY_CAPABILITIES %" PRIu8cxx . . $ `<external>/15933738808807975373/inttypes.h:107:10`!, |
| 324 | val); |
| 325 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 326 | } |
| 327 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 328 | } |
| 329 | |
| 330 | #endif |