pub trait RtpPacketBuilder: Send {
// Required method
fn add_frame(
&mut self,
frame: Vec<u8>,
samples: u32,
) -> Result<Vec<Vec<u8>>, Error>;
}
Required Methods§
Sourcefn add_frame(
&mut self,
frame: Vec<u8>,
samples: u32,
) -> Result<Vec<Vec<u8>>, Error>
fn add_frame( &mut self, frame: Vec<u8>, samples: u32, ) -> Result<Vec<Vec<u8>>, Error>
Adds a frame
of audio to the RTP packet, which represents samples
audio samples.
Returns a vector of packets that are ready to be transmitted (which can be empty),
or an Error if the frame could not be added.