#[non_exhaustive]pub enum EncoderFeedback {
KeyFrameRequest,
RateUpdate {
bitrate_bps: u32,
framerate_fps: f64,
},
}Expand description
Feedback from the BWE / rate-control machinery for a custom-encoded
(TrackVideoEncoder) track’s encoder instance. The builtin encoder
pipeline consumes the same signals internally; custom encoders hear them
here through [VideoTrack::on_encoder_feedback] /
EncodedVideoTrack::on_encoder_feedback.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KeyFrameRequest
The remote peer (or libwebrtc’s recovery logic) asked for a key frame —
PLI/FIR routed by the media engine. You must answer with an IDR
promptly (EncodedVideoFrame::is_key_frame = true on the pre-encoded
path; produce a key frame from your encoder on the inline path) or new
receivers wait a whole GOP for decodable video.
RateUpdate
The congestion controller’s current allocation for this encoder:
adapt your own encoder’s target to match. Fires on BWE changes and
PeerConnection::set_bitrate calls.