MillicastSDK 2.2.0
Loading...
Searching...
No Matches
source.h
Go to the documentation of this file.
1
8#import <CoreVideo/CoreVideo.h>
9#import <CoreMedia/CoreMedia.h>
10
13#import <MillicastSDK/exports.h>
15
16// Forward declarations ///////////////////////////////////////////////////////
17@class MCTrack;
18
19
20// Source /////////////////////////////////////////////////////////////////////
21
23typedef NS_CLOSED_ENUM(NSInteger, MCSourceType) {
25 MCSourceTypeDevice,
27 MCSourceTypeMonitor,
29 MCSourceTypeApp,
31 MCSourceTypeMic,
33 MCSourceTypeNDI NS_SWIFT_NAME(NDI),
35 MCSourceTypeDeckLink,
37 MCSourceTypeCustom,
38};
39
41MILLICAST_API @interface MCSource : NSObject
42
45- (MCSourceType) getType;
46
49- (NSString*) getName;
50
53- (NSString*) getUniqueId;
54
57- (NSString*) getTypeAsString;
58
59@end
60
62MILLICAST_API @interface MCSourceBuilder : NSObject
63
67- (void) setType:(MCSourceType) type;
68
72- (void) setName:(NSString *) name;
73
77- (void) setUniqueId:(NSString*) type;
78
79@end
80
82@protocol CaptureSource <NSObject>
83
87- (MCTrack *) startCapture;
88
90- (void) stopCapture;
91
94- (bool) isCapturing;
95
96@end
97
99@protocol PlaybackSource <NSObject>
100
102- (void) initPlayback;
103
106- (bool) isPlaying;
107
108@end
109
110// Video //////////////////////////////////////////////////////////////////////
111
114
117- (NSArray<MCVideoCapabilities*>*) getCapabilities;
118
122- (void) setCapability:(MCVideoCapabilities*) cap;
123
128- (void) changeVideoSource: (bool) ascending;
129
135- (void) changeVideoSource: (bool) ascending : (NSString*) deviceId;
136
137@end
138
141
143- (void) setCapabilities:(NSArray<MCVideoCapabilities*>*) capabilities;
144
147- (MCVideoSource*) build;
148
149@end
150
151// Audio //////////////////////////////////////////////////////////////////////
152
154@protocol MCAudioControl <NSObject>
155
159- (void) setVolume:(uint32_t) v;
160
164- (void) setNumChannel:(uint8_t) channel;
165
169- (void) mute:(bool) m;
170
173- (uint32_t) getVolume;
174
177- (bool) isMuted;
178
179@end
180
183
187- (MCTrack*) startCapture;
188
190- (void) stopCapture;
191
194- (bool) isCapturing;
195
196@end
197
200
203- (MCAudioSource*) build;
204
205@end
206
211
213- (void) initPlayback;
214
217- (bool) isPlaying;
218
219@end
220
223
226- (MCAudioPlayback*) build;
227@end
228
231
235- (MCTrack*) startCapture;
236
237
242- (void) onAudioFrame: (MCAudioFrame*) frame;
243
246- (bool) isCapturing;
247
249- (void) stopCapture;
250
251@end
252
257- (MCCustomAudioSource*) build;
258@end
259
262
266- (MCTrack*) startCapture;
267
273- (void) onPixelBuffer:(CVPixelBufferRef) pixelBuffer;
274
279- (void) onPixelBuffer:(CVPixelBufferRef) pixelBuffer withTimestamp: (CMTime) timestamp;
280
283- (bool) isCapturing;
284
286- (void) stopCapture;
287
288@end
289
292
296@end
#define MILLICAST_API
Definition exports.h:51
Responsible for building a CoreVideoSource.
Definition source.h:292
MCCoreVideoSource * build()
Gathers information about the source.
Definition source.h:42
Represents a captured instance of a media source.
Definition track.h:10
This VideoCapabilities class represents the video capabilities of a video track.
Definition capabilities.h:24
typedef NS_CLOSED_ENUM(NSInteger, MCSourceType)
The Source type.
Definition source.h:23
void NSError *_Nullable completionHandler NS_SWIFT_NAME(addWebrtcRemoteTrack(kind:cname:completionHandler:))