pub struct CodecInfo {
pub name: String,
pub clock_rate_hz: u32,
pub channels: u8,
pub fmtp: Option<String>,
}Expand description
Legacy flat-fields codec entry — used internally by SIP/RTP adapters
that need the parsed clock_rate_hz / channels numbers directly.
Bridges to/from Codec (the spec wire shape) via From/TryFrom.
Fields§
§name: String§clock_rate_hz: u32§channels: u8§fmtp: Option<String>Implementations§
Source§impl CodecInfo
impl CodecInfo
Sourcepub fn from_name_with_defaults(name: &str) -> CodecInfo
pub fn from_name_with_defaults(name: &str) -> CodecInfo
Build a CodecInfo from just the codec name, using
standards-defined defaults for clock_rate_hz / channels.
Used by the multi-party fanout path (plan B1) where the wire
catalog only records the chosen codec name; richer params would
require carrying the full negotiation result through more layers.
Falls back to the name/48k/mono shape for codecs not in the
table — fanout still works, the client just sees an audio stream
it may or may not be able to decode (B2 codec-mismatch refusal
is the right place to surface that).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodecInfo
impl<'de> Deserialize<'de> for CodecInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodecInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodecInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CodecInfo
Source§impl Serialize for CodecInfo
impl Serialize for CodecInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CodecInfo
Auto Trait Implementations§
impl Freeze for CodecInfo
impl RefUnwindSafe for CodecInfo
impl Send for CodecInfo
impl Sync for CodecInfo
impl Unpin for CodecInfo
impl UnsafeUnpin for CodecInfo
impl UnwindSafe for CodecInfo
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.