use xmpp_parsers::{ jingle_ssma::{Parameter, Semantics}, ns::JINGLE_SSMA, }; use crate::ns::JITSI_MEET; generate_element!( /// Source element for the ssrc SDP attribute. Source, "source", JINGLE_SSMA, attributes: [ /// Maps to the ssrc-id parameter. id: Required = "ssrc", ], children: [ /// List of attributes for this source. parameters: Vec = ("parameter", JINGLE_SSMA) => Parameter, /// --- Non-standard attributes used by Jitsi Meet: --- /// ssrc-info for this source. info: Option = ("ssrc-info", JITSI_MEET) => SsrcInfo ] ); impl Source { /// Create a new SSMA Source element. pub fn new(id: u32) -> Source { Source { id, parameters: Vec::new(), info: None, } } } generate_element!( /// ssrc-info associated with a ssrc. SsrcInfo, "ssrc-info", JITSI_MEET, attributes: [ /// The owner of the ssrc. owner: Required = "owner" ] ); generate_element!( /// Element grouping multiple ssrc. Group, "ssrc-group", JINGLE_SSMA, attributes: [ /// The semantics of this group. semantics: Required = "semantics", ], children: [ /// The various ssrc concerned by this group. sources: Vec = ("source", JINGLE_SSMA) => Source ] );