MillicastSDK 2.2.0
Loading...
Searching...
No Matches
MCWebrtcRemoteVideoTrack Class Reference

The webrtc logical track's video interface. More...

#include <webrtc_remote_track.h>

Inheritance diagram for MCWebrtcRemoteVideoTrack:
Collaboration diagram for MCWebrtcRemoteVideoTrack:

Instance Methods

(void) - projectWithRTSRemoteVideoTrack:layer:promote:completionHandler:
 
(void) - projectWithRTSRemoteVideoTrack:layer:completionHandler:
 
(void) - projectWithRTSRemoteVideoTrack:completionHandler:
 
(void) - currentProjectionWithCompletionHandler:
 
- Instance Methods inherited from MCWebrtcRemoteTrack
(MCWebrtcRemoteAudioTrack *_Nullable) - asAudio
 
(MCWebrtcRemoteVideoTrack *_Nullable) - asVideo
 
(void) - unprojectWithCompletionHandler:
 
(void) - cancelAsyncStreamAdapter [implementation]
 

Properties

millicast::WebrtcRemoteVideoTracknativeHandle [implementation]
 
- Properties inherited from MCWebrtcRemoteTrack
id< MCWebrtcRemoteTrackDelegate > _Nullable delegate
 Delegate to receive track related events.
 
MCRemoteTrackKind kind
 Either an Audio or Video track.
 
NSString *_Nonnull currentMID
 
NSString *_Nonnull cName
 The cname of the track. Cname represents a grouping for synchronization purposes.
 

Additional Inherited Members

- Class Methods inherited from MCWebrtcRemoteTrack
(instancetype _Nonnull) + webrtcRemoteTrackWithNativeTrack: [implementation]
 

Detailed Description

The webrtc logical track's video interface.

Method Documentation

◆ currentProjectionWithCompletionHandler:

- (void) currentProjectionWithCompletionHandler: (nonnull void(^)(MCRTSRemoteVideoTrack *_Nullable, NSError *_Nullable)) completionHandler

Attach a renderer to this track so it receives frames when projected.

  • Parameters:
    • renderer: You can choose from MCAcceleratedVideoRenderer / or MCCMSampleBufferVideoRenderer which are directly attachable to Views. Otherwise, if you have a specific / usecase for receiving video frames and managing them yourself, then you can implement your own MCVideoRenderer / - completionHandler: Invoked when the asynchronous operation completes.

(void)addRenderer:(id<MCVideoRenderer> _Nonnull)renderer completionHandler:(nonnull void (^)(NSError * _Nullable))completionHandler NS_SWIFT_NAME(addRenderer(_:completionHandler:));

/ Remove a previously attached video renderer. / - Parameters: / - renderer: The renderer to remove. / - completionHandler: Invoked when the asynchronous operation completes.

  • (void)removeRenderer:(id<MCVideoRenderer> _Nonnull)renderer completionHandler:(nonnull void (^)(NSError * _Nullable))completionHandler NS_SWIFT_NAME(removeRenderer(_:completionHandler:));

/ Get the RTS track which is currently projected onto this webrtc track. / / Note: properly written applicatioprojectWithRTSRemoteVideoTrack:layer:promote:completionHandler:nous status / of the MCWebrtcRemoteVideoTrack/projectWithRTSRemoteVideoTrack operation only.

  • Parameters:
    • completionHandler: Invoked when the asynchronous operation completes. On error, the track returned will be nil and the error parameter will be set appropriately. Otherwise, a non-nulll remote track will be returned if the current track is projected. Otherwise, nil is returned.

◆ projectWithRTSRemoteVideoTrack:completionHandler:

- (void) projectWithRTSRemoteVideoTrack: (MCRTSRemoteVideoTrack *_Nonnull) rtsRemoteVideoTrack
completionHandler: (project(rtsRemoteVideoTrack:completionHandler:)) NS_SWIFT_NAME 

Enable the track and project from given RTS track, with default promote and layer behaviour.

  • Parameters:
    • rtsRemoteVideoTrack: the RTS track which will be projected onto this webrtc track.
    • completionHandler: Invoked when the asynchronous operation is finished

◆ projectWithRTSRemoteVideoTrack:layer:completionHandler:

- (void) projectWithRTSRemoteVideoTrack: (MCRTSRemoteVideoTrack *_Nonnull) rtsRemoteVideoTrack
layer: (MCRTSRemoteVideoTrackLayer *_Nonnull) layer
completionHandler: (project(rtsRemoteVideoTrack:layer:completionHandler:)) NS_SWIFT_NAME 

Enable the track and project from given RTS track, with default promote behaviour, which is false.

  • Parameters:
    • rtsRemoteVideoTrack: the RTS track which will be projected onto this webrtc track.
    • layer: layer information. If the default value is passed, the service will allocate layers automatically depending on bandwidth estimation and the priority
    • completionHandler: Invoked when the asynchronous operation is finished

◆ projectWithRTSRemoteVideoTrack:layer:promote:completionHandler:

- (void) projectWithRTSRemoteVideoTrack: (MCRTSRemoteVideoTrack *_Nonnull) rtsRemoteVideoTrack
layer: (MCRTSRemoteVideoTrackLayer *_Nonnull) layer
promote: (BOOL) promote
completionHandler: (project(rtsRemoteVideoTrack:layer:promote:completionHandler:)) NS_SWIFT_NAME 

Enable the track and project from given RTS track.

Note that unlike the simple API for the RTS track, this API is more flexible, but requires more handling by the application. Specifically:

  • this function sets no video renderer. Renderers should be added separately.
  • the track will not be unprojected automatically when the RTS track goes inactive (and will not require repeating project operation when it goes active again)

You can project the same RTS track onto multiple webrtc logical tracks.

  • Parameters:
    • rtsRemoteVideoTrack: the RTS track which will be projected onto this webrtc track.
    • layer: layer information. If the default value is passed, the service will allocate layers automatically depending on bandwidth estimation and the priority
    • promote: Set this track to be the main video track. The main video track has highest priority for bandwidth assignment when SVC layers are managed by the service.
    • completionHandler: Invoked when the asynchronous operation is finished

Property Documentation

◆ nativeHandle

- (WebrtcRemoteVideoTrack* MCWebrtcRemoteVideoTrack()):
readnonatomicassignimplementation

The documentation for this class was generated from the following file: