diff --git a/src/lib.rs b/src/lib.rs index ef38b0a..e6d6b56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1578,40 +1578,55 @@ pub struct Subset { pub struct Period { #[serde(rename = "@id")] pub id: Option, - pub BaseURL: Vec, + /// The start time of the Period relative to the MPD availability start time. #[serde(rename = "@start", serialize_with = "serialize_xs_duration", deserialize_with = "deserialize_xs_duration", default)] pub start: Option, + // note: the spec says that this is an xs:duration, not an unsigned int as for other "duration" fields #[serde(rename = "@duration", serialize_with = "serialize_xs_duration", deserialize_with = "deserialize_xs_duration", default)] pub duration: Option, + #[serde(rename = "@bitstreamSwitching")] pub bitstreamSwitching: Option, + /// A "remote resource", following the XML Linking Language (XLink) specification. #[serde(rename = "@xlink:href", alias = "@href")] pub href: Option, + #[serde(rename = "@xlink:actuate", alias = "@actuate")] pub actuate: Option, + + pub BaseURL: Vec, + + #[serde(rename = "EssentialProperty")] + pub essential_property: Vec, + pub SegmentTemplate: Option, + + #[serde(rename = "AssetIdentifier")] + pub asset_identifier: Option, + + #[serde(rename = "EventStream")] + pub event_streams: Vec, + pub ContentProtection: Vec, + #[serde(rename = "AdaptationSet")] pub adaptations: Vec, + #[serde(rename = "Subset")] pub subsets: Vec, - #[serde(rename = "AssetIdentifier")] - pub asset_identifier: Option, - #[serde(rename = "EventStream")] - pub event_streams: Vec, + #[serde(rename = "SupplementalProperty")] pub supplemental_property: Vec, - #[serde(rename = "EssentialProperty")] - pub essential_property: Vec, + #[serde(rename = "Preselection")] pub pre_selections: Vec, } @@ -1853,27 +1868,27 @@ pub struct MPD { deserialize_with = "deserialize_xs_datetime", default)] pub availabilityEndTime: Option, + pub ProgramInformation: Option, /// There may be several BaseURLs, for redundancy (for example multiple CDNs) #[serde(rename = "BaseURL")] pub base_url: Vec, - #[serde(rename = "Period", default)] - pub periods: Vec, #[serde(rename = "Location", default)] pub locations: Vec, /// Specifies the location of an MPD “patch document”, a set of instructions for replacing /// certain parts of the MPD manifest with updated information. pub PatchLocation: Vec, pub ServiceDescription: Option, - pub ProgramInformation: Option, + pub ContentProtection: Vec, + #[serde(rename = "Period", default)] + pub periods: Vec, pub Metrics: Vec, - pub UTCTiming: Vec, - /// Correction for leap seconds, used by the DASH Low Latency specification. - pub LeapSecondInformation: Option, #[serde(rename = "EssentialProperty")] pub essential_property: Vec, #[serde(rename = "SupplementalProperty")] pub supplemental_property: Vec, - pub ContentProtection: Vec, + pub UTCTiming: Vec, + /// Correction for leap seconds, used by the DASH Low Latency specification. + pub LeapSecondInformation: Option, } impl std::fmt::Display for MPD {