pub struct TrackLocalStaticRTP { /* private fields */ }
Expand description

TrackLocalStaticRTP is a TrackLocal that has a pre-set codec and accepts RTP Packets. If you wish to send a media.Sample use TrackLocalStaticSample

Implementations

returns a TrackLocalStaticRTP.

codec gets the Codec of the track

write_rtp_with_extensions writes a RTP Packet to the TrackLocalStaticRTP If one PeerConnection fails the packets will still be sent to all PeerConnections. The error message will contain the ID of the failed PeerConnections so you can remove them

If the RTCRtpSender direction is such that no packets should be sent, any call to this function are blocked internally. Care must be taken to not increase the sequence number while the sender is paused. While the actual sending is blocked, the receiver will miss out when the sequence number “rolls over”, which in turn will break SRTP.

Extensions that are already configured on the packet are overwritten by extensions in extensions.

Trait Implementations

Formats the value using the given formatter. Read more

bind is called by the PeerConnection after negotiation is complete This asserts that the code requested is supported by the remote peer. If so it setups all the state (SSRC and PayloadType) to have a call

unbind implements the teardown logic when the track is no longer needed. This happens because a track has been stopped.

id is the unique identifier for this Track. This should be unique for the stream, but doesn’t have to globally unique. A common example would be ‘audio’ or ‘video’ and StreamID would be ‘desktop’ or ‘webcam’

stream_id is the group this track belongs too. This must be unique

kind controls if this TrackLocal is audio or video

write_rtp writes a RTP Packet to the TrackLocalStaticRTP If one PeerConnection fails the packets will still be sent to all PeerConnections. The error message will contain the ID of the failed PeerConnections so you can remove them

If the RTCRtpSender direction is such that no packets should be sent, any call to this function are blocked internally. Care must be taken to not increase the sequence number while the sender is paused. While the actual sending is blocked, the receiver will miss out when the sequence number “rolls over”, which in turn will break SRTP.

write writes a RTP Packet as a buffer to the TrackLocalStaticRTP If one PeerConnection fails the packets will still be sent to all PeerConnections. The error message will contain the ID of the failed PeerConnections so you can remove them

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.