Agora RTC Objective-C API Reference Refactor

AgoraExtObjects.h
Go to the documentation of this file.
1 //
2 // AgoraExtObjects.h
3 // Agora SDK
4 //
5 // Created by LLF on 21-3-9.
6 // Copyright (c) 2021 Agora. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import <CoreMedia/CoreMedia.h>
11
15 typedef NS_ENUM(NSInteger, BytesPerSampleType) {
19 TwoBytesPerSample = 2,
20 };
21
25 __attribute__((visibility("default"))) @interface AgoraAudioPcmFrame: NSObject
26 @property (assign, nonatomic) uint32_t captureTimestamp;
27 @property (assign, nonatomic) size_t samplesPerChannel;
28 @property (assign, nonatomic) int sampleRateHz;
29 @property (assign, nonatomic) size_t channelNumbers;
30 @property (strong, nonatomic) NSData* __nonnull pcmBuffer;
31 @property (assign, nonatomic) BytesPerSampleType bytesPerSample;
32 @end
33
34 typedef NS_ENUM(NSInteger, AgoraVideoFilterFrameType) {
38 AgoraVideoFilterFrameTypeMemPixels = 0,
42 AgoraVideoFilterFrameTypeCVPixelBuffer = 2,
43 };
44
45 typedef NS_ENUM(NSInteger, AgoraMemPixelBufferFormatType) {
46 AgoraMemPixelBufferFormatTypeUnknown = 0,
47 AgoraMemPixelBufferFormatTypeI420 = 1,
48 AgoraMemPixelBufferFormatTypeI422 = 2,
49 AgoraMemPixelBufferFormatTypeNV12 = 3,
50 AgoraMemPixelBufferFormatTypeNV21 = 4,
51 AgoraMemPixelBufferFormatTypeRGBA = 5,
52 AgoraMemPixelBufferFormatTypeARGB = 6,
53 AgoraMemPixelBufferFormatTypeBGRA = 7,
54 };
55
58 __attribute__((visibility("default"))) @interface AgoraMemPixelBuffer : NSObject
59 @property (nonatomic, assign) AgoraMemPixelBufferFormatType type;
60 @property (nonatomic, assign) uint8_t* _Nullable data;
61 @property (nonatomic, assign) int size;
62
63 @end
64
67 __attribute__((visibility("default"))) @interface AgoraVideoFilterFrame : NSObject
68
69 @property (nonatomic, assign) AgoraVideoFilterFrameType type;
73 @property (nonatomic, assign) int width;
77 @property (nonatomic, assign) int height;
78
82 @property (nonatomic, assign) int rotation;
89 @property (nonatomic, assign) int64_t renderTimeMs;
90
94 @property (assign, nonatomic) CVPixelBufferRef _Nullable pixelBuffer;
95
99 @property (strong, nonatomic) AgoraMemPixelBuffer * _Nullable memPixelBuffer;
100
101 @end
102
105 __attribute__((visibility("default"))) @interface AgoraExtVideoFrame : NSObject
116 @property (nonatomic, assign) NSInteger type;
120 @property (nonatomic, assign) int width;
124 @property (nonatomic, assign) int height;
128 @property (nonatomic, assign) int yStride;
132 @property (nonatomic, assign) int uStride;
136 @property (nonatomic, assign) int vStride;
140 @property (nonatomic, assign) uint8_t* _Nullable yBuffer;
144 @property (nonatomic, assign) uint8_t* _Nullable uBuffer;
148 @property (nonatomic, assign) uint8_t* _Nullable vBuffer;
152 @property (nonatomic, assign) int rotation;
159 @property (nonatomic, assign) int64_t renderTimeMs;
163 @property (nonatomic, assign) int avSyncType;
164
167 @property(assign, nonatomic) CVPixelBufferRef _Nullable pixelBuffer;
168 @end
169
170 typedef NS_ENUM(NSInteger, AgoraExtensionType) {
171 AgoraExtensionTypeAudioFilter = 0,
172 AgoraExtensionTypeVideoPreProcessingFilter = 1,
173 AgoraExtensionTypeVideoPostProcessingFilter = 2,
174 AgoraExtensionTypeAudioSink = 3,
175 AgoraExtensionTypeVideoSink = 4,
176 AgoraExtensionTypeAudioRecordingLocalPlaybackFilter = 10000,
177 AgoraExtensionTypeAudioPostProcessingFilter = 10001,
178 AgoraExtensionTypeAudioUserPlaybackFilter = 10002,
179 AgoraExtensionTypeAudioPcmSourceFilter = 10003,
180 AgoraExtensionTypeAudioPcmSourceSendingFilter = 10004,
181 AgoraExtensionTypeAudioPcmSourceLocalPlaybackFilter = 10005,
182 AgoraExtensionTypeAudioRemoteMixedPlaybackFilter = 10006,
183 AgoraExtensionTypeUnknown = 0xFFFF,
184 };
185
188 __attribute__((visibility("default"))) @interface AgoraExtensionMetaInfo : NSObject
189 @property (nonatomic, assign) AgoraExtensionType type;
190 @property (nonatomic, strong) NSString * __nonnull extensionName;
191 @end
AgoraExtensionTypeAudioRemoteMixedPlaybackFilter
@ AgoraExtensionTypeAudioRemoteMixedPlaybackFilter
Definition: AgoraExtObjects.h:182
AgoraVideoFilterFrame
Definition: AgoraExtObjects.h:68
AgoraAudioPcmFrame::samplesPerChannel
size_t samplesPerChannel
Definition: AgoraExtObjects.h:27
TwoBytesPerSample
@ TwoBytesPerSample
Definition: AgoraExtObjects.h:19
AgoraMemPixelBufferFormatTypeI420
@ AgoraMemPixelBufferFormatTypeI420
Definition: AgoraExtObjects.h:47
AgoraAudioPcmFrame::sampleRateHz
int sampleRateHz
Definition: AgoraExtObjects.h:28
AgoraExtVideoFrame
Definition: AgoraExtObjects.h:106
AgoraExtensionMetaInfo
Definition: AgoraExtObjects.h:189
AgoraVideoFilterFrameTypeCVPixelBuffer
@ AgoraVideoFilterFrameTypeCVPixelBuffer
Definition: AgoraExtObjects.h:42
AgoraExtensionTypeAudioSink
@ AgoraExtensionTypeAudioSink
Definition: AgoraExtObjects.h:174
AgoraMemPixelBufferFormatType
AgoraMemPixelBufferFormatType
Definition: AgoraExtObjects.h:45
AgoraAudioPcmFrame
Definition: AgoraExtObjects.h:26
AgoraVideoFilterFrameType
AgoraVideoFilterFrameType
Definition: AgoraExtObjects.h:34
AgoraExtensionTypeAudioPcmSourceSendingFilter
@ AgoraExtensionTypeAudioPcmSourceSendingFilter
Definition: AgoraExtObjects.h:180
AgoraAudioPcmFrame::pcmBuffer
NSData *__nonnull pcmBuffer
Definition: AgoraExtObjects.h:30
AgoraExtensionType
AgoraExtensionType
Definition: AgoraExtObjects.h:170
AgoraMemPixelBufferFormatTypeNV12
@ AgoraMemPixelBufferFormatTypeNV12
Definition: AgoraExtObjects.h:49
AgoraExtensionTypeVideoPreProcessingFilter
@ AgoraExtensionTypeVideoPreProcessingFilter
Definition: AgoraExtObjects.h:172
AgoraExtensionTypeUnknown
@ AgoraExtensionTypeUnknown
Definition: AgoraExtObjects.h:183
AgoraExtensionTypeVideoSink
@ AgoraExtensionTypeVideoSink
Definition: AgoraExtObjects.h:175
AgoraAudioPcmFrame::captureTimestamp
uint32_t captureTimestamp
Definition: AgoraExtObjects.h:26
BytesPerSampleType
BytesPerSampleType
Definition: AgoraExtObjects.h:15
AgoraExtensionTypeAudioUserPlaybackFilter
@ AgoraExtensionTypeAudioUserPlaybackFilter
Definition: AgoraExtObjects.h:178
AgoraExtensionTypeAudioFilter
@ AgoraExtensionTypeAudioFilter
Definition: AgoraExtObjects.h:171
AgoraMemPixelBuffer
Definition: AgoraExtObjects.h:59
AgoraMemPixelBufferFormatTypeARGB
@ AgoraMemPixelBufferFormatTypeARGB
Definition: AgoraExtObjects.h:52
AgoraMemPixelBufferFormatTypeRGBA
@ AgoraMemPixelBufferFormatTypeRGBA
Definition: AgoraExtObjects.h:51
AgoraVideoFilterFrameTypeMemPixels
@ AgoraVideoFilterFrameTypeMemPixels
Definition: AgoraExtObjects.h:38
AgoraExtensionTypeAudioPcmSourceFilter
@ AgoraExtensionTypeAudioPcmSourceFilter
Definition: AgoraExtObjects.h:179
AgoraAudioPcmFrame::channelNumbers
size_t channelNumbers
Definition: AgoraExtObjects.h:29
AgoraExtensionTypeAudioPostProcessingFilter
@ AgoraExtensionTypeAudioPostProcessingFilter
Definition: AgoraExtObjects.h:177
AgoraMemPixelBufferFormatTypeBGRA
@ AgoraMemPixelBufferFormatTypeBGRA
Definition: AgoraExtObjects.h:53
AgoraExtensionTypeAudioPcmSourceLocalPlaybackFilter
@ AgoraExtensionTypeAudioPcmSourceLocalPlaybackFilter
Definition: AgoraExtObjects.h:181
AgoraMemPixelBufferFormatTypeNV21
@ AgoraMemPixelBufferFormatTypeNV21
Definition: AgoraExtObjects.h:50
AgoraExtensionTypeVideoPostProcessingFilter
@ AgoraExtensionTypeVideoPostProcessingFilter
Definition: AgoraExtObjects.h:173
AgoraMemPixelBufferFormatTypeUnknown
@ AgoraMemPixelBufferFormatTypeUnknown
Definition: AgoraExtObjects.h:46
AgoraAudioPcmFrame::bytesPerSample
BytesPerSampleType bytesPerSample
Definition: AgoraExtObjects.h:31
AgoraMemPixelBufferFormatTypeI422
@ AgoraMemPixelBufferFormatTypeI422
Definition: AgoraExtObjects.h:48
AgoraExtensionTypeAudioRecordingLocalPlaybackFilter
@ AgoraExtensionTypeAudioRecordingLocalPlaybackFilter
Definition: AgoraExtObjects.h:176