diff --git a/src/lib.rs b/src/lib.rs index 3d48812..60ffe02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -494,6 +494,15 @@ where S: serde::Serializer { } } +fn serialize_mspr_ns(os: &Option, serializer: S) -> Result +where S: serde::Serializer { + if let Some(s) = os { + serializer.serialize_str(s) + } else { + serializer.serialize_str("urn:microsoft:playready") + } +} + fn serialize_xlink_ns(os: &Option, serializer: S) -> Result where S: serde::Serializer { if let Some(s) = os { @@ -1825,6 +1834,10 @@ pub struct MPD { #[serialize_always] #[serde(rename="@xmlns:cenc", alias="@cenc", serialize_with="serialize_cenc_ns")] pub cenc: Option, + /// The XML namespace prefix used by convention for the Microsoft PlayReady scheme. + #[serialize_always] + #[serde(rename="@xmlns:mspr", alias="@mspr", serialize_with="serialize_mspr_ns")] + pub mspr: Option, /// The XML namespace prefix used by convention for the XML Linking Language. #[serialize_always] #[serde(rename="@xmlns:xlink", alias="@xlink", serialize_with="serialize_xlink_ns")]