HyphenateSDK  3.6.1
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 
22 @class EMError;
23 @class EMCallStream;
24 
32 @protocol IEMCallManager <NSObject>
33 
34 @optional
35 
36 #pragma mark - Delegate
37 
51 - (void)addDelegate:(id<EMCallManagerDelegate>)aDelegate
52  delegateQueue:(dispatch_queue_t)aQueue;
53 
65 - (void)removeDelegate:(id<EMCallManagerDelegate>)aDelegate;
66 
78 - (void)setBuilderDelegate:(id<EMCallBuilderDelegate>)aDelegate;
79 
80 #pragma mark - Options
81 
93 - (void)setCallOptions:(EMCallOptions *)aOptions;
94 
107 
108 #pragma mark - Make and Answer and End
109 
128 - (void)startCall:(EMCallType)aType
129  remoteName:(NSString *)aRemoteName
130  ext:(NSString *)aExt
131  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock;
132 
155 - (void)startCall:(EMCallType)aType
156  remoteName:(NSString *)aRemoteName
157  record:(BOOL)isRecord
158  mergeStream:(BOOL)isMerge
159  ext:(NSString *)aExt
160  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock;
161 
178 - (EMError *)answerIncomingCall:(NSString *)aCallId;
179 
197 - (EMError *)endCall:(NSString *)aCallId
198  reason:(EMCallEndReason)aReason;
199 
209 - (void)forceEndAllCall;
210 
211 #pragma mark - Input Video Data
212 
230 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
231  rotation:(UIDeviceOrientation)aRotation
232  callId:(NSString *)aCallId
233  completion:(void (^)(EMError *aError))aCompletionBlock;
234 
254 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
255  sampleBufferTime:(CMTime)aTime
256  rotation:(UIDeviceOrientation)aRotation
257  callId:(NSString *)aCallId
258  completion:(void (^)(EMError *aError))aCompletionBlock;
259 
260 #pragma mark - 截图
261 
262 //截取本地视频图片
263 - (void)takeLocalVideoPictureWithCallId:(NSString *)aCallId
264  saveToPath:(NSString *)aSavePath
265  completion:(void (^)(NSString *aFilePath, NSError *aError))aCompletion;
266 //截取对方视频图片
267 - (void)takeRemoteVideoPictureWithCallId:(NSString *)aCallId
268  saveToPath:(NSString *)aSavePath
269  completion:(void (^)(NSString *aFilePath, NSError *aError))aCompletion;
270 
271 
272 #pragma mark - EM_DEPRECATED_IOS 3.5.2
273 
293 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
294  callId:(NSString *)aCallId
295  format:(EMCallVideoFormat)aFormat
296  rotation:(int)aRotation
297  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoSampleBuffer:rotation:callId:completion:");
298 
318 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
319  callId:(NSString *)aCallId
320  format:(EMCallVideoFormat)aFormat
321  rotation:(int)aRotation
322  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoPixelBuffer:sampleBufferTime:rotation:callId:completion:");
323 
347 - (void)inputVideoData:(NSData *)aData
348  callId:(NSString *)aCallId
349  widthInPixels:(size_t)aWidth
350  heightInPixels:(size_t)aHeight
351  format:(EMCallVideoFormat)aFormat
352  rotation:(int)aRotation
353  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete");
354 
355 
356 #pragma mark - EM_DEPRECATED_IOS 3.2.1
357 
372 - (void)startVoiceCall:(NSString *)aUsername
373  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_2_0, "Use -[IEMCallManager startCall:remoteName:ext:completion:]");
374 
389 - (void)startVideoCall:(NSString *)aUsername
390  completion:(void (^)(EMCallSession *aCallSession, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_2_0, "Use -[IEMCallManager startCall:remoteName:ext:completion:]");
391 
392 @end
Definition: EMCallSession.h:30
Definition: IEMCallManager.h:32
Definition: EMError.h:26
Definition: EMCallBuilderDelegate.h:17
Definition: EMCallOptions.h:20
Definition: EMCallManagerDelegate.h:28
Definition: EMCallStream.h:40
EMCallOptions * getCallOptions()