Public Member Functions | |
virtual | ~IRecordingEngine () |
virtual int | joinChannel (const char *channelKey, const char *channelId, uid_t uid, const RecordingConfig &config)=0 |
virtual int | joinChannelWithUserAccount (const char *token, const char *channelId, const char *userAccount, const RecordingConfig &config)=0 |
virtual int | getUserInfoByUserAccount (const char *userAccount, agora::linuxsdk::UserInfo *userinfo)=0 |
virtual int | getUserInfoByUid (uid_t uid, agora::linuxsdk::UserInfo *userInfo)=0 |
virtual int | setVideoMixingLayout (const agora::linuxsdk::VideoMixingLayout &layout)=0 |
virtual int | stoppedOnError ()=0 |
virtual int | leaveChannel ()=0 |
virtual int | release ()=0 |
virtual const RecordingEngineProperties * | getProperties ()=0 |
virtual int | startService ()=0 |
virtual int | stopService ()=0 |
virtual int | setUserBackground (uid_t uid, const char *img_path)=0 |
virtual int | setLogLevel (agora::linuxsdk::agora_log_level level)=0 |
virtual int | updateSubscribeVideoUids (uid_t *uids, uint32_t num)=0 |
virtual int | updateSubscribeAudioUids (uid_t *uids, uint32_t num)=0 |
virtual int | updateWatermarkConfigs (uint32_t wm_num, linuxsdk::WatermarkConfig *config)=0 |
Static Public Member Functions | |
static IRecordingEngine * | createAgoraRecordingEngine (const char *appId, IRecordingEngineEventHandler *eventHandler) |
The IRecordingEngine class provides the main methods that can be invoked by your application.
|
inlinevirtual |
|
static |
This method creates an IRecordingEngine instance.
appId | The App ID used in the communications to be recorded. For more information, see Get an App ID. |
eventHandler | The Agora Recording SDK notifies the application of the triggered events by callbacks in the IRecordingEngineEventHandler. |
|
pure virtual |
This method allows the recording server to join a channel and start recording.
requestToken
and renewToken
are private methods. Make sure that you set privilegeExpiredTs as 0 when generating a token, which means that the privilege, once generated, never expires.channelKey | The channelKey for authentication. Set channelKey of the recording server the same as that of the Native/Web SDK. If the Native/Web SDK uses a token, channelKey must be set as the token. For more information, see Use Security Keys. |
channelId | The name of the channel to be recorded. |
uid | The unique identifier of the recording server.
|
config | Detailed recording configuration. See RecordingConfig. |
|
pure virtual |
This method enables the recording server to join the channel with the user account.
After the recording server successfully joins the channel, the SDK triggers the onLocalUserRegistered and onJoinChannelSuccess callbacks on the local client.
token | The dynamic key for authentication. Set the dynamic key of the recording server the same as that of the Native/Web SDK. If the Native/Web SDK uses a token, the recording server must use a token and the token of the recording server cannot be set as null. For more information, see Use Security Keys. |
channelId | The name of the channel to be recorded. |
userAccount | The user account of the recording server. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
config | Detailed recording configuration. See RecordingConfig. |
|
pure virtual |
Gets the user information by passing in the user account.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them in mapping table object (UserInfo), and triggers the onUserInfoUpdated callback on the local client.
After receiving the onUserInfoUpdated callback, you can call the getUserInfoByUserAccount
method to get the user ID of the remote user from the UserInfo object by passing in the user account.
userAccount | The user account of the remote user. Ensure that you set this parameter. |
userinfo | [in/out] A UserInfo object that identifies the user: |
|
pure virtual |
Gets the user information by passing in the user ID.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them in mapping table object (UserInfo), and triggers the onUserInfoUpdated callback on the local client.
After receiving the onUserInfoUpdated callback, you can call the getUserInfoByUid
method to get the user account of the remote user from the UserInfo object by passing in the user ID.
uid | The user ID of the remote user. Ensure that you set this parameter. |
userInfo | [in/out] A UserInfo object that identifies the user: |
|
pure virtual |
This method sets the video layout in composite recording mode.
layout | Layout setting. See VideoMixingLayout. |
|
pure virtual |
|
pure virtual |
This method allows the recording server to leave the channel and release the thread resources.
|
pure virtual |
This method destroys the IRecordingEngine instance.
|
pure virtual |
This method allows you to retrieve the recording properties.
getProperties
method and the onUserJoined callback report the relative path of the recorded files and recording log. The difference between these two functions is that the onUserJoined callback is only triggered when a remote user joins the channel.Implemented in agora::server::IServerEngine.
|
pure virtual |
This method manually starts recording.
This method is valid only when you set triggerMode in RecordingConfig as 1 (manually).
|
pure virtual |
This method manually stops recording.
This method is valid only when you set triggerMode in RecordingConfig as 1 (manually).
|
pure virtual |
This method sets the background image of a specified user. When the user is online but does not send any video stream, the background image is displayed.
uid | The UID of the user for whom the background image to be set. |
img_path | The path of the image file. Only supports local images in JPEG format. |
|
pure virtual |
This method sets the log level.
Only log levels preceding the selected level are generated. The default value of the log level is 5.
level | See agora_log_level. |
|
pure virtual |
This method updates the UIDs of the users whose video streams you want to record.
uids | An array of UIDs whose video streams you want to record in string format, such as {"1","2","3"} . |
num | The number of UIDs. |
|
pure virtual |
This method updates the UIDs of the users whose audio streams you want to record.
uids | An array of UIDs whose audio streams you want to record in string format, such as {"1","2","3"} . |
num | The number of UIDs. |
|
pure virtual |
This method adds, updates, or deletes the watermark configurations.
The Agora Recording SDK supports three types of watermarks: text watermarks, timestamp watermarks, and image watermarks.
wm_num
and wm_configs
parameters to add watermarks when calling the setVideoMixingLayout method, you can directly call the updateWatermarkConfigs
method to add watermarks.wm_num
and wm_configs
parameters to add watermarks when calling the setVideoMixingLayout method, you can call the updateWatermarkConfigs
method to add, update, or delete watermarks. If you pass null as parameters in the updateWatermarkConfigs
method, you delete all watermarks that have been added.wm_num | The number of watermarks. The Agora Recording SDK supports up to 15 watermarks, including one timestamp watermark, four image watermarks, and ten text watermarks. |
config | The configuration of the watermarks. Pointer to an array of WatermarkConfig. |