Expand description
The whole session description, plus the well-known attribute keys. The session description — a whole SDP document.
A SessionDescription is the session-level fields (v=, o=, s=, t=, …) followed by
any number of MediaDescriptions. unmarshal parses one
from a string and marshal prints it back; the round trip is faithful, including attributes
this crate does not interpret.
The ATTR_KEY_* constants name the a= attributes WebRTC relies on — mid, msid,
setup, rtcp-mux, extmap and the direction flags — and the SEMANTIC_TOKEN_* constants
name the grouping semantics used with a=group and a=msid-semantic.
Structs§
- Origin
- Origin defines the structure for the “o=” field which provides the originator of the session plus a session identifier and version number.
- Parse
Options - What
SessionDescription::unmarshal_with_optionsaccepts beyond the RFC 8866 grammar. - Repeat
Time - RepeatTime describes the “r=” fields of the session description which represents the intervals and durations for repeated scheduled sessions.
- SdpDecimal
- A decimal number of any length,
1*DIGIT: the<sess-id>and<sess-version>of ano=line (RFC 8866 section 9). The grammar sets no upper bound, so a compliant description may carry values beyond 64 bits (RFC 9429 section 5.2.1 has a JSEP endpoint generate them within 64 bits, and section 5.8 has it accept compliant SDP that does not follow its generation rules). - SdpParse
Error - A description that does not parse, and where: what
SessionDescription::parse_locatedreturns. - Session
Description - SessionDescription is a a well-defined format for conveying sufficient information to discover and participate in a multimedia session.
- Time
Description - TimeDescription describes the “t=”, “r=” and “z=” fields of the session description, which specify the start and stop times of a session, its repeat intervals and durations, and the time zone adjustments of those repetitions.
- Time
Zone - TimeZone is one
<adjustment time> <offset>pair of a “z=” line, which describes repeated sessions scheduling. - Timing
- Timing defines the “t=” field’s structured representation for the start and stop times.
Enums§
- Charset
- The character set of a description’s charset-dependent fields (
s=,i=), from itsa=charset(RFC 8866 section 6.10).
Constants§
- ATTR_
KEY_ BUNDLE_ ONLY a=bundle-only: the section is used only inside its BUNDLE group (RFC 9143).- ATTR_
KEY_ CANDIDATE - Constants for SDP attributes used in JSEP
- ATTR_
KEY_ CHARSET - The
a=charsetattribute (RFC 8866 section 6.10). - ATTR_
KEY_ CONNECTION_ SETUP a=setup: the DTLS role —active,passiveoractpass.- ATTR_
KEY_ CONTENT a=content: what a media stream shows (RFC 4796).- ATTR_
KEY_ CRYPTEX a=cryptex: RTP header extensions and CSRCs are encrypted (RFC 9335).- ATTR_
KEY_ END_ OF_ CANDIDATES a=end-of-candidates: ICE gathering for this section is complete.- ATTR_
KEY_ EXTMAP_ ALLOW_ MIXED a=extmap-allow-mixed: one- and two-byte header extensions may be mixed.- ATTR_
KEY_ EXT_ MAP a=extmap: maps an RTP header-extension URI to an id.- ATTR_
KEY_ FINGERPRINT a=fingerprint: a certificate fingerprint (RFC 8122).- ATTR_
KEY_ FMTP a=fmtp: format-specific parameters.- ATTR_
KEY_ FRAMERATE a=framerate: the maximum video frame rate.- ATTR_
KEY_ GROUP a=group: groups m-lines, as BUNDLE does.- ATTR_
KEY_ ICELITE a=ice-lite: the endpoint is an ICE-lite implementation.- ATTR_
KEY_ ICE_ OPTIONS a=ice-options: the ICE options the agent supports.- ATTR_
KEY_ ICE_ PACING a=ice-pacing: the ICE pacing interval, in milliseconds.- ATTR_
KEY_ ICE_ PWD a=ice-pwd: the ICE password.- ATTR_
KEY_ ICE_ UFRAG a=ice-ufrag: the ICE user name fragment.- ATTR_
KEY_ IDENTITY a=identity: an identity assertion for the session.- ATTR_
KEY_ IMAGEATTR a=imageattr: image sizes a payload type sends or receives (RFC 6236).- ATTR_
KEY_ INACTIVE a=inactive: neither send nor receive.- ATTR_
KEY_ MAXPTIME a=maxptime: the longest packet duration, in milliseconds.- ATTR_
KEY_ MAX_ MESSAGE_ SIZE a=max-message-size: the largest SCTP message this endpoint accepts.- ATTR_
KEY_ MID a=mid: the media identification tag that names this m-line.- ATTR_
KEY_ MSID a=msid: associates a track with a media stream.- ATTR_
KEY_ MSID_ SEMANTIC a=msid-semantic: declares the semantics used bya=msid.- ATTR_
KEY_ PTIME a=ptime: the preferred packet duration, in milliseconds.- ATTR_
KEY_ RECV_ ONLY a=recvonly: receive only.- ATTR_
KEY_ REMOTE_ CANDIDATES a=remote-candidates: the remote candidates the controlling agent selected.- ATTR_
KEY_ RID a=rid: an RTP stream identifier and its restrictions (RFC 8851).- ATTR_
KEY_ RTCP a=rtcp: the RTCP port and address (RFC 3605).- ATTR_
KEY_ RTCPMUX a=rtcp-mux: RTP and RTCP share one port.- ATTR_
KEY_ RTCPMUX_ ONLY a=rtcp-mux-only: RTP and RTCP share one port and nothing else is supported (RFC 8858).- ATTR_
KEY_ RTCPRSIZE a=rtcp-rsize: reduced-size RTCP is supported.- ATTR_
KEY_ RTCP_ FB a=rtcp-fb: an RTCP feedback capability (RFC 4585).- ATTR_
KEY_ RTCP_ XR a=rtcp-xr: RTCP extended reports (RFC 3611).- ATTR_
KEY_ RTPMAP a=rtpmap: the codec of a payload type.- ATTR_
KEY_ SCTPMAP a=sctpmap: the SCTP association of an old-style data section (draft-ietf-mmusic-sctp-sdp-05; replaced bya=sctp-port).- ATTR_
KEY_ SCTP_ PORT a=sctp-port: the SCTP port (RFC 8841).- ATTR_
KEY_ SEND_ ONLY a=sendonly: send only.- ATTR_
KEY_ SEND_ RECV a=sendrecv: send and receive.- ATTR_
KEY_ SIMULCAST a=simulcast: the simulcast streams of a media section (RFC 8853).- ATTR_
KEY_ SSRC a=ssrc: declares an SSRC and its attributes.- ATTR_
KEY_ SSRC_ GROUP a=ssrc-group: relates SSRCs, such as an RTX stream to its primary.- ATTR_
KEY_ TLS_ ID a=tls-id: the DTLS association identifier (RFC 8842).- MAX_
ATTRIBUTES_ PER_ SECTION - The most
a=linesSessionDescription::unmarshalaccepts at the session level, and in eachm=section. - MAX_
FORMATS_ PER_ MEDIA - The most formats
SessionDescription::unmarshalaccepts on onem=line. RTP payload types are 7 bits, so 128 distinct values exist. - MAX_
MEDIA_ DESCRIPTIONS - The most
m=sectionsSessionDescription::unmarshalaccepts in one session description. - MAX_
SDP_ LINES - The most lines
SessionDescription::unmarshalaccepts in one session description. - MAX_
SDP_ SIZE - The largest session description, in bytes,
SessionDescription::unmarshalaccepts. Real offers and answers are a few to a few hundred kilobytes. - NTP_
UNIX_ EPOCH_ OFFSET_ SECS - The seconds from the NTP epoch (1900-01-01 UTC) to the Unix epoch: RFC 8866 section 5.2
recommends “a timestamp, in seconds since January 1, 1900 UTC” for
<sess-id>and, “as with”, for <sess-version>. - SEMANTIC_
TOKEN_ BUNDLE BUNDLE: the m= sections share one transport (RFC 9143).- SEMANTIC_
TOKEN_ FLOW_ IDENTIFICATION FID: flow identification — the SSRCs carry the same content, as RTX does.- SEMANTIC_
TOKEN_ FORWARD_ ERROR_ CORRECTION FEC: one SSRC carries error-correction data for another.- SEMANTIC_
TOKEN_ FORWARD_ ERROR_ CORRECTION_ FRAMEWORK FEC-FR: the FEC framework grouping semantic.- SEMANTIC_
TOKEN_ LIP_ SYNCHRONIZATION - Constants for semantic tokens used in JSEP
- SEMANTIC_
TOKEN_ WEBRTC_ MEDIA_ STREAMS WMS: WebRTC media streams, used witha=msid-semantic.
Type Aliases§
- Email
Address - EmailAddress describes a structured representations for the “e=” line which specifies email contact information for the person responsible for the conference.
- Phone
Number - PhoneNumber describes a structured representations for the “p=” line specify phone contact information for the person responsible for the conference.
- Session
Name - SessionName describes a structured representations for the “s=” field and is the textual session name.
- Version
- Version describes the value provided by the “v=” field which gives the version of the Session Description Protocol.