Skip to content

Commit

Permalink
feat(sdp-types): add RTP/AVPF variant to TransportProtocol
Browse files Browse the repository at this point in the history
  • Loading branch information
kbalt committed Jan 26, 2025
1 parent 3d2da91 commit 6ffa4fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/sdp-types/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub enum TransportProtocol {
/// RTP over UDP
RtpAvp,

/// RTP with [RFC4585](https://www.rfc-editor.org/rfc/rfc4585.html)
RtpAvpf,

/// SRTP over UDP
RtpSavp,

Expand All @@ -73,6 +76,7 @@ impl TransportProtocol {
alt((
map(tag("udp"), |_| TransportProtocol::Unspecified),
map(tag("RTP/AVP"), |_| TransportProtocol::RtpAvp),
map(tag("RTP/AVPF"), |_| TransportProtocol::RtpAvpf),
map(tag("RTP/SAVP"), |_| TransportProtocol::RtpSavp),
map(tag("RTP/SAVPF"), |_| TransportProtocol::RtpSavpf),
map(tag("UDP/TLS/RTP/SAVP"), |_| {
Expand All @@ -94,6 +98,7 @@ impl fmt::Display for TransportProtocol {
match self {
TransportProtocol::Unspecified => f.write_str("udp"),
TransportProtocol::RtpAvp => f.write_str("RTP/AVP"),
TransportProtocol::RtpAvpf => f.write_str("RTP/AVPF"),
TransportProtocol::RtpSavp => f.write_str("RTP/SAVP"),
TransportProtocol::RtpSavpf => f.write_str("RTP/SAVPF"),
TransportProtocol::UdpTlsRtpSavp => f.write_str("UDP/TLS/RTP/SAVP"),
Expand Down

0 comments on commit 6ffa4fd

Please sign in to comment.