NERTC macOS/Windows SDK V5.6.40
载入中...
搜索中...
未找到
nertc_channel_event_handler.h
浏览该文件的文档.
1
8#ifndef NERTC_CHANNEL_EVENT_HANDLER_H
9#define NERTC_CHANNEL_EVENT_HANDLER_H
10
11#include "nertc_base_types.h"
12#include "nertc_error_code.h"
13#include "nertc_warn_code.h"
15
20namespace nertc
21{
34{
35public:
36 virtual ~IRtcChannelEventHandler() {}
37
53 virtual void onError(int error_code, const char* msg) {
54 (void)error_code;
55 (void)msg;
56 }
57
73 virtual void onWarning(int warn_code, const char* msg) {
74 (void)warn_code;
75 (void)msg;
76 }
77
94 virtual void onApiCallExecuted(const char* api_name, NERtcErrorCode error, const char* message) {
95 (void)api_name;
96 (void)error;
97 (void)message;
98 }
99
117 virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
118 (void)cid;
119 (void)uid;
120 (void)result;
121 (void)elapsed;
122 }
123
139 virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
140 (void)cid;
141 (void)uid;
142 }
143
161 (void)state;
162 (void)reason;
163 }
164
184 virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
185 (void)cid;
186 (void)uid;
187 (void)result;
188 }
189
203 virtual void onLeaveChannel(NERtcErrorCode result) {
204 (void)result;
205 }
206
224 virtual void onDisconnect(NERtcErrorCode reason) {
225 (void)reason;
226 }
227
249 virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
250 (void)oldRole;
251 (void)newRole;
252 }
253
279 virtual void onUserJoined(uid_t uid, const char * user_name) {
280 (void)uid;
281 (void)user_name;
282 }
283
323 virtual void onUserJoined(uid_t uid, const char* user_name, NERtcUserJoinExtraInfo join_extra_info) {
324 (void)uid;
325 (void)user_name;
326 (void)join_extra_info;
327 }
328
353 virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
354 (void)uid;
355 (void)reason;
356 }
357
404 virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info) {
405 (void)uid;
406 (void)reason;
407 (void)leave_extra_info;
408 }
409
422 virtual void onUserAudioStart(uid_t uid) {
423 (void)uid;
424 }
437 virtual void onUserAudioStop(uid_t uid) {
438 (void)uid;
439 }
454 virtual void onUserAudioMute(uid_t uid, bool mute) {
455 (void)uid;
456 (void)mute;
457 }
458
471 virtual void onUserSubStreamAudioStart(uid_t uid) { (void)uid; }
484 virtual void onUserSubStreamAudioStop(uid_t uid) { (void)uid; }
485
504 virtual void onUserSubStreamAudioMute(uid_t uid, bool mute) {
505 (void)uid;
506 (void)mute;
507 }
522 virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
523 (void)uid;
524 (void)max_profile;
525 }
538 virtual void onUserVideoStop(uid_t uid) {
539 (void)uid;
540 }
558 virtual void onUserVideoMute(uid_t uid, bool mute) {
559 (void)uid;
560 (void)mute;
561 }
562
593 virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute) {
594 (void)videoStreamType;
595 (void)uid;
596 (void)mute;
597 }
598
614 (void)uid;
615 (void)max_profile;
616 }
617
630 virtual void onUserSubStreamVideoStop(uid_t uid) {
631 (void)uid;
632 }
633
648 (void)status;
649 }
650
668
680 virtual void onFirstAudioDataReceived(uid_t uid) {
681 (void)uid;
682 }
683
698 virtual void onFirstVideoDataReceived(uid_t uid) {
699 (void)uid;
700 }
701
728 (void)uid;
729 (void)type;
730 }
731
770 virtual void onRemoteVideoReceiveSizeChanged(uid_t uid, NERtcVideoStreamType type, uint32_t width, uint32_t height) {
771 (void)uid;
772 (void)type;
773 (void)width;
774 (void)height;
775 }
776
810 virtual void onLocalVideoRenderSizeChanged(NERtcVideoStreamType type, uint32_t width, uint32_t height) {
811 (void)type;
812 (void)width;
813 (void)height;
814 }
815
827 virtual void onFirstAudioFrameDecoded(uid_t uid) {
828 (void)uid;
829 }
830
849 virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
850 (void)uid;
851 (void)width;
852 (void)height;
853 }
854
890 virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height) {
891 (void)uid;
892 (void)width;
893 (void)height;
894 (void)type;
895 }
896
937 virtual void onFirstVideoFrameRender(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height, uint64_t elapsed) {
938 (void)type;
939 (void)uid;
940 (void)width;
941 (void)height;
942 (void)elapsed;
943 }
944
964 virtual void onLocalAudioVolumeIndication(int volume) { (void)volume; }
965
986 virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad) {
987 (void)volume;
988 (void)enable_vad;
989 }
990
1016 virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo* speakers, unsigned int speaker_number,
1017 int total_volume) {
1018 (void)speakers;
1019 (void)speaker_number;
1020 (void)total_volume;
1021 }
1022
1044 virtual void onAddLiveStreamTask(const char* task_id, const char* url, int error_code) {
1045 (void)task_id;
1046 (void)url;
1047 (void)error_code;
1048 }
1049
1071 virtual void onUpdateLiveStreamTask(const char* task_id, const char* url, int error_code) {
1072 (void)task_id;
1073 (void)url;
1074 (void)error_code;
1075 }
1076
1096 virtual void onRemoveLiveStreamTask(const char* task_id, int error_code) {
1097 (void)task_id;
1098 (void)error_code;
1099 }
1100
1124 virtual void onLiveStreamState(const char* task_id, const char* url, NERtcLiveStreamStateCode state) {
1125 (void)task_id;
1126 (void)url;
1127 (void)state;
1128 }
1129
1147 virtual void onRecvSEIMsg(uid_t uid, const char* data, uint32_t dataSize) {
1148 (void)uid;
1149 (void)data;
1150 (void)dataSize;
1151 }
1152
1167 virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char* channel_name) {
1168 (void)state;
1169 (void)channel_name;
1170 }
1171
1188 virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char* channel_name, NERtcErrorCode error) {
1189 (void)event;
1190 (void)channel_name;
1191 (void)error;
1192 }
1193
1215 virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type) {
1216 (void)is_fallback;
1217 }
1218
1242 virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type) {
1243 (void)uid;
1244 (void)is_fallback;
1245 }
1246
1269 virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned) {
1270 (void)is_audio_banned;
1271 (void)is_video_banned;
1272 }
1273
1286
1319 virtual void onUpdatePermissionKey(const char* key, NERtcErrorCode error, int timeout) {
1320 (void)key;
1321 (void)error;
1322 (void)timeout;
1323 }
1324
1333 virtual void onLabFeatureCallback(const char* key, const char* param) {
1334 (void)key;
1335 (void)param;
1336 }
1337};
1338} // namespace nertc
1339
1340#endif
定义 nertc_channel_event_handler.h:34
virtual void onUserAudioStop(uid_t uid)
定义 nertc_channel_event_handler.h:437
virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height)
定义 nertc_channel_event_handler.h:890
virtual void onAddLiveStreamTask(const char *task_id, const char *url, int error_code)
定义 nertc_channel_event_handler.h:1044
virtual void onFirstVideoFrameRender(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height, uint64_t elapsed)
定义 nertc_channel_event_handler.h:937
virtual void onWarning(int warn_code, const char *msg)
定义 nertc_channel_event_handler.h:73
virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
定义 nertc_channel_event_handler.h:613
virtual void onScreenCaptureSourceDataUpdate(NERtcScreenCaptureSourceData data)
定义 nertc_channel_event_handler.h:667
virtual void onLiveStreamState(const char *task_id, const char *url, NERtcLiveStreamStateCode state)
定义 nertc_channel_event_handler.h:1124
virtual void onUserAudioStart(uid_t uid)
定义 nertc_channel_event_handler.h:422
virtual void onUserJoined(uid_t uid, const char *user_name)
定义 nertc_channel_event_handler.h:279
virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char *channel_name, NERtcErrorCode error)
定义 nertc_channel_event_handler.h:1188
virtual void onLocalVideoRenderSizeChanged(NERtcVideoStreamType type, uint32_t width, uint32_t height)
定义 nertc_channel_event_handler.h:810
virtual void onUserSubStreamVideoStop(uid_t uid)
定义 nertc_channel_event_handler.h:630
virtual void onRemoteVideoReceiveSizeChanged(uid_t uid, NERtcVideoStreamType type, uint32_t width, uint32_t height)
定义 nertc_channel_event_handler.h:770
virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned)
定义 nertc_channel_event_handler.h:1269
virtual void onLeaveChannel(NERtcErrorCode result)
定义 nertc_channel_event_handler.h:203
virtual void onScreenCaptureStatus(NERtcScreenCaptureStatus status)
定义 nertc_channel_event_handler.h:647
virtual void onUserJoined(uid_t uid, const char *user_name, NERtcUserJoinExtraInfo join_extra_info)
定义 nertc_channel_event_handler.h:323
virtual void onUpdateLiveStreamTask(const char *task_id, const char *url, int error_code)
定义 nertc_channel_event_handler.h:1071
virtual void onPermissionKeyWillExpire()
定义 nertc_channel_event_handler.h:1285
virtual void onRecvSEIMsg(uid_t uid, const char *data, uint32_t dataSize)
定义 nertc_channel_event_handler.h:1147
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
定义 nertc_channel_event_handler.h:1016
virtual void onUserSubStreamAudioStart(uid_t uid)
定义 nertc_channel_event_handler.h:471
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
定义 nertc_channel_event_handler.h:160
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info)
定义 nertc_channel_event_handler.h:404
virtual void onLabFeatureCallback(const char *key, const char *param)
定义 nertc_channel_event_handler.h:1333
virtual void onUserSubStreamAudioMute(uid_t uid, bool mute)
定义 nertc_channel_event_handler.h:504
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
定义 nertc_channel_event_handler.h:522
virtual void onFirstVideoDataReceived(NERtcVideoStreamType type, uid_t uid)
定义 nertc_channel_event_handler.h:727
virtual void onUserVideoStop(uid_t uid)
定义 nertc_channel_event_handler.h:538
virtual void onFirstVideoDataReceived(uid_t uid)
定义 nertc_channel_event_handler.h:698
virtual void onRemoveLiveStreamTask(const char *task_id, int error_code)
定义 nertc_channel_event_handler.h:1096
virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type)
定义 nertc_channel_event_handler.h:1215
virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute)
定义 nertc_channel_event_handler.h:593
virtual void onFirstAudioFrameDecoded(uid_t uid)
定义 nertc_channel_event_handler.h:827
virtual void onError(int error_code, const char *msg)
定义 nertc_channel_event_handler.h:53
virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type)
定义 nertc_channel_event_handler.h:1242
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
定义 nertc_channel_event_handler.h:249
virtual void onUserSubStreamAudioStop(uid_t uid)
定义 nertc_channel_event_handler.h:484
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
定义 nertc_channel_event_handler.h:849
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
定义 nertc_channel_event_handler.h:139
virtual void onLocalAudioVolumeIndication(int volume)
定义 nertc_channel_event_handler.h:964
virtual void onApiCallExecuted(const char *api_name, NERtcErrorCode error, const char *message)
定义 nertc_channel_event_handler.h:94
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
定义 nertc_channel_event_handler.h:184
virtual void onDisconnect(NERtcErrorCode reason)
定义 nertc_channel_event_handler.h:224
virtual void onUserVideoMute(uid_t uid, bool mute)
定义 nertc_channel_event_handler.h:558
virtual void onFirstAudioDataReceived(uid_t uid)
定义 nertc_channel_event_handler.h:680
virtual void onUpdatePermissionKey(const char *key, NERtcErrorCode error, int timeout)
定义 nertc_channel_event_handler.h:1319
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
定义 nertc_channel_event_handler.h:353
virtual void onUserAudioMute(uid_t uid, bool mute)
定义 nertc_channel_event_handler.h:454
virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad)
定义 nertc_channel_event_handler.h:986
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
定义 nertc_channel_event_handler.h:117
virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char *channel_name)
定义 nertc_channel_event_handler.h:1167
namespace nertc
NERtcClientRole
定义 nertc_engine_defines.h:244
NERtcChannelMediaRelayState
定义 nertc_engine_defines.h:6066
NERtcReasonConnectionChangedType
定义 nertc_engine_defines.h:2369
NERtcVideoStreamType
定义 nertc_engine_defines.h:5959
NERtcSessionLeaveReason
定义 nertc_engine_defines.h:5624
NERtcConnectionStateType
定义 nertc_engine_defines.h:2302
uint64_t uid_t
定义 nertc_engine_defines.h:183
NERtcVideoProfileType
定义 nertc_engine_defines.h:1705
uint64_t channel_id_t
定义 nertc_engine_defines.h:192
NERtcScreenCaptureStatus
定义 nertc_engine_defines.h:4092
NERtcLiveStreamStateCode
定义 nertc_engine_defines.h:1123
NERtcErrorCode
定义 nertc_error_code.h:26
NERtcChannelMediaRelayEvent
定义 nertc_engine_defines.h:6113
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.
定义 nertc_engine_defines.h:2593
定义 nertc_engine_defines.h:4270
定义 nertc_engine_defines.h:8004