8 #import <Foundation/Foundation.h>
9 #import <AVFoundation/AVFoundation.h>
64 @protocol AgoraVideoFrameConsumer <NSObject>
72 - (void)consumePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer
73 withTimestamp:(CMTime)timestamp
74 rotation:(
AgoraVideoRotation)rotation NS_SWIFT_NAME(consumePixelBuffer(_:withTimestamp:rotation:));
84 - (void)consumeRawData:(
void * _Nonnull)rawData
85 withTimestamp:(CMTime)timestamp
88 rotation:(
AgoraVideoRotation)rotation NS_SWIFT_NAME(consumeRawData(_:withTimestamp:format:size:rotation:));
114 @protocol AgoraVideoSourceProtocol <NSObject>
116 @property (strong) id<AgoraVideoFrameConsumer> _Nullable consumer;
125 - (BOOL)shouldInitialize NS_SWIFT_NAME(shouldInitialize());
137 - (void)shouldStart NS_SWIFT_NAME(shouldStart());
143 - (void)shouldStop NS_SWIFT_NAME(shouldStop());
149 - (void)shouldDispose NS_SWIFT_NAME(shouldDispose());
188 @protocol AgoraVideoSinkProtocol <NSObject>
197 - (BOOL)shouldInitialize NS_SWIFT_NAME(shouldInitialize());
206 - (void)shouldStart NS_SWIFT_NAME(shouldStart());
212 - (void)shouldStop NS_SWIFT_NAME(shouldStop());
218 - (void)shouldDispose NS_SWIFT_NAME(shouldDispose());
238 - (void)renderPixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer
247 - (void)renderRawData:(
void * _Nonnull)rawData
253 #pragma mark - Agora Default Media IO
255 typedef NS_ENUM(NSInteger, AgoraRtcDefaultCameraPosition) {
257 AgoraRtcDefaultCameraPositionFront = 0,
259 AgoraRtcDefaultCameraPositionBack = 1,
262 __attribute__((visibility(
"default")))
@interface AgoraRtcDefaultCamera: NSObject<AgoraVideoSourceProtocol>
264 @property (nonatomic, assign) AgoraRtcDefaultCameraPosition position;
265 - (instancetype _Nonnull)initWithPosition:(AgoraRtcDefaultCameraPosition)position NS_SWIFT_NAME(initWithPosition(_:));
269 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
270 __attribute__((visibility(
"default")))
@interface AgoraRtcScreenCapture: NSObject<AgoraVideoSourceProtocol>
271 @property (nonatomic, readonly) NSUInteger windowId;
272 + (instancetype _Nonnull)fullScreenCaptureWithFrequency:(NSInteger)captureFrequency
273 bitRate:(NSInteger)bitRate NS_SWIFT_NAME(fullScreenCaptureWithFrequency(_:bitRate:));
274 + (instancetype _Nonnull)windowCaptureWithId:(CGWindowID)windowId
275 captureFrequency:(NSInteger)captureFrequency
276 bitRate:(NSInteger)bitRate
277 rect:(CGRect)rect NS_SWIFT_NAME(windowCaptureWithId(_:captureFrequency:bitRate:rect:));
281 __attribute__((visibility(
"default")))
@interface AgoraRtcDefaultRenderer: NSObject<AgoraVideoSinkProtocol>
282 @property (nonatomic, strong, readonly)
VIEW_CLASS * _Nonnull view;
284 - (instancetype _Nonnull)initWithView:(
VIEW_CLASS * _Nonnull)view