NERecord Linux SDK 5.5.3103
Loading...
Searching...
No Matches
nerecord_engine_event_handler.h
Go to the documentation of this file.
1
9#ifndef NERECORD_ENGINE_EVENT_HANDLER_H
10#define NERECORD_ENGINE_EVENT_HANDLER_H
11
12#include "nerecord_base_types.h"
13#include "nerecord_error_code.h"
14#include "nerecord_warn_code.h"
16
21namespace nerecord
22{
28{
29public:
31
39 virtual void onError(int error_code, const char* msg) {
40 (void)error_code;
41 (void)msg;
42 }
43
51 virtual void onWarning(int warn_code, const char* msg) {
52 (void)warn_code;
53 (void)msg;
54 }
55
57 virtual void onConnectInterrupted(){
58 }
59
67 virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
68 (void)cid;
69 (void)uid;
70 (void)result;
71 (void)elapsed;
72 }
73
83 virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
84 (void)cid;
85 (void)uid;
86 (void)result;
87 }
88
95 virtual void onLeaveChannel(NERtcErrorCode result) {
96 (void)result;
97 }
98
105 virtual void onDisconnect(NERtcErrorCode reason) {
106 (void)reason;
107 }
108
116 virtual void onUserJoined(uid_t uid, const char * user_name) {
117 (void)uid;
118 (void)user_name;
119 }
120
128 virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
129 (void)uid;
130 (void)reason;
131 }
136 virtual void onUserAudioStart(uid_t uid) {
137 (void)uid;
138 }
143 virtual void onUserAudioStop(uid_t uid) {
144 (void)uid;
145 }
146
152 virtual void audioFrameReceived(uid_t uid, const NERtcAudioFrame *frame) {
153 (void)uid;
154 (void)frame;
155 }
156
161 virtual void audioFrameMixed(const NERtcAudioFrame *frame) {
162 (void)frame;
163 }
164
170 virtual void onUserAudioMute(uid_t uid, bool mute) {
171 (void)uid;
172 (void)mute;
173 }
179 virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
180 (void)uid;
181 (void)max_profile;
182 }
187 virtual void onUserVideoStop(uid_t uid) {
188 (void)uid;
189 }
190
196 virtual void videoFrameReceived(uid_t uid, const NERtcVideoFrame *frame) {
197 (void)uid;
198 (void)frame;
199 }
200
206 virtual void videoSubstreamFrameReceived(uid_t uid, const NERtcVideoFrame *frame) {
207 (void)uid;
208 (void)frame;
209 }
210
216 virtual void onUserVideoMute(uid_t uid, bool mute) {
217 (void)uid;
218 (void)mute;
219 }
220
227 (void)uid;
228 (void)max_profile;
229 }
234 virtual void onUserSubStreamVideoStop(uid_t uid) {
235 (void)uid;
236 }
237
253 virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume) {
254 (void) speakers;
255 (void) speaker_number;
256 (void) total_volume;
257 }
258
267 virtual void onActiveSpeaker(uid_t uid) {
268 (void) uid;
269 }
270
275 virtual void onFirstAudioDataReceived(uid_t uid) {
276 (void)uid;
277 }
278
285 virtual void onFirstVideoDataReceived(uid_t uid) {
286 (void)uid;
287 }
288
293 virtual void onFirstAudioFrameDecoded(uid_t uid) {
294 (void)uid;
295 }
296
306 virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
307 (void)uid;
308 (void)width;
309 (void)height;
310 }
311
312 virtual void onFirstVideoFrameDecoded(NERtcVideoStreamType type, uid_t uid, uint32_t width, uint32_t height) {
313 (int)type;
314 (void)uid;
315 (void)width;
316 (void)height;
317 }
318
327 virtual void onRecordStats(const NERtcStats *stats) {
328 (void)stats;
329 }
330
337 virtual void onLocalAudioStats(const NERtcAudioSendStats *stats) {
338 (void)stats;
339 }
340
348 virtual void onRemoteAudioStats(const NERtcAudioRecvStats *stats, unsigned int user_count) {
349 (void)stats;
350 (void)user_count;
351 }
352
359 virtual void onLocalVideoStats(const NERtcVideoSendStats *stats) {
360 (void)stats;
361 }
362
370 virtual void onRemoteVideoStats(const NERtcVideoRecvStats *stats, unsigned int user_count) {
371 (void)stats;
372 (void)user_count;
373 }
374
382 virtual void onConnectionStateChanged(NERtcConnectionStateType connection_state, NERtcErrorCode reason) {
383 (void) connection_state;
384 (void) reason;
385 }
386
394 virtual void onMixingLayoutChanged(uint32_t regionCount, const NERtcRegion *regions) {
395 (void) regionCount;
396 (void) regions;
397 }
398};
399} //namespace nerecord
400
401#endif
Definition nerecord_engine_event_handler.h:28
virtual void onRecordStats(const NERtcStats *stats)
Definition nerecord_engine_event_handler.h:327
virtual void onUserVideoStop(uid_t uid)
Definition nerecord_engine_event_handler.h:187
virtual void onFirstAudioFrameDecoded(uid_t uid)
Definition nerecord_engine_event_handler.h:293
virtual void videoSubstreamFrameReceived(uid_t uid, const NERtcVideoFrame *frame)
Definition nerecord_engine_event_handler.h:206
virtual void onUserAudioStart(uid_t uid)
Definition nerecord_engine_event_handler.h:136
virtual void onConnectionStateChanged(NERtcConnectionStateType connection_state, NERtcErrorCode reason)
Definition nerecord_engine_event_handler.h:382
virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition nerecord_engine_event_handler.h:226
virtual void onConnectInterrupted()
Definition nerecord_engine_event_handler.h:57
virtual void onActiveSpeaker(uid_t uid)
Definition nerecord_engine_event_handler.h:267
virtual void onRemoteVideoStats(const NERtcVideoRecvStats *stats, unsigned int user_count)
Definition nerecord_engine_event_handler.h:370
virtual void onUserSubStreamVideoStop(uid_t uid)
Definition nerecord_engine_event_handler.h:234
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition nerecord_engine_event_handler.h:83
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition nerecord_engine_event_handler.h:179
virtual void onFirstAudioDataReceived(uid_t uid)
Definition nerecord_engine_event_handler.h:275
virtual void onUserVideoMute(uid_t uid, bool mute)
Definition nerecord_engine_event_handler.h:216
virtual void onRemoteAudioStats(const NERtcAudioRecvStats *stats, unsigned int user_count)
Definition nerecord_engine_event_handler.h:348
virtual void audioFrameMixed(const NERtcAudioFrame *frame)
Definition nerecord_engine_event_handler.h:161
virtual void onUserAudioStop(uid_t uid)
Definition nerecord_engine_event_handler.h:143
virtual void onError(int error_code, const char *msg)
Definition nerecord_engine_event_handler.h:39
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
Definition nerecord_engine_event_handler.h:253
virtual void onUserAudioMute(uid_t uid, bool mute)
Definition nerecord_engine_event_handler.h:170
virtual void onLocalVideoStats(const NERtcVideoSendStats *stats)
Definition nerecord_engine_event_handler.h:359
virtual void videoFrameReceived(uid_t uid, const NERtcVideoFrame *frame)
Definition nerecord_engine_event_handler.h:196
virtual void audioFrameReceived(uid_t uid, const NERtcAudioFrame *frame)
Definition nerecord_engine_event_handler.h:152
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition nerecord_engine_event_handler.h:116
virtual void onFirstVideoDataReceived(uid_t uid)
Definition nerecord_engine_event_handler.h:285
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition nerecord_engine_event_handler.h:67
virtual void onMixingLayoutChanged(uint32_t regionCount, const NERtcRegion *regions)
Definition nerecord_engine_event_handler.h:394
virtual void onLocalAudioStats(const NERtcAudioSendStats *stats)
Definition nerecord_engine_event_handler.h:337
virtual void onWarning(int warn_code, const char *msg)
Definition nerecord_engine_event_handler.h:51
virtual void onDisconnect(NERtcErrorCode reason)
Definition nerecord_engine_event_handler.h:105
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition nerecord_engine_event_handler.h:128
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
Definition nerecord_engine_event_handler.h:306
virtual void onLeaveChannel(NERtcErrorCode result)
Definition nerecord_engine_event_handler.h:95
namespace nerecord
uint64_t channel_id_t
Definition nerecord_engine_defines.h:34
uint64_t uid_t
Definition nerecord_engine_defines.h:33
NERtcErrorCode
Definition nerecord_error_code.h:22
NERtcConnectionStateType
Definition nerecord_engine_defines.h:48
NERtcVideoStreamType
Definition nerecord_engine_defines.h:83
NERtcVideoProfileType
Definition nerecord_engine_defines.h:65
NERtcSessionLeaveReason
Definition nerecord_engine_defines.h:38
SDK 基本类型定义
NERecord SDK 的一些定义
NERECORD SDK 的错误码定义
NERECORD SDK 的警告码定义
Definition nerecord_engine_defines.h:140
Definition nerecord_engine_defines.h:471
Definition nerecord_engine_defines.h:451
Definition nerecord_engine_defines.h:58
Definition nerecord_engine_defines.h:207
Definition nerecord_engine_defines.h:346
Definition nerecord_engine_defines.h:168
Definition nerecord_engine_defines.h:425
Definition nerecord_engine_defines.h:401