MillicastSDK 2.0.0
|
#include <track.h>
Classes | |
struct | Active |
struct | Inactive |
struct | Layers |
Public Types | |
using | MidUpdated = WebrtcRemoteTrack::MidUpdated |
using | Kind = WebrtcRemoteTrack::Kind |
Public Member Functions | |
RtsRemoteTrack ()=default | |
MC_DISABLE_COPY_AND_ASSIGN (RtsRemoteTrack) | |
virtual EventConnectionPtr | add_event_handler (EventHandler< Active > &&handler)=0 |
virtual EventConnectionPtr | add_event_handler (EventHandler< Inactive > &&handler)=0 |
virtual EventConnectionPtr | add_event_handler (EventHandler< Layers > &&handler)=0 |
virtual EventConnectionPtr | add_event_handler (EventHandler< MidUpdated > &&handler)=0 |
virtual EventConnectionPtr | add_event_handler (EventHandler< FrameMetadata > &&handler)=0 |
virtual const std::optional< std::string > & | source_id () const =0 |
virtual Kind | kind () const =0 |
virtual bool | is_active () const =0 |
virtual std::optional< std::string > | get_current_mid () const =0 |
virtual Promise< void > | disable ()=0 |
virtual RtsRemoteVideoTrack * | as_video ()=0 |
virtual RtsRemoteAudioTrack * | as_audio ()=0 |
The RTS logical track.
This class represents a single media (audio or video) in the RTS stream.
The RTS tracks are created automatically when the service notifies about the sources becoming active, can be used to enable simple streaming scenarios: enable projection of the audio and video coming from the same source with lip-sync, with a single video renderer attached to the video track. When the RTS source goes inactive, streaming for them is automatically disabled.
The event for updating the MID of the internal webrtc track used by this RTS track.
|
default |
|
pure virtual |
Attach the event handler for the track entering the active state.
handler | the callback to invoke when the track goes active. |
|
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 track entering the inactive state.
handler | the callback to invoke when the track goes inactive. |
|
pure virtual |
Attach the event handler for the track layers update.
handler | the callback to invoke when the layer info is updated. |
|
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 |
Disable the RTS track.
This function unprojects the default track, and removes the renderer in case of video tracks. Disabling RTS track does not unproject it from any custom webrtc tracks which might have been projected separately.
|
pure virtual |
Get the current MID of the default webrtc track used by this RTS 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 |
|
pure virtual |
Get the kind (audio or video) of this track.
millicast::RtsRemoteTrack::MC_DISABLE_COPY_AND_ASSIGN | ( | RtsRemoteTrack | ) |
|
pure virtual |
Get the RTS source ID of this track.
RTS tracks with the same source ID use the internal webrtc tracks with the same stream names, causing lip-sync for audio and video tracks.