音视频通讯SDK API参考手册  iOS 1.4.0
av_endpoint.h
1 #ifndef AV_ENDPOINT_H_
2 #define AV_ENDPOINT_H_
3 
4 #include "av_common.h"
5 
6 namespace tencent {
7 namespace av {
8 
17 };
18 
29 class AV_EXPORT AVEndpoint {
30  public:
32  struct Info {
33  Info()
34  : sdk_version(0)
35  , terminal_type(0)
36  , has_audio(false)
37  , has_video(false)
38  , is_mute(false) {
39  }
40 
41  virtual ~Info() {}
42 
43  std::string identifier;
44  uint32 sdk_version;
45  uint32 terminal_type;
46  bool has_audio;
47  bool has_video;
48  bool is_mute;
49  };
50 
51 
66  typedef void (*CompleteCallback)(std::string identifier, int32 result, void* custom_data);
67 
83  typedef void (*RequestViewListCompleteCallback)(std::string identifier_list[], int32 count, int32 result,
84  void* custom_data);
85 
98  typedef void (*CancelAllViewCompleteCallback)(int32 result, void* custom_data);
99 
101  struct View {
103  : video_src_type(VIDEO_SRC_TYPE_CAMERA)
104  , size_type(VIEW_SIZE_TYPE_BIG) {}
105 
108  };
109 
110 
111  public:
112 
113 
119  virtual const std::string& GetId() const = 0;
120 
126  virtual const Info& GetInfo() const = 0;
127 
147  virtual int32 RequestView(const View& view, CompleteCallback complete_callback, void* custom_data = NULL) = 0;
148 
167  virtual int32 CancelView(VideoSrcType video_src_type, CompleteCallback complete_callback, void* custom_data = NULL) = 0;
168 
169 #ifndef WIN32
170 
196  static int32 RequestViewList(const std::string identifier_list[], const View view_list[], int32 count,
197  RequestViewListCompleteCallback complete_callback, void* custom_data);
198 
216  static int32 CancelAllView(CancelAllViewCompleteCallback complete_callback, void* custom_data);
217 #endif
218 
228  virtual bool MuteAudio(bool is_mute = false) = 0;
229 
235  virtual bool IsAudioMute() = 0;
236 
244  virtual bool HasVideo() = 0;
245 
253  virtual bool HasAudio() = 0;
254 
255  DISALLOW_EVIL_DESTRUCTIONS(AVEndpoint)
256 };
257 
258 } // namespace av
259 } // namespace tencent
260 
261 #endif // #ifndef AV_ENDPOINT_H_
Definition: av_audio_ctrl.h:6
摄像头。
Definition: av_common.h:124
Info()
Definition: av_endpoint.h:33
VideoSrcType
视频源类型。
Definition: av_common.h:122
std::string identifier
房间成员Id。
Definition: av_endpoint.h:43
VideoSrcType video_src_type
视频源类型,详情见VideoSrcType的定义。
Definition: av_endpoint.h:106
uint32 terminal_type
终端类型。
Definition: av_endpoint.h:45
视频画面参数。
Definition: av_endpoint.h:101
房间成员的封装类。
Definition: av_endpoint.h:29
大画面,分辨率包含320x240、480x360、640x480、800x600、720P、1080P。
Definition: av_endpoint.h:16
uint32 sdk_version
房间成员所使用的SDK版本号,用于后续做功能兼容性判断。
Definition: av_endpoint.h:44
小画面,分辨率包含192x144、160x120。
Definition: av_endpoint.h:15
bool is_mute
是否不接听这个成员的音频。
Definition: av_endpoint.h:48
ViewSizeType
画面大小。
Definition: av_endpoint.h:14
View()
Definition: av_endpoint.h:102
房间成员基本信息。
Definition: av_endpoint.h:32
virtual ~Info()
Definition: av_endpoint.h:41
bool has_video
是否有发视频。
Definition: av_endpoint.h:47
bool has_audio
是否有发语音。
Definition: av_endpoint.h:46
ViewSizeType size_type
画面大小,详情见ViewSizeType的定义。
Definition: av_endpoint.h:107