pub struct SdpMediaSection { /* private fields */ }Expand description
One m= section of an SDP offer, whatever its port or media type.
Sections that contribute nothing to a codec string are retained all the same:
a port-0 section is the offer’s held or declined stream and is exactly what a
reader needs when a call has no audio. is_negotiable
separates the two.
Implementations§
Source§impl SdpMediaSection
impl SdpMediaSection
Sourcepub fn media_type(&self) -> &SdpMediaType
pub fn media_type(&self) -> &SdpMediaType
The media type from the m= line.
Sourcepub fn formats(&self) -> &str
pub fn formats(&self) -> &str
The m= format list, verbatim — the only content a non-RTP section carries.
Sourcepub fn direction(&self) -> SdpDirection
pub fn direction(&self) -> SdpDirection
The direction the peer wrote, defaulting to the session’s.
Sofia forces a port-0 section to inactive regardless, so on a held section this is what was offered, not what the switch acted on.
Sourcepub fn entries(&self) -> &[SdpCodecEntry]
pub fn entries(&self) -> &[SdpCodecEntry]
Codec entries in m= format-list order.
Sourcepub fn unmapped(&self) -> &[UnmappedPayload]
pub fn unmapped(&self) -> &[UnmappedPayload]
Payload types this section named that could not be resolved to a codec.
Sourcepub fn non_codec_payloads(&self) -> &[NonCodecPayload]
pub fn non_codec_payloads(&self) -> &[NonCodecPayload]
Payloads the switch negotiates outside the codec string, in format-list order.
Not deduplicated. See NonCodecPayload for what the switch itself retains.
Sourcepub fn is_negotiable(&self) -> bool
pub fn is_negotiable(&self) -> bool
Whether this section feeds the codec string and the top-level views.