#[unsafe(no_mangle)]pub extern "C" fn moq_encode_video_bitrate(
producer: u32,
bitrate: u64,
) -> i32Expand description
Retune a live encoder to bitrate bits per second, taking effect from
roughly the next frame. No keyframe is forced, so this is cheap enough to
drive from a congestion controller.
The configured bitrate is a ceiling on some backends (openh264 rejects a raise
above the rate it opened at), so set bitrate to the highest you will ask
for and adapt downwards from there.
When this encoder was published against a bandwidth allocator, the reservation and follower ceiling move with it, so a later grant cannot retune above this value.
Returns a negative code if this backend cannot retune while running. That is not fatal: the encoder keeps running at its current rate, so stop adapting rather than stop publishing.