pub struct Bridge { /* private fields */ }Expand description
Two calls connected so each hears the other.
Dropping it stops the forwarding. Both directions are separate tasks, and either ending — because its session stopped, or because the far end went away — takes the whole bridge with it: half a bridge is a call where one party can hear and the other cannot, which is worse than a call that has ended.
Implementations§
Source§impl Bridge
impl Bridge
Sourcepub fn connect(one: Arc<MediaSession>, two: Arc<MediaSession>) -> Self
pub fn connect(one: Arc<MediaSession>, two: Arc<MediaSession>) -> Self
Connect two sessions.
Sourcepub fn is_transcoding(&self) -> bool
pub fn is_transcoding(&self) -> bool
Whether audio is being decoded and re-encoded rather than passed through.
Reported rather than inferred. Transcoding costs quality as well as CPU, and a caller that cares can renegotiate; one that cannot see it happening has no reason to.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Whether both directions are still running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bridge
impl RefUnwindSafe for Bridge
impl Send for Bridge
impl Sync for Bridge
impl Unpin for Bridge
impl UnsafeUnpin for Bridge
impl UnwindSafe for Bridge
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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