pub struct RtcCodecStats {
pub payload_type: u32,
pub transport_id: String,
pub mime_type: String,
pub clock_rate: Option<u32>,
pub channels: Option<u32>,
pub sdp_fmtp_line: Option<String>,
}Expand description
Codecs are created when registered for an RTP transport, but only the subset of codecs that are in use (referenced by an RTP stream) are exposed in getStats().
The RtcCodecStats object is created when one or more
RtcRtpStreamStats::codec_id references the codec. When there no longer
exists any reference to the RtcCodecStats, the stats object is deleted.
If the same codec is used again in the future, the RtcCodecStats object
is revived with the same StatId as before.
Codec objects may be referenced by multiple RTP streams in media sections
using the same transport, but similar codecs in different transports have
different RtcCodecStats objects.
Fields§
§payload_type: u32Payload type as used in RTP encoding or decoding.
transport_id: StringUnique identifier of the transport on which this codec is being used,
which can be used to look up the corresponding RtcTransportStats
object.
mime_type: StringCodec MIME media type/subtype defined in the IANA media types registry
IANA-MEDIA-TYPES, e.g. video/VP8.
clock_rate: Option<u32>Media sampling rate.
channels: Option<u32>Number of channels (mono=1, stereo=2).
sdp_fmtp_line: Option<String>The “format specific parameters” field from the a=fmtp line in the
SDP corresponding to the codec, if one exists, as
defined by RFC8829.
Trait Implementations§
Source§impl Clone for RtcCodecStats
impl Clone for RtcCodecStats
Source§fn clone(&self) -> RtcCodecStats
fn clone(&self) -> RtcCodecStats
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RtcCodecStats
impl Debug for RtcCodecStats
Source§impl<'de> Deserialize<'de> for RtcCodecStats
impl<'de> Deserialize<'de> for RtcCodecStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for RtcCodecStats
impl Hash for RtcCodecStats
Source§impl PartialEq for RtcCodecStats
impl PartialEq for RtcCodecStats
Source§impl Serialize for RtcCodecStats
impl Serialize for RtcCodecStats
impl Eq for RtcCodecStats
impl StructuralPartialEq for RtcCodecStats
Auto Trait Implementations§
impl Freeze for RtcCodecStats
impl RefUnwindSafe for RtcCodecStats
impl Send for RtcCodecStats
impl Sync for RtcCodecStats
impl Unpin for RtcCodecStats
impl UnwindSafe for RtcCodecStats
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)