pub struct RemoteMedia {
pub addr: IpAddr,
pub port: u16,
pub payload_type: u8,
pub codec: Option<AudioCodec>,
pub opus_payload_type: Option<u8>,
pub dtmf_events: Vec<DtmfSpec>,
}Expand description
Remote media info extracted from an SDP body.
Fields§
§addr: IpAddrRemote IP from the c= line.
port: u16Remote RTP port from the m=audio line.
payload_type: u8First (preferred) RTP payload type from the m=audio line, raw.
Kept for logging/diagnostics; consumers should act on [codec]
(Self::codec), which resolves dynamic payload types.
codec: Option<AudioCodec>The first payload type on the m=audio line that resolves to a
codec this stack knows (static 0/8, or a dynamic PT whose rtpmap
names opus/48000 or PCMU/PCMA). None when the body offers
nothing we understand.
When parsed from an answer this is the negotiated codec.
When parsed from an offer it is only the peer’s first
preference — the selection is ours to make (select_codec).
crate::IncomingCall::accept rewrites this field to the codec
it actually selected, so on an established crate::Call it is
always the negotiated codec.
opus_payload_type: Option<u8>The payload type Opus rides on, if Opus appears anywhere in
the menu (not just first). This is what lets the answer side
prefer Opus over a peer that offers 0 8 111.
dtmf_events: Vec<DtmfSpec>Every telephone-event entry on the m=audio line, in offer
order, with its clock. Use Self::dtmf for “the one that goes
with the negotiated codec”.
Implementations§
Trait Implementations§
Source§impl Clone for RemoteMedia
impl Clone for RemoteMedia
Source§fn clone(&self) -> RemoteMedia
fn clone(&self) -> RemoteMedia
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteMedia
impl Debug for RemoteMedia
impl Eq for RemoteMedia
Source§impl PartialEq for RemoteMedia
impl PartialEq for RemoteMedia
Source§fn eq(&self, other: &RemoteMedia) -> bool
fn eq(&self, other: &RemoteMedia) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RemoteMedia
Auto Trait Implementations§
impl Freeze for RemoteMedia
impl RefUnwindSafe for RemoteMedia
impl Send for RemoteMedia
impl Sync for RemoteMedia
impl Unpin for RemoteMedia
impl UnsafeUnpin for RemoteMedia
impl UnwindSafe for RemoteMedia
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.