pub struct StreamRx { /* private fields */ }
Expand description
Incoming encoded stream.
A stream is a primary SSRC + optional RTX SSRC.
This is RTP level API. For sample level API see Rtc::writer
.
Implementations§
Source§impl StreamRx
impl StreamRx
Sourcepub fn rid(&self) -> Option<Rid>
pub fn rid(&self) -> Option<Rid>
Rid for this stream.
This is used to separate streams with the same Mid
when using simulcast.
Sourcepub fn cname(&self) -> Option<&str>
pub fn cname(&self) -> Option<&str>
CNAME as sent by remote peer in a Sdes.
The value is None until we receive a first report with the value set.
Sourcepub fn set_pause_threshold(&mut self, t: Duration)
pub fn set_pause_threshold(&mut self, t: Duration)
Set threshold duration for emitting the paused event.
This event is emitted when no packet have received for this duration.
Sourcepub fn request_keyframe(&mut self, kind: KeyframeRequestKind)
pub fn request_keyframe(&mut self, kind: KeyframeRequestKind)
Request a keyframe for an incoming encoded stream.
- SSRC the identifier of the remote encoded stream to request a keyframe for.
- kind PLI or FIR.
Sourcepub fn request_remb(&mut self, bitrate: Bitrate)
pub fn request_remb(&mut self, bitrate: Bitrate)
Request max recv bitrate for an incoming encoded stream.
- bitrate Bitrate.
Sourcepub fn suppress_nack(&mut self, suppress: bool)
pub fn suppress_nack(&mut self, suppress: bool)
Suppress NACK sending.
Normally NACK is disabled by not having an RTX SSRC set. In some situations it might be desirable to manually suppress NACK sending regardless of RTX setting.
Sourcepub fn reset_roc(&mut self, roc: u64)
pub fn reset_roc(&mut self, roc: u64)
Reset the current rollover counter (ROC).
This is used in scenarios where we use a single sequence number across all receivers of the same stream (as opposed to a sequence number unique per peer).
Receivers joining an on-going session MUST be given the current ROC value using out-of-band signaling such as key-management signaling. Furthermore, the receiver SHALL initialize s_l to the RTP sequence number (SEQ) of the first observed SRTP packet (unless the initial value is provided by out of band signaling such as key management).