|
virtual | ~IRecordingEngineEventHandler () |
|
virtual void | onError (int error, agora::linuxsdk::STAT_CODE_TYPE stat_code)=0 |
|
virtual void | onWarning (int warn)=0 |
|
virtual void | onJoinChannelSuccess (const char *channelId, uid_t uid)=0 |
|
virtual void | onLeaveChannel (agora::linuxsdk::LEAVE_PATH_CODE code)=0 |
|
virtual void | onUserJoined (uid_t uid, agora::linuxsdk::UserJoinInfos &infos)=0 |
|
virtual void | onRemoteVideoStreamStateChanged (uid_t uid, linuxsdk::RemoteStreamState state, linuxsdk::RemoteStreamStateChangedReason reason)=0 |
|
virtual void | onRemoteAudioStreamStateChanged (uid_t uid, linuxsdk::RemoteStreamState state, linuxsdk::RemoteStreamStateChangedReason reason)=0 |
|
virtual void | onUserOffline (uid_t uid, agora::linuxsdk::USER_OFFLINE_REASON_TYPE reason)=0 |
|
virtual void | audioFrameReceived (unsigned int uid, const agora::linuxsdk::AudioFrame *frame) const =0 |
|
virtual void | videoFrameReceived (unsigned int uid, const agora::linuxsdk::VideoFrame *frame) const =0 |
|
virtual void | onActiveSpeaker (uid_t uid)=0 |
|
virtual void | onAudioVolumeIndication (const agora::linuxsdk::AudioVolumeInfo *speakers, unsigned int speakerNum)=0 |
|
virtual void | onFirstRemoteVideoDecoded (uid_t uid, int width, int height, int elapsed)=0 |
|
virtual void | onFirstRemoteAudioFrame (uid_t uid, int elapsed)=0 |
|
virtual void | onReceivingStreamStatusChanged (bool receivingAudio, bool receivingVideo)=0 |
|
virtual void | onConnectionLost ()=0 |
|
virtual void | onConnectionInterrupted ()=0 |
|
virtual void | onRejoinChannelSuccess (const char *channelId, uid_t uid)=0 |
|
virtual void | onConnectionStateChanged (agora::linuxsdk::ConnectionStateType state, agora::linuxsdk::ConnectionChangedReasonType reason)=0 |
|
virtual void | onRemoteVideoStats (agora::linuxsdk::uid_t uid, const agora::linuxsdk::RemoteVideoStats &stats)=0 |
|
virtual void | onRemoteAudioStats (agora::linuxsdk::uid_t uid, const agora::linuxsdk::RemoteAudioStats &stats)=0 |
|
virtual void | onRecordingStats (const agora::linuxsdk::RecordingStats &stats)=0 |
|
virtual void | onLocalUserRegistered (uid_t uid, const char *userAccount)=0 |
|
virtual void | onUserInfoUpdated (uid_t uid, const agora::linuxsdk::UserInfo &info)=0 |
|
The IRecordingEngineEventHandler class enables callbacks to your application.
◆ ~IRecordingEngineEventHandler()
virtual agora::recording::IRecordingEngineEventHandler::~IRecordingEngineEventHandler |
( |
| ) |
|
|
inlinevirtual |
◆ onError()
Occurs when an error occurs during SDK runtime.
The SDK cannot fix the issue or resume running. It requires intervention from the application and informs the user on the issue.
- Parameters
-
◆ onWarning()
virtual void agora::recording::IRecordingEngineEventHandler::onWarning |
( |
int |
warn | ) |
|
|
pure virtual |
Occurs when a warning occurs during SDK runtime.
In most cases, the application can ignore the warnings reported by the SDK because the SDK can usually fix the issue and resume running.
- Parameters
-
◆ onJoinChannelSuccess()
virtual void agora::recording::IRecordingEngineEventHandler::onJoinChannelSuccess |
( |
const char * |
channelId, |
|
|
uid_t |
uid |
|
) |
| |
|
pure virtual |
Occurs when the recording server joins the channel.
- Parameters
-
channelId | Channel ID assigned based on the channel name specified in joinChannel. |
uid | The UID of the recording server. |
◆ onLeaveChannel()
Occurs when the recording server leaves the channel.
- Parameters
-
code | The reasons why the recording server leaves the channel. See the LEAVE_PATH_CODE. |
◆ onUserJoined()
Occurs when a remote user/host joins the channel.
- Communication profile: This callback notifies the recording server that a remote user joins the channel and reports the user's UID and information.
- Live broadcast profile: This callback notifies the recording server that a host joins the channel and reports the user's UID and information.
If there are users/hosts in the channel before the recording server joins the channel, the SDK also reports on the UIDs and information of the existing users/hosts. This callback is triggered as many times as the number of the users/hosts in the channel.
- Parameters
-
◆ onRemoteVideoStreamStateChanged()
Occurs when the state of a remote user's video stream changes.
- Parameters
-
uid | The UID of the remote user. |
state | Indicates the current state of the remote user's video stream. For details, see RemoteStreamState. |
reason | Indicates the reason causing the state change. For details, see RemoteStreamStateChangedReason. |
◆ onRemoteAudioStreamStateChanged()
Occurs when the state of a remote user's audio stream changes.
- Parameters
-
uid | The UID of the remote user. |
state | Indicates the current state of the remote user's audio stream. For details, see RemoteStreamState. |
reason | Indicates the reason causing the state change. For details, see RemoteStreamStateChangedReason. |
◆ onUserOffline()
Occurs when a user leaves the channel or goes offline.
When no data package of a user is received for a certain period of time (15 seconds), the SDK assumes that the user has goes offline. Weak network connections may lead to misinformation, so Agora recommends using the signaling system for offline event detection.
- Parameters
-
uid | The user ID. |
reason | The reasons why the user leaves the channel or goes offline. |
◆ audioFrameReceived()
virtual void agora::recording::IRecordingEngineEventHandler::audioFrameReceived |
( |
unsigned int |
uid, |
|
|
const agora::linuxsdk::AudioFrame * |
frame |
|
) |
| const |
|
pure virtual |
Occurs when the raw audio data is received. If you set decodeAudio in RecordingConfig as 1
, 2
, or 3
, you receive audio frames from this callback.
- Parameters
-
uid | The user ID. |
frame | The received raw audio data in PCM or AAC format. For more information, see AudioFrame. |
◆ videoFrameReceived()
virtual void agora::recording::IRecordingEngineEventHandler::videoFrameReceived |
( |
unsigned int |
uid, |
|
|
const agora::linuxsdk::VideoFrame * |
frame |
|
) |
| const |
|
pure virtual |
Occurs when the video frame is received.
If you set decodeVideo in RecordingConfig as 1
, 2
, or 3
, you receive raw video data from this callback.
If you set decodeVideo in RecordingConfig as 4
or 5
, you receive video frames in JPG file format from this callback.
This callback is triggered for every received video frame and can be used to detect sexually explicit content, if necessary. Agora recommends capturing the I frame only and neglecting the others.
- Parameters
-
uid | The user ID. |
frame | The received video frame in YUV, H.264, H.265, JPG, or JPG file format. For more information, see VideoFrame. |
◆ onActiveSpeaker()
virtual void agora::recording::IRecordingEngineEventHandler::onActiveSpeaker |
( |
uid_t |
uid | ) |
|
|
pure virtual |
Reports the user who speaks loudest.
If you set the audioIndicationInterval parameter in RecordingConfig to be greater than 0, this callback returns the uid
of the user with the highest volume over a certain time period.
- Parameters
-
uid | The UID of the user with the highest volume over a certain time period. |
◆ onAudioVolumeIndication()
virtual void agora::recording::IRecordingEngineEventHandler::onAudioVolumeIndication |
( |
const agora::linuxsdk::AudioVolumeInfo * |
speakers, |
|
|
unsigned int |
speakerNum |
|
) |
| |
|
pure virtual |
Reports the list of users who are speaking and their volumes.
This callback works only when the audioIndicationInterval parameter in RecordingConfig is set to be greater than 0.
- Parameters
-
speakers | An array containing the user ID and volume information for each speaker. For more information, see AudioVolumeInfo. |
speakerNum | The total number of users who are speaking. |
◆ onFirstRemoteVideoDecoded()
virtual void agora::recording::IRecordingEngineEventHandler::onFirstRemoteVideoDecoded |
( |
uid_t |
uid, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
elapsed |
|
) |
| |
|
pure virtual |
Occurs when the first remote video frame is decoded.
This callback is triggered when the first frame of the remote video is received and decoded.
- Parameters
-
uid | The user ID. |
width | The width of the video frame. |
height | The height of the video frame. |
elapsed | Time elapsed (ms) from the local user calling joinChannel until this callback is triggered. |
◆ onFirstRemoteAudioFrame()
virtual void agora::recording::IRecordingEngineEventHandler::onFirstRemoteAudioFrame |
( |
uid_t |
uid, |
|
|
int |
elapsed |
|
) |
| |
|
pure virtual |
Occurs when the first remote audio frame is received.
- Parameters
-
uid | The user ID. |
elapsed | Time elapsed (ms) from the local user calling joinChannel until this callback is triggered. |
◆ onReceivingStreamStatusChanged()
virtual void agora::recording::IRecordingEngineEventHandler::onReceivingStreamStatusChanged |
( |
bool |
receivingAudio, |
|
|
bool |
receivingVideo |
|
) |
| |
|
pure virtual |
Occurs when the status of receiving the audio or video stream changes.
- Parameters
-
receivingAudio | Whether or not the recording server is receiving the audio stream. |
receivingVideo | Whether or not the recording server is receiving the video stream. |
◆ onConnectionLost()
virtual void agora::recording::IRecordingEngineEventHandler::onConnectionLost |
( |
| ) |
|
|
pure virtual |
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
The SDK triggers this callback when it cannot connect to the server 10 seconds after calling joinChannel, regardless of whether it is in the channel or not.
This callback is different from onConnectionInterrupted:
- The SDK triggers the onConnectionInterrupted callback when the SDK loses connection with the server for more than 4 seconds after it joins the channel.
- The SDK triggers the onConnectionLost callback when the SDK loses connection with the server for more than 10 seconds, regardless of whether it joins the channel or not.
For both callbacks, the SDK tries to reconnect to the server until the app calls leaveChannel.
◆ onConnectionInterrupted()
virtual void agora::recording::IRecordingEngineEventHandler::onConnectionInterrupted |
( |
| ) |
|
|
pure virtual |
Occurs when the connection between the SDK and the server is interrupted.
The SDK triggers this callback when it loses connection to the server for more than 4 seconds after the connection is established. After triggering this callback, the SDK tries to reconnect to the server. You can use this callback to implement pop-up reminders.
This callback is different from onConnectionInterrupted:
- The SDK triggers the onConnectionInterrupted callback when the SDK loses connection with the server for more than 4 seconds after it joins the channel.
- The SDK triggers the onConnectionLost callback when the SDK loses connection with the server for more than 10 seconds, regardless of whether it joins the channel or not.
For both callbacks, the SDK tries to reconnect to the server until the app calls leaveChannel.
◆ onRejoinChannelSuccess()
virtual void agora::recording::IRecordingEngineEventHandler::onRejoinChannelSuccess |
( |
const char * |
channelId, |
|
|
uid_t |
uid |
|
) |
| |
|
pure virtual |
Occurs when the recording server rejoins the channel after being disconnected due to network problems.
When the recording server loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
- Parameters
-
channelId | The channel name. |
uid | The UID of the recording server. |
◆ onConnectionStateChanged()
Occurs when the network connection state changes.
- Parameters
-
◆ onRemoteVideoStats()
Reports the statistics of the video stream from the remote user(communication profile)/host (live broadcast profile).
The SDK triggers this callback once every two seconds for each remote (communication profile)/host (live broadcast profile). If a channel includes multiple remote users/hosts, the SDK triggers this callback as many times.
- Parameters
-
uid | The UID of the user sending the video stream. |
stats | The statistics of the received remote video stream. See RemoteVideoStats. |
◆ onRemoteAudioStats()
Reports the statistics of the audio stream from the remote user(communication profile)/host (live broadcast profile).
The SDK triggers this callback once every two seconds for each remote (communication profile)/host (live broadcast profile). If a channel includes multiple remote users, the SDK triggers this callback as many times.
- Parameters
-
uid | The UID of the user sending the audio stream. |
stats | The statistics of the received remote audio stream. See RemoteAudioStats. |
◆ onRecordingStats()
◆ onLocalUserRegistered()
virtual void agora::recording::IRecordingEngineEventHandler::onLocalUserRegistered |
( |
uid_t |
uid, |
|
|
const char * |
userAccount |
|
) |
| |
|
pure virtual |
Occurs when the recording server successfully registers a user account by calling the joinChannelWithUserAccount method.
This callback reports the user ID and user account of the local user.
- Parameters
-
uid | The user ID of the recording server. |
userAccount | The user account of the recording server. |
◆ onUserInfoUpdated()
virtual void agora::recording::IRecordingEngineEventHandler::onUserInfoUpdated |
( |
uid_t |
uid, |
|
|
const agora::linuxsdk::UserInfo & |
info |
|
) |
| |
|
pure virtual |
Occurs when the SDK gets the user ID and user account of a remote user.
After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object (UserInfo), and triggers this callback on the local client.
- Parameters
-
uid | The user ID of the remote user. |
info | The UserInfo object that contains the user ID and user account of the remote user. |