Result Code - IoT SDK
This file defines all possible result codes returned by the VideoSDK functions. Each result code is represented as an enum constant, making it easier for developers to identify, handle, and debug errors in a standardized way across publishing, subscribing, and other SDK operations.
Enum Constant | Value | Description |
---|---|---|
RESULT_OK | 0 | Operation completed successfully with no errors. |
SSL_CONNECT_FAILED | 3001 | SSL handshake errors occur when the client and server fail to establish a secure connection due to mismatched protocols, certificates, or cipher suites. |
HTTP_REQUEST_FAILED | 3002 | The HTTP request could not be sent from the device, or the server did not respond to the request. |
MEMORY_ALLOC_FAILED | 3003 | The system failed to allocate memory because the requested buffer size exceeded the available heap. |
DEVICE_NOT_SUPPORTED | 3004 | The selected device/board is not supported by the SDK or its drivers, indicating a configuration mismatch. To resolve this, try using a supported board. |
NULL_PARAMETER | 3005 | A function call failed because a required input parameter was NULL or empty, resulting in an invalid operation. Ensure all required parameters are properly initialized before invoking the function. |
INIT_BOARD_FAILED | 3006 | Initialization of the board or audio codec hardware failed, preventing proper device setup. |
PEER_INIT_FAILED | 3007 | SRTP connection initialization failed due to cryptographic or configuration errors. |
TASK_ALREADY_STARTED | 3008 | An attempt was made to start a task that was already running. To resolve this, stop the task first and then try again. |
PUBLISH_MUTEX_CREATE_FAILED | 3009 | Failed to create a mutex required for synchronizing the media publishing operation. |
AUDIO_CODEC_INIT_FAILED | 3010 | Audio codec initialization failed due to a codec mismatch. Try using a different codec to resolve the issue. |
PUBLISH_PEER_CONNECTION_FAILED | 3011 | The peer connection setup for publishing failed, usually due to signaling or transport issues. |
PUBLISH_MEMORY_ALLOC_FAILED | 3012 | The system failed to allocate the memory required for the publishing process. |
PUBLISH_TASK_CREATE_FAILED | 3013 | Task creation for handling media publishing failed, often due to insufficient or incorrect parameters. |
SUBSCRIBE_MUTEX_CREATE_FAILED | 3014 | Failed to create a mutex required for synchronizing the media subscription operation. |
SUBSCRIBE_PEER_CONNECTION_FAILED | 3015 | The peer connection setup for subscribing to media failed, typically due to negotiation or network errors. |
SUBSCRIBE_MEMORY_ALLOC_FAILED | 3016 | The system failed to allocate the memory required for the subscribing process. |
SUBSCRIBE_TASK_CREATE_FAILED | 3017 | Task creation for handling subscriptions failed, often due to insufficient resources. |
STOP_PUBLISH_TASK_CREATE_FAILED | 3018 | Failed to create a task for stopping the publishing process cleanly. |
STOP_SUBSCRIBE_TASK_CREATE_FAILED | 3019 | Failed to create a task for stopping the subscribing process cleanly. |
CANDIDATE_PAIR_FAILED | 3020 | ICE candidate pair checks failed, which means no valid network path was found between peers. |
DTLS_HANDSHAKE_FAILED | 3021 | The DTLS handshake between peers failed due to a certificate or cryptographic mismatch. |
LEAVE_FAILED | 3022 | The leave() function call failed, so the client could not properly exit the session. |
INIT_NOT_CALLED | 3023 | This error occurs when the init() function was not called before using other functions like publish() or subscribe() . To resolve this, call init() first. |
DUPLICATE_ID | 3024 | The subscriberId and publisherId must be unique for each participant. If a duplicate ID is detected, the SDK returns a DUPLICATE_ID result code. To resolve this, please ensure your IDs are unique. |
Got a Question? Ask us on discord