NERtc Windows SDK V5.6.30
载入中...
搜索中...
未找到
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 }
629 virtual void onUserSubStreamVideoStop(uid_t uid) {
630 (void)uid;
631 }
632
647 (void)status;
648 }
649
667
679 virtual void onFirstAudioDataReceived(uid_t uid) {
680 (void)uid;
681 }
682
697 virtual void onFirstVideoDataReceived(uid_t uid) {
698 (void)uid;
699 }
700
727 (void)uid;
728 (void)type;
729 }
730
769 virtual void onRemoteVideoReceiveSizeChanged(uid_t uid, NERtcVideoStreamType type, uint32_t width, uint32_t height) {
770 (void)uid;
771 (void)type;
772 (void)width;
773 (void)height;
774 }
775
809 virtual void onLocalVideoRenderSizeChanged(NERtcVideoStreamType type, uint32_t width, uint32_t height) {
810 (void)type;
811 (void)width;
812 (void)height;
813 }
814
826 virtual void onFirstAudioFrameDecoded(uid_t uid) {
827 (void)uid;
828 }
829
848 virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
849 (void)uid;
850 (void)width;
851 (void)height;
852 }
853
889 virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height) {
890 (void)uid;
891 (void)width;
892 (void)height;
893 (void)type;
894 }
895
936 virtual void onFirstVideoFrameRender(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height, uint64_t elapsed) {
937 (void)type;
938 (void)uid;
939 (void)width;
940 (void)height;
941 (void)elapsed;
942 }
943
963 virtual void onLocalAudioVolumeIndication(int volume) { (void)volume; }
964
985 virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad) {
986 (void)volume;
987 (void)enable_vad;
988 }
989
1015 virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo* speakers, unsigned int speaker_number,
1016 int total_volume) {
1017 (void)speakers;
1018 (void)speaker_number;
1019 (void)total_volume;
1020 }
1021
1043 virtual void onAddLiveStreamTask(const char* task_id, const char* url, int error_code) {
1044 (void)task_id;
1045 (void)url;
1046 (void)error_code;
1047 }
1048
1070 virtual void onUpdateLiveStreamTask(const char* task_id, const char* url, int error_code) {
1071 (void)task_id;
1072 (void)url;
1073 (void)error_code;
1074 }
1075
1095 virtual void onRemoveLiveStreamTask(const char* task_id, int error_code) {
1096 (void)task_id;
1097 (void)error_code;
1098 }
1099
1123 virtual void onLiveStreamState(const char* task_id, const char* url, NERtcLiveStreamStateCode state) {
1124 (void)task_id;
1125 (void)url;
1126 (void)state;
1127 }
1128
1146 virtual void onRecvSEIMsg(uid_t uid, const char* data, uint32_t dataSize) {
1147 (void)uid;
1148 (void)data;
1149 (void)dataSize;
1150 }
1151
1166 virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char* channel_name) {
1167 (void)state;
1168 (void)channel_name;
1169 }
1170
1187 virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char* channel_name, NERtcErrorCode error) {
1188 (void)event;
1189 (void)channel_name;
1190 (void)error;
1191 }
1192
1214 virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type) {
1215 (void)is_fallback;
1216 }
1217
1241 virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type) {
1242 (void)uid;
1243 (void)is_fallback;
1244 }
1245
1268 virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned) {
1269 (void)is_audio_banned;
1270 (void)is_video_banned;
1271 }
1272
1285
1318 virtual void onUpdatePermissionKey(const char* key, NERtcErrorCode error, int timeout) {
1319 (void)key;
1320 (void)error;
1321 (void)timeout;
1322 }
1323
1332 virtual void onLabFeatureCallback(const char* key, const char* param) {
1333 (void)key;
1334 (void)param;
1335 }
1336};
1337} // namespace nertc
1338
1339#endif
Definition nertc_channel_event_handler.h:34
virtual void onUserAudioStop(uid_t uid)
Definition nertc_channel_event_handler.h:437
virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height)
Definition nertc_channel_event_handler.h:889
virtual void onAddLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition nertc_channel_event_handler.h:1043
virtual void onFirstVideoFrameRender(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height, uint64_t elapsed)
Definition nertc_channel_event_handler.h:936
virtual void onWarning(int warn_code, const char *msg)
Definition nertc_channel_event_handler.h:73
virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition nertc_channel_event_handler.h:613
virtual void onScreenCaptureSourceDataUpdate(NERtcScreenCaptureSourceData data)
Definition nertc_channel_event_handler.h:666
virtual void onLiveStreamState(const char *task_id, const char *url, NERtcLiveStreamStateCode state)
Definition nertc_channel_event_handler.h:1123
virtual void onUserAudioStart(uid_t uid)
Definition nertc_channel_event_handler.h:422
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition nertc_channel_event_handler.h:279
virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char *channel_name, NERtcErrorCode error)
Definition nertc_channel_event_handler.h:1187
virtual void onLocalVideoRenderSizeChanged(NERtcVideoStreamType type, uint32_t width, uint32_t height)
Definition nertc_channel_event_handler.h:809
virtual void onUserSubStreamVideoStop(uid_t uid)
Definition nertc_channel_event_handler.h:629
virtual void onRemoteVideoReceiveSizeChanged(uid_t uid, NERtcVideoStreamType type, uint32_t width, uint32_t height)
Definition nertc_channel_event_handler.h:769
virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned)
Definition nertc_channel_event_handler.h:1268
virtual void onLeaveChannel(NERtcErrorCode result)
Definition nertc_channel_event_handler.h:203
virtual void onScreenCaptureStatus(NERtcScreenCaptureStatus status)
Definition nertc_channel_event_handler.h:646
virtual void onUserJoined(uid_t uid, const char *user_name, NERtcUserJoinExtraInfo join_extra_info)
Definition nertc_channel_event_handler.h:323
virtual void onUpdateLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition nertc_channel_event_handler.h:1070
virtual void onPermissionKeyWillExpire()
Definition nertc_channel_event_handler.h:1284
virtual void onRecvSEIMsg(uid_t uid, const char *data, uint32_t dataSize)
Definition nertc_channel_event_handler.h:1146
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
Definition nertc_channel_event_handler.h:1015
virtual void onUserSubStreamAudioStart(uid_t uid)
Definition nertc_channel_event_handler.h:471
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition nertc_channel_event_handler.h:160
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info)
Definition nertc_channel_event_handler.h:404
virtual void onLabFeatureCallback(const char *key, const char *param)
Definition nertc_channel_event_handler.h:1332
virtual void onUserSubStreamAudioMute(uid_t uid, bool mute)
Definition nertc_channel_event_handler.h:504
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition nertc_channel_event_handler.h:522
virtual void onFirstVideoDataReceived(NERtcVideoStreamType type, uid_t uid)
Definition nertc_channel_event_handler.h:726
virtual void onUserVideoStop(uid_t uid)
Definition nertc_channel_event_handler.h:538
virtual void onFirstVideoDataReceived(uid_t uid)
Definition nertc_channel_event_handler.h:697
virtual void onRemoveLiveStreamTask(const char *task_id, int error_code)
Definition nertc_channel_event_handler.h:1095
virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type)
Definition nertc_channel_event_handler.h:1214
virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute)
Definition nertc_channel_event_handler.h:593
virtual void onFirstAudioFrameDecoded(uid_t uid)
Definition nertc_channel_event_handler.h:826
virtual void onError(int error_code, const char *msg)
Definition nertc_channel_event_handler.h:53
virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type)
Definition nertc_channel_event_handler.h:1241
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition nertc_channel_event_handler.h:249
virtual void onUserSubStreamAudioStop(uid_t uid)
Definition nertc_channel_event_handler.h:484
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
Definition nertc_channel_event_handler.h:848
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition nertc_channel_event_handler.h:139
virtual void onLocalAudioVolumeIndication(int volume)
Definition nertc_channel_event_handler.h:963
virtual void onApiCallExecuted(const char *api_name, NERtcErrorCode error, const char *message)
Definition nertc_channel_event_handler.h:94
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition nertc_channel_event_handler.h:184
virtual void onDisconnect(NERtcErrorCode reason)
Definition nertc_channel_event_handler.h:224
virtual void onUserVideoMute(uid_t uid, bool mute)
Definition nertc_channel_event_handler.h:558
virtual void onFirstAudioDataReceived(uid_t uid)
Definition nertc_channel_event_handler.h:679
virtual void onUpdatePermissionKey(const char *key, NERtcErrorCode error, int timeout)
Definition nertc_channel_event_handler.h:1318
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition nertc_channel_event_handler.h:353
virtual void onUserAudioMute(uid_t uid, bool mute)
Definition nertc_channel_event_handler.h:454
virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad)
Definition nertc_channel_event_handler.h:985
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition nertc_channel_event_handler.h:117
virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char *channel_name)
Definition nertc_channel_event_handler.h:1166
namespace nertc
NERtcClientRole
Definition nertc_engine_defines.h:244
NERtcChannelMediaRelayState
Definition nertc_engine_defines.h:5927
NERtcReasonConnectionChangedType
Definition nertc_engine_defines.h:2369
NERtcVideoStreamType
Definition nertc_engine_defines.h:5838
NERtcSessionLeaveReason
Definition nertc_engine_defines.h:5503
NERtcConnectionStateType
Definition nertc_engine_defines.h:2302
uint64_t uid_t
Definition nertc_engine_defines.h:183
NERtcVideoProfileType
Definition nertc_engine_defines.h:1705
uint64_t channel_id_t
Definition nertc_engine_defines.h:192
NERtcScreenCaptureStatus
Definition nertc_engine_defines.h:3989
NERtcLiveStreamStateCode
Definition nertc_engine_defines.h:1123
NERtcErrorCode
Definition nertc_error_code.h:26
NERtcChannelMediaRelayEvent
Definition nertc_engine_defines.h:5974
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.
Definition nertc_engine_defines.h:2498
Definition nertc_engine_defines.h:4167
Definition nertc_engine_defines.h:7860