NERtc Windows SDK  V4.6.20
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 {
38  const char* app_key;
56  const char* log_dir_path;
114  NERtcEngineContext() {
115  app_key = nullptr;
116  event_handler = nullptr;
117  log_dir_path = nullptr;
120  video_prefer_hw_encoder = false;
121  video_prefer_hw_decoder = false;
123  }
124 };
125 
137 class IRtcEngine {
138 public:
139  virtual ~IRtcEngine() {}
140 
171  virtual int initialize(const NERtcEngineContext& context) = 0;
172 
201  virtual void release(bool sync = true) = 0;
202 
246  virtual int setClientRole(NERtcClientRole role) = 0;
247 
268  virtual int setChannelProfile(NERtcChannelProfileType profile) = 0;
269 
323  virtual int joinChannel(const char* token, const char* channel_name, uid_t uid) = 0;
324 
379  virtual int switchChannel(const char* token, const char* channel_name) = 0;
380 
409  virtual int leaveChannel() = 0;
410 
429  virtual int queryInterface(NERtcInterfaceIdType iid, void** inter) = 0;
430 
467  virtual int enableLocalAudio(bool enabled) = 0;
468 
497  virtual int setupLocalVideoCanvas(NERtcVideoCanvas* canvas) = 0;
498 
532  virtual int setupRemoteVideoCanvas(uid_t uid, NERtcVideoCanvas* canvas) = 0;
533 
571  virtual int enableLocalVideo(bool enabled) = 0;
572 
637  virtual int enableLocalVideo(NERtcVideoStreamType type, bool enabled) = 0;
638 
670  virtual int subscribeRemoteVideoStream(uid_t uid, NERtcRemoteVideoStreamType type, bool subscribe) = 0;
671 };
672 
673 } // namespace nertc
674 
676 
680 
694 NERTC_API nertc::IRtcEngine* NERTC_CALL createNERtcEngine();
695 
706 NERTC_API void NERTC_CALL destroyNERtcEngine(void*& nertc_engine_inst);
707 
709 
711 
712 #endif
Definition: nertc_engine_event_handler_ex.h:31
Definition: nertc_engine.h:137
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 enableLocalVideo(NERtcVideoStreamType type, bool enabled)=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:207
NERtcInterfaceIdType
Definition: nertc_engine_defines.h:178
NERtcLogLevel
Definition: nertc_engine_defines.h:5984
@ kNERtcLogLevelInfo
Definition: nertc_engine_defines.h:6020
NERtcVideoStreamType
Definition: nertc_engine_defines.h:5102
uint64_t uid_t
Definition: nertc_engine_defines.h:146
NERtcChannelProfileType
Definition: nertc_engine_defines.h:240
NERtcRemoteVideoStreamType
Definition: nertc_engine_defines.h:1661
Defines macro output. The file only defines macro output instead of anything else.
NERtc SDK definitions.
The interface header file of expansion callback of the NERTC SDK. All parameter descriptions of the N...
Definition: nertc_engine.h:28
NERtcServerAddresses server_config
Definition: nertc_engine.h:113
const char * app_key
Definition: nertc_engine.h:38
bool video_prefer_hw_decoder
Definition: nertc_engine.h:94
bool video_use_exnternal_render
Definition: nertc_engine.h:103
const char * log_dir_path
Definition: nertc_engine.h:56
IRtcEngineEventHandlerEx * event_handler
Definition: nertc_engine.h:47
bool video_prefer_hw_encoder
Definition: nertc_engine.h:84
NERtcLogLevel log_level
Definition: nertc_engine.h:65
uint32_t log_file_max_size_KBytes
Definition: nertc_engine.h:74
Definition: nertc_engine_defines.h:6116
Definition: nertc_engine_defines.h:4158