NERtc Windows SDK
nertc_engine.h
浏览该文件的文档.
1 
7 #ifndef NERTC_ENGINE_H
8 #define NERTC_ENGINE_H
9 
10 #include "nertc_base.h"
11 #include "nertc_base_types.h"
12 #include "nertc_engine_defines.h"
14 
19 namespace nertc
20 {
24  const char* app_key;
26  const char* log_dir_path;
33 };
34 
40 {
41 public:
42  virtual ~IRtcEngine() {}
43 
57  virtual int initialize(const NERtcEngineContext& context) = 0;
58 
69  virtual void release(bool sync = true) = 0;
70 
88  virtual int setClientRole(NERtcClientRole role) = 0;
89 
101  virtual int setChannelProfile(NERtcChannelProfileType profile) = 0;
102 
125  virtual int joinChannel(const char* token, const char* channel_name, uid_t uid) = 0;
126 
146  virtual int switchChannel(const char* token, const char* channel_name) = 0;
147 
164  virtual int leaveChannel() = 0;
165 
174  virtual int queryInterface(NERtcInterfaceIdType iid, void** inter) = 0;
175 
196  virtual int enableLocalAudio(bool enabled) = 0;
197 
211  virtual int setupLocalVideoCanvas(NERtcVideoCanvas* canvas) = 0;
212 
227  virtual int setupRemoteVideoCanvas(uid_t uid, NERtcVideoCanvas* canvas) = 0;
228 
247  virtual int enableLocalVideo(bool enabled) = 0;
248 
264  virtual int subscribeRemoteVideoStream(uid_t uid, NERtcRemoteVideoStreamType type, bool subscribe) = 0;
265 };
266 
267 } //namespace nertc
268 
269 
271 
275 
282 NERTC_API nertc::IRtcEngine* NERTC_CALL createNERtcEngine();
283 
287 NERTC_API void NERTC_CALL destroyNERtcEngine(void *& nertc_engine_inst);
288 
290 
292 
293 #endif
Definition: nertc_engine_event_handler_ex.h:25
Definition: nertc_engine.h:40
virtual int setupRemoteVideoCanvas(uid_t uid, NERtcVideoCanvas *canvas)=0
virtual int initialize(const NERtcEngineContext &context)=0
virtual int queryInterface(NERtcInterfaceIdType iid, void **inter)=0
virtual int subscribeRemoteVideoStream(uid_t uid, NERtcRemoteVideoStreamType type, bool subscribe)=0
virtual int enableLocalVideo(bool enabled)=0
virtual int setChannelProfile(NERtcChannelProfileType profile)=0
virtual int leaveChannel()=0
virtual int switchChannel(const char *token, const char *channel_name)=0
virtual void release(bool sync=true)=0
virtual int joinChannel(const char *token, const char *channel_name, uid_t uid)=0
virtual int enableLocalAudio(bool enabled)=0
virtual int setupLocalVideoCanvas(NERtcVideoCanvas *canvas)=0
virtual int setClientRole(NERtcClientRole role)=0
NERTC_API void NERTC_CALL destroyNERtcEngine(void *&nertc_engine_inst)
NERTC_API nertc::IRtcEngine *NERTC_CALL createNERtcEngine()
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:43
NERtcInterfaceIdType
Definition: nertc_engine_defines.h:37
NERtcLogLevel
Definition: nertc_engine_defines.h:1252
uint64_t uid_t
Definition: nertc_engine_defines.h:31
NERtcChannelProfileType
Definition: nertc_engine_defines.h:50
NERtcRemoteVideoStreamType
Definition: nertc_engine_defines.h:417
定义导出宏。该文件只定义导出宏,不定义其他任何东西!
SDK基本类型定义
NERtc SDK的一些定义
NERTC SDK回调扩展接口头文件。 NERTC SDK所有接口参数说明: 所有与字符串相关的参数(char *)全部为UTF-8编码。
Definition: nertc_engine.h:23
NERtcServerAddresses server_config
Definition: nertc_engine.h:32
const char * app_key
Definition: nertc_engine.h:24
bool video_prefer_hw_decoder
Definition: nertc_engine.h:30
bool video_use_exnternal_render
Definition: nertc_engine.h:31
const char * log_dir_path
Definition: nertc_engine.h:26
IRtcEngineEventHandlerEx * event_handler
Definition: nertc_engine.h:25
bool video_prefer_hw_encoder
Definition: nertc_engine.h:29
NERtcLogLevel log_level
Definition: nertc_engine.h:27
uint32_t log_file_max_size_KBytes
Definition: nertc_engine.h:28
Definition: nertc_engine_defines.h:1274
Definition: nertc_engine_defines.h:887