HyphenateSDK  3.7.4
IEMCallManager.h
1 
15 #import <AVFoundation/AVFoundation.h>
16 #import <Foundation/Foundation.h>
17 
18 #import "EMCallOptions.h"
19 #import "EMCallManagerDelegate.h"
20 #import "EMCallBuilderDelegate.h"
21 #import "EMWaterMarkOption.h"
22 
23 @class EMError;
24 @class EMCallStream;
25 
33 @protocol IEMCallManager <NSObject>
34 
35 @optional
36 
37 #pragma mark - Delegate
38 
52 - (void)addDelegate:(id<EMCallManagerDelegate>)aDelegate
53  delegateQueue:(dispatch_queue_t)aQueue;
54 
66 - (void)removeDelegate:(id<EMCallManagerDelegate>)aDelegate;
67 
79 - (void)setBuilderDelegate:(id<EMCallBuilderDelegate>)aDelegate;
80 
81 #pragma mark - Options
82 
94 - (void)setCallOptions:(EMCallOptions *)aOptions;
95 
108 
109 #pragma mark - Make and Answer and End
110 
129 - (void)startCall:(EMCallType)aType
130  remoteName:(NSString *)aRemoteName
131  ext:(NSString *)aExt
132  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock;
133 
156 - (void)startCall:(EMCallType)aType
157  remoteName:(NSString *)aRemoteName
158  record:(BOOL)isRecord
159  mergeStream:(BOOL)isMerge
160  ext:(NSString *)aExt
161  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock;
162 
179 - (EMError *)answerIncomingCall:(NSString *)aCallId;
180 
198 - (EMError *)endCall:(NSString *)aCallId
199  reason:(EMCallEndReason)aReason;
200 
210 - (void)forceEndAllCall;
211 
212 #pragma mark - Input Video Data
213 
231 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
232  rotation:(UIDeviceOrientation)aRotation
233  callId:(NSString *)aCallId
234  completion:(void (^)(EMError *aError))aCompletionBlock;
235 
255 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
256  sampleBufferTime:(CMTime)aTime
257  rotation:(UIDeviceOrientation)aRotation
258  callId:(NSString *)aCallId
259  completion:(void (^)(EMError *aError))aCompletionBlock;
260 
261 #pragma mark - 截图
262 
263 //截取本地视频图片
264 - (void)takeLocalVideoPictureWithCallId:(NSString *)aCallId
265  saveToPath:(NSString *)aSavePath
266  completion:(void (^)(NSString *aFilePath, NSError *aError))aCompletion;
267 //截取对方视频图片
268 - (void)takeRemoteVideoPictureWithCallId:(NSString *)aCallId
269  saveToPath:(NSString *)aSavePath
270  completion:(void (^)(NSString *aFilePath, NSError *aError))aCompletion;
271 
272 #pragma mark - 自定义音频数据
273 
289 - (int) inputCustomAudioData:(NSData*)data;
290 #pragma mark - Watermark
302 - (void)addVideoWatermark:(EMWaterMarkOption*)option;
311 - (void)clearVideoWatermark;
312 #pragma mark - EM_DEPRECATED_IOS 3.5.2
313 
333 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
334  callId:(NSString *)aCallId
335  format:(EMCallVideoFormat)aFormat
336  rotation:(int)aRotation
337  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoSampleBuffer:rotation:callId:completion:");
338 
358 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
359  callId:(NSString *)aCallId
360  format:(EMCallVideoFormat)aFormat
361  rotation:(int)aRotation
362  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoPixelBuffer:sampleBufferTime:rotation:callId:completion:");
363 
387 - (void)inputVideoData:(NSData *)aData
388  callId:(NSString *)aCallId
389  widthInPixels:(size_t)aWidth
390  heightInPixels:(size_t)aHeight
391  format:(EMCallVideoFormat)aFormat
392  rotation:(int)aRotation
393  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete");
394 
395 
396 #pragma mark - EM_DEPRECATED_IOS 3.2.1
397 
412 - (void)startVoiceCall:(NSString *)aUsername
413  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_2_0, "Use -[IEMCallManager startCall:remoteName:ext:completion:]");
414 
429 - (void)startVideoCall:(NSString *)aUsername
430  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_2_0, "Use -[IEMCallManager startCall:remoteName:ext:completion:]");
431 
432 @end
Definition: EMCallOptions.h:21
Definition: EMCallSession.h:31
Definition: EMCallStream.h:41
Definition: EMError.h:27
Definition: EMWaterMarkOption.h:19
Definition: EMCallBuilderDelegate.h:17
Definition: EMCallManagerDelegate.h:28
Definition: IEMCallManager.h:33
void clearVideoWatermark()
EMCallOptions * getCallOptions()