#[non_exhaustive]pub enum LocalKeyFrameRequest {
PacerDiscard,
PacerFlush,
RepairGivenUp,
}Expand description
Why an interceptor of this crate asked the application for a key frame itself: the
Picture Loss Indication it puts on the read leg (sender SSRC 0, marked
Attribute::DeliverToApplication) carries this as Attribute::Custom, so whoever
reads it can tell it from a request the remote peer sent. Read it with
AttributedPacket::custom; a PLI or FIR without it came
from the network.
The origin rides with the packet from where it is made, rather than being guessed from the
sender SSRC: an SSRC is a random 32-bit number (RFC 3550 section 8.1), 0 included, so a
remote peer may send a PLI with sender SSRC 0, and that one is still the peer’s. The peer connection reads it into
RTCPeerConnectionEvent::OnKeyFrameRequestOrigin.
use rtci_interceptor::{Attribute, AttributedPacket, LocalKeyFrameRequest, Packet};
use std::sync::Arc;
let notice = AttributedPacket::new(Packet::Rtcp(vec![]))
.with(Attribute::Custom(Arc::new(LocalKeyFrameRequest::PacerDiscard)));
assert_eq!(
Some(&LocalKeyFrameRequest::PacerDiscard),
notice.custom::<LocalKeyFrameRequest>()
);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PacerDiscard
The pacer discarded a frame of the stream (PacerDiscard, outside a flush): the
receiver will miss it, and the next picture it can decode is a key frame.
PacerFlush
The pacer gave its queue up at a collapse of the target (PacerFlush): for every
video stream, whether it had media queued (then a PacerDiscard came first) or not
(its repairs were dropped all the same).
RepairGivenUp
The NACK responder gave the repair of the stream up (a request for a packet too old to be useful, or a repair backlog after a fall of the target): what was sent before is no longer repaired.