NERtc Windows SDK  V4.6.20
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 
286  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
287  (void)uid;
288  (void)reason;
289  }
302  virtual void onUserAudioStart(uid_t uid) {
303  (void)uid;
304  }
317  virtual void onUserAudioStop(uid_t uid) {
318  (void)uid;
319  }
334  virtual void onUserAudioMute(uid_t uid, bool mute) {
335  (void)uid;
336  (void)mute;
337  }
338 
351  virtual void onUserSubStreamAudioStart(uid_t uid) { (void)uid; }
364  virtual void onUserSubStreamAudioStop(uid_t uid) { (void)uid; }
365 
384  virtual void onUserSubStreamAudioMute(uid_t uid, bool mute) {
385  (void)uid;
386  (void)mute;
387  }
402  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
403  (void)uid;
404  (void)max_profile;
405  }
418  virtual void onUserVideoStop(uid_t uid) {
419  (void)uid;
420  }
438  virtual void onUserVideoMute(uid_t uid, bool mute) {
439  (void)uid;
440  (void)mute;
441  }
442 
473  virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute) {
474  (void)videoStreamType;
475  (void)uid;
476  (void)mute;
477  }
478 
493  virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
494  (void)uid;
495  (void)max_profile;
496  }
509  virtual void onUserSubStreamVideoStop(uid_t uid) {
510  (void)uid;
511  }
512 
527  (void)status;
528  }
529 
541  virtual void onFirstAudioDataReceived(uid_t uid) {
542  (void)uid;
543  }
544 
559  virtual void onFirstVideoDataReceived(uid_t uid) {
560  (void)uid;
561  }
562 
589  (void)uid;
590  (void)type;
591  }
592 
604  virtual void onFirstAudioFrameDecoded(uid_t uid) {
605  (void)uid;
606  }
607 
626  virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
627  (void)uid;
628  (void)width;
629  (void)height;
630  }
631 
667  virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height) {
668  (void)uid;
669  (void)width;
670  (void)height;
671  (void)type;
672  }
692  virtual void onLocalAudioVolumeIndication(int volume) { (void)volume; }
693 
714  virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad) {
715  (void)volume;
716  (void)enable_vad;
717  }
718 
744  virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo* speakers, unsigned int speaker_number,
745  int total_volume) {
746  (void)speakers;
747  (void)speaker_number;
748  (void)total_volume;
749  }
750 
772  virtual void onAddLiveStreamTask(const char* task_id, const char* url, int error_code) {
773  (void)task_id;
774  (void)url;
775  (void)error_code;
776  }
777 
799  virtual void onUpdateLiveStreamTask(const char* task_id, const char* url, int error_code) {
800  (void)task_id;
801  (void)url;
802  (void)error_code;
803  }
804 
824  virtual void onRemoveLiveStreamTask(const char* task_id, int error_code) {
825  (void)task_id;
826  (void)error_code;
827  }
828 
852  virtual void onLiveStreamState(const char* task_id, const char* url, NERtcLiveStreamStateCode state) {
853  (void)task_id;
854  (void)url;
855  (void)state;
856  }
857 
875  virtual void onRecvSEIMsg(uid_t uid, const char* data, uint32_t dataSize) {
876  (void)uid;
877  (void)data;
878  (void)dataSize;
879  }
880 
895  virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char* channel_name) {
896  (void)state;
897  (void)channel_name;
898  }
899 
916  virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char* channel_name, NERtcErrorCode error) {
917  (void)event;
918  (void)channel_name;
919  (void)error;
920  }
921 
943  virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type) {
944  (void)is_fallback;
945  }
946 
970  virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type) {
971  (void)uid;
972  (void)is_fallback;
973  }
974 
997  virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned) {
998  (void)is_audio_banned;
999  (void)is_video_banned;
1000  }
1001 };
1002 } // namespace nertc
1003 
1004 #endif
Definition: nertc_channel_event_handler.h:34
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_channel_event_handler.h:317
virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height)
Definition: nertc_channel_event_handler.h:667
virtual void onAddLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_channel_event_handler.h:772
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:493
virtual void onLiveStreamState(const char *task_id, const char *url, NERtcLiveStreamStateCode state)
Definition: nertc_channel_event_handler.h:852
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_channel_event_handler.h:302
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:916
virtual void onUserSubStreamVideoStop(uid_t uid)
Definition: nertc_channel_event_handler.h:509
virtual void onMediaRightChange(bool is_audio_banned, bool is_video_banned)
Definition: nertc_channel_event_handler.h:997
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_channel_event_handler.h:181
virtual void onScreenCaptureStatus(NERtcScreenCaptureStatus status)
Definition: nertc_channel_event_handler.h:526
virtual void onUpdateLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_channel_event_handler.h:799
virtual void onRecvSEIMsg(uid_t uid, const char *data, uint32_t dataSize)
Definition: nertc_channel_event_handler.h:875
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
Definition: nertc_channel_event_handler.h:744
virtual void onUserSubStreamAudioStart(uid_t uid)
Definition: nertc_channel_event_handler.h:351
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_channel_event_handler.h:138
virtual void onUserSubStreamAudioMute(uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:384
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_channel_event_handler.h:402
virtual void onFirstVideoDataReceived(NERtcVideoStreamType type, uid_t uid)
Definition: nertc_channel_event_handler.h:588
virtual void onUserVideoStop(uid_t uid)
Definition: nertc_channel_event_handler.h:418
virtual void onFirstVideoDataReceived(uid_t uid)
Definition: nertc_channel_event_handler.h:559
virtual void onRemoveLiveStreamTask(const char *task_id, int error_code)
Definition: nertc_channel_event_handler.h:824
virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type)
Definition: nertc_channel_event_handler.h:943
virtual void onUserVideoMute(NERtcVideoStreamType videoStreamType, uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:473
virtual void onFirstAudioFrameDecoded(uid_t uid)
Definition: nertc_channel_event_handler.h:604
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:970
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:364
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
Definition: nertc_channel_event_handler.h:626
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:692
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:438
virtual void onFirstAudioDataReceived(uid_t uid)
Definition: nertc_channel_event_handler.h:541
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_channel_event_handler.h:286
virtual void onUserAudioMute(uid_t uid, bool mute)
Definition: nertc_channel_event_handler.h:334
virtual void onLocalAudioVolumeIndication(int volume, bool enable_vad)
Definition: nertc_channel_event_handler.h:714
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:895
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:207
NERtcChannelMediaRelayState
Definition: nertc_engine_defines.h:5366
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:2235
NERtcVideoStreamType
Definition: nertc_engine_defines.h:5102
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:4815
NERtcConnectionStateType
Definition: nertc_engine_defines.h:2168
uint64_t uid_t
Definition: nertc_engine_defines.h:146
NERtcVideoProfileType
Definition: nertc_engine_defines.h:1594
uint64_t channel_id_t
Definition: nertc_engine_defines.h:155
NERtcScreenCaptureStatus
Definition: nertc_engine_defines.h:3827
NERtcLiveStreamStateCode
Definition: nertc_engine_defines.h:1012
NERtcErrorCode
Definition: nertc_error_code.h:26
NERtcChannelMediaRelayEvent
Definition: nertc_engine_defines.h:5413
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.
Definition: nertc_engine_defines.h:2364