MillicastSDK 2.0.0
|
#include <track.h>
Classes | |
struct | Disabled |
struct | MidUpdated |
Public Types | |
enum | Kind { AUDIO , VIDEO } |
Public Member Functions | |
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 WebrtcRemoteVideoTrack * | as_video ()=0 |
virtual WebrtcRemoteAudioTrack * | as_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 |
The webrtc logical track.
This class represents a remote track which was requested by the application for the purpose of implementing advanced projection schemes (like keeping the RTS media projected when they go inactive, or projecting the same RTS media onto multiple tracks).
Once obtained, the track remains valid as long as the viewer is not destroyed.
|
default |
|
pure virtual |
Attach the event handler for the track becoming disabled.
handler | the callback to invoke when the track gets disabled. |
|
pure virtual |
Attach the event handler for frame metadata received on this track.
handler | the callback to invoke when frame metadata is received. |
|
pure virtual |
Attach the event handler for the MID update.
handler | the callback to invoke when the MID is updated. |
|
pure virtual |
Get the audio track interface.
|
pure virtual |
Get the video track interface.
|
pure virtual |
|
pure virtual |
Get the current MID of this track.
This function is implemented for convenience of simple applications, but its usage is discouraged. The applications requiring to map webrtc stats to specific tracks should maintain a mid:track map, updated based on the mid update events from the tracks. Such an implementation would allow for most efficient mapping of the stats back to the tracks.
|
pure virtual |
Gets the kind.
millicast::WebrtcRemoteTrack::MC_DISABLE_COPY_AND_ASSIGN | ( | WebrtcRemoteTrack | ) |
|
pure virtual |
Unproject this webrtc track.
After unprojection, the service no longer streams media to this track.