MillicastSDK 2.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
millicast::WebrtcRemoteVideoTrack Class Referenceabstract

#include <track.h>

Inheritance diagram for millicast::WebrtcRemoteVideoTrack:
Inheritance graph
[legend]
Collaboration diagram for millicast::WebrtcRemoteVideoTrack:
Collaboration graph
[legend]

Public Member Functions

 WebrtcRemoteVideoTrack ()=default
 
 MC_DISABLE_COPY_AND_ASSIGN (WebrtcRemoteVideoTrack)
 
virtual millicast::Promise< void > enable_frame_metadata (bool enabled)=0
 
virtual Promise< void > project (RtsRemoteVideoTrack &rts_track, const RtsRemoteVideoTrack::Layer &layer={}, bool promote=false)=0
 
virtual Promise< void > add_renderer (const std::shared_ptr< VideoRenderer > &renderer)=0
 
virtual Promise< void > remove_renderer (const VideoRenderer *renderer)=0
 
virtual Promise< RtsRemoteVideoTrack * > current_projection ()=0
 
- Public Member Functions inherited from millicast::WebrtcRemoteTrack
 WebrtcRemoteTrack ()=default
 
 MC_DISABLE_COPY_AND_ASSIGN (WebrtcRemoteTrack)
 
virtual Kind kind () const =0
 
virtual Promise< void > unproject ()=0
 
virtual std::optional< std::string > get_current_mid () const =0
 
virtual const std::string & get_cname () const =0
 
virtual WebrtcRemoteVideoTrackas_video ()=0
 
virtual WebrtcRemoteAudioTrackas_audio ()=0
 
virtual EventConnectionPtr add_event_handler (EventHandler< Disabled > &&handler)=0
 
virtual EventConnectionPtr add_event_handler (EventHandler< MidUpdated > &&handler)=0
 
virtual EventConnectionPtr add_event_handler (EventHandler< FrameMetadata > &&handler)=0
 

Additional Inherited Members

- Public Types inherited from millicast::WebrtcRemoteTrack
enum  Kind { AUDIO , VIDEO }
 

Detailed Description

The webrtc logical track's video interface.

Constructor & Destructor Documentation

◆ WebrtcRemoteVideoTrack()

millicast::WebrtcRemoteVideoTrack::WebrtcRemoteVideoTrack ( )
default

Member Function Documentation

◆ add_renderer()

virtual Promise< void > millicast::WebrtcRemoteVideoTrack::add_renderer ( const std::shared_ptr< VideoRenderer > &  renderer)
pure virtual

Add the video renderer.

The track can have multiple renderers set.

Parameters
rendererthe renderer.
Returns
asynchronous status.

◆ current_projection()

virtual Promise< RtsRemoteVideoTrack * > millicast::WebrtcRemoteVideoTrack::current_projection ( )
pure virtual

Get the RTS track which is currently projected onto this webrtc track.

Note: properly written applications should rely on the asynchronous status of the project() operation only.

Returns
asynchronously produced RTS video track which is projected onto this track, or null if not projected.

◆ enable_frame_metadata()

virtual millicast::Promise< void > millicast::WebrtcRemoteVideoTrack::enable_frame_metadata ( bool  enabled)
pure virtual

Enable the reception of frame metadata. Invoke this method so that you can start receiving FrameMetadata events.

Parameters
enabledtrue to enable frame metadata, otherwise false to disable it.
Remarks
make sure to add your event handler through WebrtcRemoteTrack::add_event_handler

◆ MC_DISABLE_COPY_AND_ASSIGN()

millicast::WebrtcRemoteVideoTrack::MC_DISABLE_COPY_AND_ASSIGN ( WebrtcRemoteVideoTrack  )

◆ project()

virtual Promise< void > millicast::WebrtcRemoteVideoTrack::project ( RtsRemoteVideoTrack rts_track,
const RtsRemoteVideoTrack::Layer layer = {},
bool  promote = false 
)
pure virtual

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
rts_trackthe RTS track which will be projected onto this webrtc track.
layerlayer information. If the default value is passed, the service will allocate layers automatically depending on bandwidth estimation and the priority
promoteset 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.
Returns
asynchronous status.

◆ remove_renderer()

virtual Promise< void > millicast::WebrtcRemoteVideoTrack::remove_renderer ( const VideoRenderer renderer)
pure virtual

Remove the video renderer.

Parameters
rendererthe renderer.
Returns
asynchronous status.

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