NERtc Windows SDK  V4.6.53
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"
14 #include "nertc_engine_defines.h"
15 
20 namespace nertc
21 {
34 {
35 public:
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 
95  virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
96  (void)cid;
97  (void)uid;
98  (void)result;
99  (void)elapsed;
100  }
101 
117  virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
118  (void)cid;
119  (void)uid;
120  }
121 
139  (void)state;
140  (void)reason;
141  }
142 
162  virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
163  (void)cid;
164  (void)uid;
165  (void)result;
166  }
167 
181  virtual void onLeaveChannel(NERtcErrorCode result) {
182  (void)result;
183  }
184 
202  virtual void onDisconnect(NERtcErrorCode reason) {
203  (void)reason;
204  }
205 
227  virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
228  (void)oldRole;
229  (void)newRole;
230  }
231 
257  virtual void onUserJoined(uid_t uid, const char * user_name) {
258  (void)uid;
259  (void)user_name;
260  }
261 
301  virtual void onUserJoined(uid_t uid, const char* user_name, NERtcUserJoinExtraInfo join_extra_info) {
302  (void)uid;
303  (void)user_name;
304  (void)join_extra_info;
305  }
306 
331  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
332  (void)uid;
333  (void)reason;
334  }
335 
382  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info) {
383  (void)uid;
384  (void)reason;
385  (void)leave_extra_info;
386  }
387 
400  virtual void onUserAudioStart(uid_t uid) {
401  (void)uid;
402  }
415  virtual void onUserAudioStop(uid_t uid) {
416  (void)uid;
417  }
432  virtual void onUserAudioMute(uid_t uid, bool mute) {
433  (void)uid;
434  (void)mute;
435  }
436 
449  virtual void onUserSubStreamAudioStart(uid_t uid) { (void)uid; }
462  virtual void onUserSubStreamAudioStop(uid_t uid) { (void)uid; }
463 
482  virtual void onUserSubStreamAudioMute(uid_t uid, bool mute) {
483  (void)uid;
484  (void)mute;
485  }
500  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
501  (void)uid;
502  (void)max_profile;
503  }
516  virtual void onUserVideoStop(uid_t uid) {
517  (void)uid;
518  }
536  virtual void onUserVideoMute(uid_t uid, bool mute) {
537  (void)uid;
538  (void)mute;
539  }
540 
571  virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute) {
572  (void)videoStreamType;
573  (void)uid;
574  (void)mute;
575  }
576 
591  virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
592  (void)uid;
593  (void)max_profile;
594  }
607  virtual void onUserSubStreamVideoStop(uid_t uid) {
608  (void)uid;
609  }
610 
625  (void)status;
626  }
627 
639  virtual void onFirstAudioDataReceived(uid_t uid) {
640  (void)uid;
641  }
642 
657  virtual void onFirstVideoDataReceived(uid_t uid) {
658  (void)uid;
659  }
660 
687  (void)uid;
688  (void)type;
689  }
690 
702  virtual void onFirstAudioFrameDecoded(uid_t uid) {
703  (void)uid;
704  }
705 
724  virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
725  (void)uid;
726  (void)width;
727  (void)height;
728  }
729 
765  virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height) {
766  (void)uid;
767  (void)width;
768  (void)height;
769  (void)type;
770  }
790  virtual void onLocalAudioVolumeIndication(int volume) { (void)volume; }
791 
812  virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad) {
813  (void)volume;
814  (void)enable_vad;
815  }
816 
842  virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo* speakers, unsigned int speaker_number,
843  int total_volume) {
844  (void)speakers;
845  (void)speaker_number;
846  (void)total_volume;
847  }
848 
870  virtual void onAddLiveStreamTask(const char* task_id, const char* url, int error_code) {
871  (void)task_id;
872  (void)url;
873  (void)error_code;
874  }
875 
897  virtual void onUpdateLiveStreamTask(const char* task_id, const char* url, int error_code) {
898  (void)task_id;
899  (void)url;
900  (void)error_code;
901  }
902 
922  virtual void onRemoveLiveStreamTask(const char* task_id, int error_code) {
923  (void)task_id;
924  (void)error_code;
925  }
926 
950  virtual void onLiveStreamState(const char* task_id, const char* url, NERtcLiveStreamStateCode state) {
951  (void)task_id;
952  (void)url;
953  (void)state;
954  }
955 
973  virtual void onRecvSEIMsg(uid_t uid, const char* data, uint32_t dataSize) {
974  (void)uid;
975  (void)data;
976  (void)dataSize;
977  }
978 
993  virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char* channel_name) {
994  (void)state;
995  (void)channel_name;
996  }
997 
1014  virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char* channel_name, NERtcErrorCode error) {
1015  (void)event;
1016  (void)channel_name;
1017  (void)error;
1018  }
1019 
1041  virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type) {
1042  (void)is_fallback;
1043  }
1044 
1068  virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type) {
1069  (void)uid;
1070  (void)is_fallback;
1071  }
1072 
1095  virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned) {
1096  (void)is_audio_banned;
1097  (void)is_video_banned;
1098  }
1099 
1111  virtual void onPermissionKeyWillExpire() {}
1112 
1145  virtual void onUpdatePermissionKey(const char* key, NERtcErrorCode error, int timeout) {
1146  (void)key;
1147  (void)error;
1148  (void)timeout;
1149  }
1150 };
1151 } // namespace nertc
1152 
1153 #endif
Definition: nertc_channel_event_handler.h:34
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_channel_event_handler.h:415
virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height)
Definition: nertc_channel_event_handler.h:765
virtual void onAddLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_channel_event_handler.h:870
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:591
virtual void onLiveStreamState(const char *task_id, const char *url, NERtcLiveStreamStateCode state)
Definition: nertc_channel_event_handler.h:950
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_channel_event_handler.h:400
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition: nertc_channel_event_handler.h:257
virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char *channel_name, NERtcErrorCode error)
Definition: nertc_channel_event_handler.h:1014
virtual void onUserSubStreamVideoStop(uid_t uid)
Definition: nertc_channel_event_handler.h:607
virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned)
Definition: nertc_channel_event_handler.h:1095
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_channel_event_handler.h:181
virtual void onScreenCaptureStatus(NERtcScreenCaptureStatus status)
Definition: nertc_channel_event_handler.h:624
virtual void onUserJoined(uid_t uid, const char *user_name, NERtcUserJoinExtraInfo join_extra_info)
Definition: nertc_channel_event_handler.h:301
virtual void onUpdateLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_channel_event_handler.h:897
virtual void onPermissionKeyWillExpire()
Definition: nertc_channel_event_handler.h:1111
virtual void onRecvSEIMsg(uid_t uid, const char *data, uint32_t dataSize)
Definition: nertc_channel_event_handler.h:973
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
Definition: nertc_channel_event_handler.h:842
virtual void onUserSubStreamAudioStart(uid_t uid)
Definition: nertc_channel_event_handler.h:449
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_channel_event_handler.h:138
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info)
Definition: nertc_channel_event_handler.h:382
virtual void onUserSubStreamAudioMute(uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:482
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_channel_event_handler.h:500
virtual void onFirstVideoDataReceived(NERtcVideoStreamType type, uid_t uid)
Definition: nertc_channel_event_handler.h:686
virtual void onUserVideoStop(uid_t uid)
Definition: nertc_channel_event_handler.h:516
virtual void onFirstVideoDataReceived(uid_t uid)
Definition: nertc_channel_event_handler.h:657
virtual void onRemoveLiveStreamTask(const char *task_id, int error_code)
Definition: nertc_channel_event_handler.h:922
virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type)
Definition: nertc_channel_event_handler.h:1041
virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:571
virtual void onFirstAudioFrameDecoded(uid_t uid)
Definition: nertc_channel_event_handler.h:702
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:1068
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition: nertc_channel_event_handler.h:227
virtual void onUserSubStreamAudioStop(uid_t uid)
Definition: nertc_channel_event_handler.h:462
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
Definition: nertc_channel_event_handler.h:724
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition: nertc_channel_event_handler.h:117
virtual void onLocalAudioVolumeIndication(int volume)
Definition: nertc_channel_event_handler.h:790
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_channel_event_handler.h:162
virtual void onDisconnect(NERtcErrorCode reason)
Definition: nertc_channel_event_handler.h:202
virtual void onUserVideoMute(uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:536
virtual void onFirstAudioDataReceived(uid_t uid)
Definition: nertc_channel_event_handler.h:639
virtual void onUpdatePermissionKey(const char *key, NERtcErrorCode error, int timeout)
Definition: nertc_channel_event_handler.h:1145
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_channel_event_handler.h:331
virtual void onUserAudioMute(uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:432
virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad)
Definition: nertc_channel_event_handler.h:812
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_channel_event_handler.h:95
virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char *channel_name)
Definition: nertc_channel_event_handler.h:993
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:244
NERtcChannelMediaRelayState
Definition: nertc_engine_defines.h:5720
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:2272
NERtcVideoStreamType
Definition: nertc_engine_defines.h:5456
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:5121
NERtcConnectionStateType
Definition: nertc_engine_defines.h:2205
uint64_t uid_t
Definition: nertc_engine_defines.h:183
NERtcVideoProfileType
Definition: nertc_engine_defines.h:1631
uint64_t channel_id_t
Definition: nertc_engine_defines.h:192
NERtcScreenCaptureStatus
Definition: nertc_engine_defines.h:3864
NERtcLiveStreamStateCode
Definition: nertc_engine_defines.h:1049
NERtcErrorCode
Definition: nertc_error_code.h:26
NERtcChannelMediaRelayEvent
Definition: nertc_engine_defines.h:5767
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.
Definition: nertc_engine_defines.h:2401
Definition: nertc_engine_defines.h:7729