xmpp-parsers: Fix the type of jingle_rtp/ssrc to u32
XEP-0167 has been updated to version 1.2.3, to change the type of the 'ssrc' attribute to u32 (from String). This is in accordance with RFC 3550 (RTP), which defines it as a randomly-chosen 32-bit unsigned integer. Additionally, the docstring was completely wrong.
This commit is contained in:
parent
e22daa91f1
commit
8c2b1df7f7
5 changed files with 17 additions and 11 deletions
|
|
@ -1,3 +1,10 @@
|
|||
Version NEXT:
|
||||
XXXX-YY-ZZ RELEASER <admin@example.com>
|
||||
* Breaking
|
||||
- The type of jingle_rtp::Description::ssrc has been changed from
|
||||
Option<String> to Option<u32>, in accordance with XEP-0167 version
|
||||
1.2.3 and RFC 3550. (!602)
|
||||
|
||||
Version 0.22.0:
|
||||
2025-10-28 pep <pep@bouah.net>
|
||||
* Breaking
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@
|
|||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0167.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.2.0</xmpp:version>
|
||||
<xmpp:version>1.2.3</xmpp:version>
|
||||
<xmpp:since>0.13.0</xmpp:since>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ mod tests {
|
|||
assert_size!(Senders, 1);
|
||||
assert_size!(Disposition, 1);
|
||||
assert_size!(ContentId, 12);
|
||||
assert_size!(Content, 156);
|
||||
assert_size!(Content, 152);
|
||||
assert_size!(Reason, 12);
|
||||
assert_size!(ReasonElement, 24);
|
||||
assert_size!(SessionId, 12);
|
||||
|
|
@ -609,7 +609,7 @@ mod tests {
|
|||
assert_size!(Senders, 1);
|
||||
assert_size!(Disposition, 1);
|
||||
assert_size!(ContentId, 24);
|
||||
assert_size!(Content, 312);
|
||||
assert_size!(Content, 296);
|
||||
assert_size!(Reason, 24);
|
||||
assert_size!(ReasonElement, 48);
|
||||
assert_size!(SessionId, 24);
|
||||
|
|
|
|||
|
|
@ -21,15 +21,14 @@ pub struct RtcpMux;
|
|||
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
|
||||
#[xml(namespace = ns::JINGLE_RTP, name = "description")]
|
||||
pub struct Description {
|
||||
/// Namespace of the encryption scheme used.
|
||||
/// Specifies the media type, such as "audio" or "video", where the media type SHOULD be as
|
||||
/// registered at IANA MIME Media Types Registry.
|
||||
#[xml(attribute)]
|
||||
pub media: String,
|
||||
|
||||
/// User-friendly name for the encryption scheme, should be `None` for OTR,
|
||||
/// legacy OpenPGP and OX.
|
||||
// XXX: is this a String or an u32?! Refer to RFC 3550.
|
||||
/// 32-bit synchronization source for this media stream, as defined in RFC 3550.
|
||||
#[xml(attribute(default))]
|
||||
pub ssrc: Option<String>,
|
||||
pub ssrc: Option<u32>,
|
||||
|
||||
/// List of encodings that can be used for this RTP stream.
|
||||
#[xml(child(n = ..))]
|
||||
|
|
@ -169,7 +168,7 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Description, 76);
|
||||
assert_size!(Description, 72);
|
||||
assert_size!(Channels, 1);
|
||||
assert_size!(PayloadType, 64);
|
||||
assert_size!(Parameter, 24);
|
||||
|
|
@ -178,7 +177,7 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Description, 152);
|
||||
assert_size!(Description, 136);
|
||||
assert_size!(Channels, 1);
|
||||
assert_size!(PayloadType, 104);
|
||||
assert_size!(Parameter, 48);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(JsonContainer, 16);
|
||||
assert_size!(JsonContainer, 24);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue