NERtc Windows SDK
nertc_engine_event_handler_ex.h
浏览该文件的文档.
1 
7 #ifndef NERTC_ENGINE_EVENT_HANDLER_EX_H
8 #define NERTC_ENGINE_EVENT_HANDLER_EX_H
9 
10 #include "nertc_base_types.h"
11 #include "nertc_engine_defines.h"
13 
18 namespace nertc
19 {
25 {
26 public:
27  virtual ~IRtcEngineEventHandlerEx() {}
28 
34  virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
35  (void)uid;
36  (void)max_profile;
37  }
42  virtual void onUserSubStreamVideoStop(uid_t uid) {
43  (void)uid;
44  }
45 
49 
56  virtual void onUserVideoProfileUpdate(uid_t uid, NERtcVideoProfileType max_profile) {
57  (void)uid;
58  (void)max_profile;
59  }
65  virtual void onUserAudioMute(uid_t uid, bool mute) {
66  (void)uid;
67  (void)mute;
68  }
74  virtual void onUserVideoMute(uid_t uid, bool mute) {
75  (void)uid;
76  (void)mute;
77  }
78 
85  virtual void onAudioDeviceStateChanged(const char device_id[kNERtcMaxDeviceIDLength],
86  NERtcAudioDeviceType device_type,
87  NERtcAudioDeviceState device_state) {
88  (void)device_id;
89  (void)device_type;
90  (void)device_state;
91  }
92 
98  virtual void onAudioDefaultDeviceChanged(const char device_id[kNERtcMaxDeviceIDLength],
99  NERtcAudioDeviceType device_type) {
100  (void)device_id;
101  (void)device_type;
102  }
103 
110  virtual void onVideoDeviceStateChanged(const char device_id[kNERtcMaxDeviceIDLength],
111  NERtcVideoDeviceType device_type,
112  NERtcVideoDeviceState device_state) {
113  (void)device_id;
114  (void)device_type;
115  (void)device_state;
116  }
117 
122  virtual void onFirstAudioDataReceived(uid_t uid) {
123  (void)uid;
124  }
125 
132  virtual void onFirstVideoDataReceived(uid_t uid) {
133  (void)uid;
134  }
135 
140  virtual void onFirstAudioFrameDecoded(uid_t uid) {
141  (void)uid;
142  }
143 
153  virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height) {
154  (void)uid;
155  (void)width;
156  (void)height;
157  }
158 
170  virtual void onCaptureVideoFrame(void *data,
171  NERtcVideoType type,
172  uint32_t width,
173  uint32_t height,
174  uint32_t count,
175  uint32_t offset[kNERtcMaxPlaneCount],
176  uint32_t stride[kNERtcMaxPlaneCount],
177  NERtcVideoRotation rotation) {
178  (void)data;
179  (void)type;
180  (void)width;
181  (void)height;
182  (void)count;
183  (void)offset;
184  (void)stride;
185  (void)rotation;
186  }
187 
200  (void)state;
201  (void)error_code;
202  }
203 
209  virtual void onAudioMixingTimestampUpdate(uint64_t timestamp_ms) {
210  (void)timestamp_ms;
211  }
212 
218  virtual void onAudioEffectFinished(uint32_t effect_id) {
219  (void)effect_id;
220  }
221 
232  virtual void onLocalAudioVolumeIndication(int volume) {
233  (void)volume;
234  }
235 
250  virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume) {
251  (void)speakers;
252  (void)speaker_number;
253  (void)total_volume;
254  }
255 
266  virtual void onAddLiveStreamTask(const char* task_id, const char* url, int error_code) {
267  (void)task_id;
268  (void)url;
269  (void)error_code;
270  }
271 
282  virtual void onUpdateLiveStreamTask(const char* task_id, const char* url, int error_code) {
283  (void)task_id;
284  (void)url;
285  (void)error_code;
286  }
287 
297  virtual void onRemoveLiveStreamTask(const char* task_id, int error_code) {
298  (void)task_id;
299  (void)error_code;
300  }
301 
311  virtual void onLiveStreamState(const char* task_id, const char* url, NERtcLiveStreamStateCode state) {
312  (void)task_id;
313  (void)url;
314  (void)state;
315  }
316 
328  virtual void onAudioHowling(bool howling) {
329  (void)howling;
330  }
331 
340  virtual void onRecvSEIMsg(uid_t uid, const char* data, uint32_t dataSize) {
341  (void)uid;
342  (void)data;
343  (void)dataSize;
344  }
345 
351  virtual void onAudioRecording(NERtcAudioRecordingCode code, const char* file_path) {
352  (void)code;
353  (void)file_path;
354  }
355 
361  virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char* channel_name) {
362  (void)state;
363  (void)channel_name;
364  }
365 
372  virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char* channel_name, NERtcErrorCode error) {
373  (void)event;
374  (void)channel_name;
375  (void)error;
376  }
377 
389  virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type) {
390  (void)is_fallback;
391  }
392 
405  virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type) {
406  (void)uid;
407  (void)is_fallback;
408  }
409 };
410 } //namespace nertc
411 
412 #endif
Definition: nertc_engine_event_handler_ex.h:25
virtual void onAudioRecording(NERtcAudioRecordingCode code, const char *file_path)
Definition: nertc_engine_event_handler_ex.h:351
virtual void onFirstVideoFrameDecoded(uid_t uid, uint32_t width, uint32_t height)
Definition: nertc_engine_event_handler_ex.h:153
virtual void onLocalPublishFallbackToAudioOnly(bool is_fallback, NERtcVideoStreamType stream_type)
Definition: nertc_engine_event_handler_ex.h:389
virtual void onRemoveLiveStreamTask(const char *task_id, int error_code)
Definition: nertc_engine_event_handler_ex.h:297
virtual void onFirstAudioFrameDecoded(uid_t uid)
Definition: nertc_engine_event_handler_ex.h:140
virtual void onAudioMixingStateChanged(NERtcAudioMixingState state, NERtcAudioMixingErrorCode error_code)
Definition: nertc_engine_event_handler_ex.h:199
virtual void onUserAudioMute(uid_t uid, bool mute)
Definition: nertc_engine_event_handler_ex.h:65
virtual void onAudioHowling(bool howling)
Definition: nertc_engine_event_handler_ex.h:328
virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool is_fallback, NERtcVideoStreamType stream_type)
Definition: nertc_engine_event_handler_ex.h:405
virtual void onFirstVideoDataReceived(uid_t uid)
Definition: nertc_engine_event_handler_ex.h:132
virtual void onUserSubStreamVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler_ex.h:34
virtual void onMediaRelayEvent(NERtcChannelMediaRelayEvent event, const char *channel_name, NERtcErrorCode error)
Definition: nertc_engine_event_handler_ex.h:372
virtual void onVideoDeviceStateChanged(const char device_id[kNERtcMaxDeviceIDLength], NERtcVideoDeviceType device_type, NERtcVideoDeviceState device_state)
Definition: nertc_engine_event_handler_ex.h:110
virtual void onUpdateLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_engine_event_handler_ex.h:282
virtual void onRemoteAudioVolumeIndication(const NERtcAudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)
Definition: nertc_engine_event_handler_ex.h:250
virtual void onAudioEffectFinished(uint32_t effect_id)
Definition: nertc_engine_event_handler_ex.h:218
virtual void onAudioDefaultDeviceChanged(const char device_id[kNERtcMaxDeviceIDLength], NERtcAudioDeviceType device_type)
Definition: nertc_engine_event_handler_ex.h:98
virtual void onScreenCaptureStatus(NERtcScreenCaptureStatus status)
Definition: nertc_engine_event_handler_ex.h:48
virtual void onLocalAudioVolumeIndication(int volume)
Definition: nertc_engine_event_handler_ex.h:232
virtual void onRecvSEIMsg(uid_t uid, const char *data, uint32_t dataSize)
Definition: nertc_engine_event_handler_ex.h:340
virtual void onAudioDeviceStateChanged(const char device_id[kNERtcMaxDeviceIDLength], NERtcAudioDeviceType device_type, NERtcAudioDeviceState device_state)
Definition: nertc_engine_event_handler_ex.h:85
virtual void onMediaRelayStateChanged(NERtcChannelMediaRelayState state, const char *channel_name)
Definition: nertc_engine_event_handler_ex.h:361
virtual void onLiveStreamState(const char *task_id, const char *url, NERtcLiveStreamStateCode state)
Definition: nertc_engine_event_handler_ex.h:311
virtual void onUserSubStreamVideoStop(uid_t uid)
Definition: nertc_engine_event_handler_ex.h:42
virtual void onUserVideoMute(uid_t uid, bool mute)
Definition: nertc_engine_event_handler_ex.h:74
virtual void onAddLiveStreamTask(const char *task_id, const char *url, int error_code)
Definition: nertc_engine_event_handler_ex.h:266
virtual void onFirstAudioDataReceived(uid_t uid)
Definition: nertc_engine_event_handler_ex.h:122
virtual void onCaptureVideoFrame(void *data, NERtcVideoType type, uint32_t width, uint32_t height, uint32_t count, uint32_t offset[kNERtcMaxPlaneCount], uint32_t stride[kNERtcMaxPlaneCount], NERtcVideoRotation rotation)
Definition: nertc_engine_event_handler_ex.h:170
virtual void onAudioMixingTimestampUpdate(uint64_t timestamp_ms)
Definition: nertc_engine_event_handler_ex.h:209
virtual void onUserVideoProfileUpdate(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler_ex.h:56
Definition: nertc_engine_event_handler.h:26
namespace nertc
NERtcAudioDeviceState
Definition: nertc_engine_defines.h:433
NERtcChannelMediaRelayState
Definition: nertc_engine_defines.h:1173
NERtcVideoStreamType
Definition: nertc_engine_defines.h:1123
NERtcAudioDeviceType
Definition: nertc_engine_defines.h:425
uint64_t uid_t
Definition: nertc_engine_defines.h:31
NERtcVideoRotation
Definition: nertc_engine_defines.h:1015
NERtcVideoProfileType
Definition: nertc_engine_defines.h:400
NERtcAudioMixingErrorCode
Definition: nertc_error_code.h:139
NERtcVideoDeviceState
Definition: nertc_engine_defines.h:482
NERtcScreenCaptureStatus
Definition: nertc_engine_defines.h:832
NERtcVideoType
Definition: nertc_engine_defines.h:1005
NERtcAudioRecordingCode
Definition: nertc_engine_defines.h:1293
NERtcLiveStreamStateCode
Definition: nertc_engine_defines.h:309
NERtcAudioMixingState
Definition: nertc_engine_defines.h:1045
NERtcErrorCode
Definition: nertc_error_code.h:20
NERtcVideoDeviceType
Definition: nertc_engine_defines.h:475
NERtcChannelMediaRelayEvent
Definition: nertc_engine_defines.h:1181
SDK基本类型定义
NERtc SDK的一些定义
#define kNERtcMaxPlaneCount
Definition: nertc_engine_defines.h:11
#define kNERtcMaxDeviceIDLength
Definition: nertc_engine_defines.h:15
NERTC SDK回调接口头文件。 NERTC SDK所有接口参数说明: 所有与字符串相关的参数(char *)全部为UTF-8编码。
Definition: nertc_engine_defines.h:563