MillicastSDK 2.0.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
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
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
188
190- (void) stopCapture;
191
194- (bool) isCapturing;
195
196@end
197
200
204
205@end
206
211
213- (void) initPlayback;
214
217- (bool) isPlaying;
218
219@end
220
223
227@end
228
231
236
237
242- (void) onAudioFrame: (MCAudioFrame*) frame;
243
246- (bool) isCapturing;
247
249- (void) stopCapture;
250
251@end
252
258@end
259
262
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
Definition frames.h:68
Responsible for building AudioPlayback.
Definition source.h:223
MCAudioPlayback * build()
Definition source.h:210
void initPlayback()
Initializes the playback device.
Responsible for building AudioSource.
Definition source.h:200
MCAudioSource * build()
Manages the audio capture functionality.
Definition source.h:182
MCTrack * startCapture()
void stopCapture()
Stops the audio capture process.
Responsible for building a CoreVideoSource.
Definition source.h:292
MCCoreVideoSource * build()
A Source that allows applications to feed their own raw CVPixelBuffers for publishing.
Definition source.h:262
void stopCapture()
Stops capturing video.
MCTrack * startCapture()
Responsible for building MCCustomAudioSource.
Definition source.h:255
MCCustomAudioSource * build()
A custom audio source that can be fed any raw audio data for publishing.
Definition source.h:231
MCTrack * startCapture()
void stopCapture()
Stops the underlying audio tracks and informs the SDK to stop any pending operations related to this ...
Responsible for building a source object.
Definition source.h:63
Gathers information about the source.
Definition source.h:42
NSString * getUniqueId()
NSString * getTypeAsString()
NSString * getName()
MCSourceType getType()
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
Responsible for building a video source object.
Definition source.h:141
MCVideoSource * build()
Responsible for managing video sources.
Definition source.h:113
NSArray< MCVideoCapabilities * > * getCapabilities()
typedef NS_CLOSED_ENUM(NSInteger, MCSourceType)
The Source type.
Definition source.h:23
Manages the process of capturing the source by input sources, such as a microphone or a camera.
Definition source.h:82
Manages audio settings.
Definition source.h:154
Responsible for managing playback devices.
Definition source.h:99