pub struct OpusEncoder {
encoder: Option<Audio>,
next_pts: i64,
leftover_data: VecDeque<f32>,
encoded_samples_recv: Option<Receiver<EncodedAudioFrame>>,
encoded_samples_sender: Sender<EncodedAudioFrame>,
capture_timestamps: VecDeque<i64>,
}Fields§
§encoder: Option<Audio>§next_pts: i64§leftover_data: VecDeque<f32>§encoded_samples_recv: Option<Receiver<EncodedAudioFrame>>§encoded_samples_sender: Sender<EncodedAudioFrame>§capture_timestamps: VecDeque<i64>Implementations§
Source§impl OpusEncoder
impl OpusEncoder
fn create_encoder() -> Result<Audio>
Trait Implementations§
Source§impl AudioEncoder for OpusEncoder
impl AudioEncoder for OpusEncoder
fn new() -> Result<Self>where
Self: Sized,
fn process(&mut self, raw_frame: RawAudioFrame) -> Result<()>
fn get_encoder(&self) -> &Option<Audio>
fn drain(&mut self) -> Result<()>
fn drop_encoder(&mut self)
fn reset(&mut self) -> Result<()>
fn get_encoded_recv(&mut self) -> Option<Receiver<EncodedAudioFrame>>
Auto Trait Implementations§
impl Freeze for OpusEncoder
impl !RefUnwindSafe for OpusEncoder
impl Send for OpusEncoder
impl !Sync for OpusEncoder
impl Unpin for OpusEncoder
impl UnsafeUnpin for OpusEncoder
impl !UnwindSafe for OpusEncoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more