RegConnectionCB
Function Usage
Registers the notification callback function after a new connection is set up.
Secondary developers can implement a communication library based on any communication protocol. After the communication library establishes a reliable transmission channel, the callback function notifies the engine that a connection has been established. Then, the engine performs data communication via this channel.
Restrictions
This function is an external symbol to be implemented in the communication module by secondary developers. The video stream engine calls this function to register the notification callback function after a new connection is set up.
Prototype
using OnNewConnectionCallback = void (*)(int connection);
int RegConnectionCB(OnNewConnectionCallback cb);
Parameters
Parameter |
Input/Output |
Class |
Description |
|---|---|---|---|
cb |
Input |
OnNewConnectionCallback |
Notification callback function after a new connection is set up |
Returns
Data type: int
The value can be:
- 0: The callback function is successfully registered.
- Other values except 0: error code