Last Updated on : 2025-12-23 07:39:23download
Two-way video talk refers to IP camera (IPC) devices equipped with a display screen that support two-way video calls with an app or other IPC devices.
Typically, the IPC is responsible for capturing images and transmitting them to the peer end for display. Two-way means the IPC can receive a video stream from the peer end and play it on its own display screen.
A peer-to-peer (P2P) method is used for transmission.

svc_tmm_linksvc_ipc_tmm_controlInitialize the two-way video talk control module, mainly including initializing resources and creating threads.
/*****************************************************************************
* @brief Initialize the control module.
*
* @param cb: Event callback function.
* @param priv_data: User data, returned via the callback.
* @param call_timeout_s: Set the call timeout in seconds. The default 30s is used if the set value is ≤0.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_init(TUYA_TMM_CONTROL_EVT_CB cb, VOID* priv_data, INT_T call_timeout_s);
Deinitialize the two-way video talk control module, mainly including destroying resources and terminating threads.
/*****************************************************************************
* @brief Deinitialize the control module.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_deinit(VOID);
/*****************************************************************************
* @brief Initiate a call to the target device.
*
* @param target_device: The target device.
* @param category: The category of this device, which can be "" (empty string).
* @param stream_type: The type of the call stream.
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_call(CHAR_T *target_device, CHAR_T *category, TUYA_TMM_CONTROL_STREAM_TYPE_E stream_type);
/** @brief get the paired device list
* @warning this will get the local list, no http request to cloud
* @return the list head of paired device list, use tuya_list_for_each to visit, the type is TMM_ASSOC_DEV_T
*/
LIST_HEAD* tuya_tmm_link_get_paird_dev_list();
Receive and accept a call request initiated by the peer end.
/*****************************************************************************
* @brief Accept an incoming call.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_answer(VOID);
Receive and reject a call request initiated by the peer end.
/*****************************************************************************
* @brief Reject an incoming call.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_reject(VOID);
After having initiated a call, proactively cancel the call to the peer end before receiving an answer.
/*****************************************************************************
* @brief Cancel an outgoing call.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_cancel(VOID);
/*****************************************************************************
* @brief Hang up the current call.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_hangup(VOID);
Notify the server that this device stops initiating and receiving calls.
/*****************************************************************************
* @brief Stop initiating and receiving calls.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_stop(VOID);
After receiving a call request, notify the peer end that this device is busy.
/*****************************************************************************
* @brief The device is busy.
*
* @return
* - 0: success
* - Other values: error
*****************************************************************************/
OPERATE_RET tuya_tmm_control_busy(VOID);
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback