MillicastSDK 2.0.0
Loading...
Searching...
No Matches
rts_remote_track.h
Go to the documentation of this file.
1#ifndef rts_remote_track_h
2#define rts_remote_track_h
3
5
6@protocol MCVideoRenderer;
7
11
12// MARK: -
13
17@property(nonatomic, readonly) int width;
19@property(nonatomic, readonly) int height;
20- (instancetype _Nonnull)init NS_UNAVAILABLE;
21@end
22
25
26@property(nonatomic, readonly) NSString * _Nonnull encodingId;
27@property(nonatomic, readonly) int bitrate;
28
29@property(nonatomic, readonly) NSNumber * _Nullable spatialLayerId;
30@property(nonatomic, readonly) NSNumber * _Nullable temporalLayerId;
31@property(nonatomic, readonly) NSNumber * _Nullable maxSpatialLayerId;
32@property(nonatomic, readonly) NSNumber * _Nullable maxTemporalLayerId;
33@property(nonatomic, readonly) NSNumber * _Nullable targetBitrate;
34@property(nonatomic, readonly) NSNumber * _Nullable targetFps;
35@property(nonatomic, readonly) NSNumber * _Nullable targetHeight;
36@property(nonatomic, readonly) NSNumber * _Nullable targetWidth;
37@property(nonatomic, readonly) MCRTSRemoteVideoTrackLayerResolution * _Nullable resolution;
38
39@end
40
46
48@property(nonatomic, readonly) NSArray<MCRTSRemoteTrackLayer *> * _Nonnull active;
51@property(nonatomic, readonly) NSArray<NSString *> * _Nonnull inactive;
52
53- (instancetype _Nonnull)init NS_UNAVAILABLE;
54
55@end
56
58@protocol MCRTSRemoteTrackDelegate <NSObject>
59
60@optional
71- (void)rtsRemoteTrackActive:(MCRTSRemoteTrack * _Nonnull)rtsRemoteTrack;
72
73@optional
84- (void)rtsRemoteTrackInactive:(MCRTSRemoteTrack * _Nonnull)rtsRemoteTrack;
85
86@optional
92- (void) rtsRemoteTrack:(MCRTSRemoteTrack * _Nonnull) rtsRemoteTrack
93 didUpdateLayers:(MCRTSRemoteTrackLayers * _Nonnull) rtsRemoteTrackLayers
94 NS_SWIFT_NAME(rtsRemoteTrack(_:didUpdateLayers:));
95
96@optional
104- (void) rtsRemoteTrack:(MCRTSRemoteTrack * _Nonnull) rtsRemoteTrack
105 didUpdateMID:(NSString * _Nullable) mid
106 NS_SWIFT_NAME(rtsRemoteTrack(_:didUpdateMID:));
107
108@end
109
110
118MILLICAST_API @interface MCRTSRemoteTrack : NSObject
119
121@property(atomic, weak) id<MCRTSRemoteTrackDelegate> _Nullable delegate;
122
124@property(nonatomic, readonly) NSString * _Nullable sourceID;
126@property(nonatomic, assign, readonly) MCRemoteTrackKind kind;
128@property(nonatomic, assign, readonly) BOOL isActive;
130@property(nonatomic, readonly) NSString * _Nullable currentMID;
131
134- (MCRTSRemoteVideoTrack* _Nullable) asVideo;
135
138- (MCRTSRemoteAudioTrack* _Nullable) asAudio;
139
140- (instancetype _Nonnull)init NS_UNAVAILABLE;
141
145- (void)disableWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
146
147@end
148
149// MARK: -
150
154
159- (instancetype _Nonnull) initWithLayer: (MCRTSRemoteTrackLayer * _Nonnull) layer;
160
162@property(nonatomic, strong) NSString * _Nullable encodingId;
163
165@property(nonatomic, readonly) NSNumber * _Nullable spatialLayerId;
166
170- (void)setSpatialLayerId:(int)spatialLayerId;
171
173- (void)resetSpatialLayerId;
174
176@property(nonatomic, readonly) NSNumber * _Nullable temporalLayerId;
177
181- (void)setTemporalLayerId:(int)temporalLayerId;
182
184- (void)resetTemporalLayerId;
185
187@property(nonatomic, readonly) NSNumber * _Nullable maxSpatialLayerId;
188
192- (void)setMaxSpatialLayerId:(int)maxSpatialLayerId;
193
195- (void)resetMaxSpatialLayerId:(int)maxSpatialLayerId;
196
198@property(nonatomic, readonly) NSNumber * _Nullable maxTemporalLayerId;
199
203- (void)setMaxTemporalLayerId:(int)maxTemporalLayerId;
204
206- (void)resetMaxTemporalLayerId;
207@end
208
211
212- (instancetype _Nonnull)init NS_UNAVAILABLE;
213
226- (void)enableWithRenderer:(id<MCVideoRenderer> _Nonnull)renderer
227 layer:(MCRTSRemoteVideoTrackLayer * _Nonnull)layer
228 promote:(BOOL)promote
229 completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler
230 NS_SWIFT_NAME(enable(renderer:layer:promote:completionHandler:));
231
239- (void)enableWithRenderer:(id<MCVideoRenderer> _Nonnull)renderer
240 promote:(BOOL)promote
241 completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler
242 NS_SWIFT_NAME(enable(renderer:promote:completionHandler:));
243
251- (void)enableWithRenderer:(id<MCVideoRenderer> _Nonnull)renderer
252 layer:(MCRTSRemoteVideoTrackLayer * _Nonnull)layer
253 completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler
254 NS_SWIFT_NAME(enable(renderer:layer:completionHandler:));
255
260- (void)enableWithRenderer:(id<MCVideoRenderer> _Nonnull)renderer
261 completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler
262 NS_SWIFT_NAME(enable(renderer:completionHandler:));
263@end
264
265// MARK: -
266
269
270- (instancetype _Nonnull)init NS_UNAVAILABLE;
271
275- (void)enableWithCompletionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler;
276
285- (void)setVolume:(double)volume
286completionHandler:(nonnull void (^)(NSError * _Nullable)) completionHandler
287 NS_SWIFT_NAME(setVolume(_:completionHandler:));
288
289@end
290
291#endif /* rts_remote_track_h */
#define MILLICAST_API
Definition exports.h:51
The RTS logical track's audio interface.
Definition rts_remote_track.h:269
Definition rts_remote_track.h:119
Represents an layer entry in the layers event received by the media server.
Definition rts_remote_track.h:25
Definition rts_remote_track.h:46
The RTS logical track's video interface.
Definition rts_remote_track.h:211
Definition rts_remote_track.h:154
Represents resolution of a video frame.
Definition rts_remote_track.h:16
int width
Width in pixels.
Definition rts_remote_track.h:17
int height
Height in pixels.
Definition rts_remote_track.h:19
instancetype _Nonnull NS_UNAVAILABLE()