pub struct FirCommands { /* private fields */ }Expand description
The FIR commands an endpoint sends (RFC 5104 section 4.3.1): each new command for a media sender takes the next command sequence number (modulo 256), a repetition keeps it, and the “SSRC of media source” field of the packet is zero, the target being in the FCI.
The application decides when a request is new (it needs another key frame) and when it is repeating one that has not been answered; this keeps the numbers.
use rtci_interceptor::FirCommands;
let mut commands = FirCommands::new();
let first = commands.request(0x1111, 0x2222);
let again = commands.repeat(0x1111, 0x2222).unwrap();
let next = commands.request(0x1111, 0x2222);
assert_eq!(first.fir[0].sequence_number, again.fir[0].sequence_number);
assert_eq!(
first.fir[0].sequence_number.wrapping_add(1),
next.fir[0].sequence_number
);
assert_eq!(0, first.media_ssrc);Implementations§
Source§impl FirCommands
impl FirCommands
Sourcepub fn request(&mut self, sender_ssrc: u32, media_ssrc: u32) -> FullIntraRequest
pub fn request(&mut self, sender_ssrc: u32, media_ssrc: u32) -> FullIntraRequest
A new command for the media sender media_ssrc, from sender_ssrc.
Trait Implementations§
Source§impl Clone for FirCommands
impl Clone for FirCommands
Source§impl Debug for FirCommands
impl Debug for FirCommands
Auto Trait Implementations§
impl Forget for FirCommands
impl Freeze for FirCommands
impl Move for FirCommands
impl RefUnwindSafe for FirCommands
impl Send for FirCommands
impl Sync for FirCommands
impl Unpin for FirCommands
impl UnsafeUnpin for FirCommands
impl UnwindSafe for FirCommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more