Пример #1
0
        static SegmentBase LoadSegmentBase(XElement element)
        {
            var result = new SegmentBase();

            PopulateSegmentBase(element, result);
            return(result);
        }
Пример #2
0
        static void PopulateSegmentBase(XElement element, SegmentBase result)
        {
            var ns = element.GetDefaultNamespace().NamespaceName;

            result.Timescale = element.Attribute("timescale").GetNullableUInt();
            result.PresentationTimeOffset = element.Attribute("presentationTimeOffset").GetNullableULong();
            result.IndexRange             = (string)element.Attribute("indexRange");
            result.IndexRangeExact        = element.Attribute("indexRangeExact").GetNullableBool();
            result.AnyAttr.AddRange(element.Attributes());

            result.Initialization      = element.Elements(XName.Get("Initialisation", ns)).Concat(element.Elements(XName.Get("Initialization", ns))).Select(LoadURL).SingleOrDefault();
            result.RepresentationIndex = element.Elements(XName.Get("RepresentationIndex", ns)).Select(LoadURL).SingleOrDefault();
            result.Any.AddRange(element.Elements());
        }
Пример #3
0
        static void PopulateSegmentBase(XElement element, SegmentBase result)
        {
            var ns = element.GetDefaultNamespace().NamespaceName;
            result.Timescale = element.Attribute("timescale").GetNullableUInt();
            result.PresentationTimeOffset = element.Attribute("presentationTimeOffset").GetNullableULong();
            result.IndexRange = (string)element.Attribute("indexRange");
            result.IndexRangeExact = element.Attribute("indexRangeExact").GetNullableBool();
            result.AnyAttr.AddRange(element.Attributes());

            result.Initialization = element.Elements(XName.Get("Initialisation", ns)).Concat(element.Elements(XName.Get("Initialization", ns))).Select(LoadURL).SingleOrDefault();
            result.RepresentationIndex = element.Elements(XName.Get("RepresentationIndex", ns)).Select(LoadURL).SingleOrDefault();
            result.Any.AddRange(element.Elements());
        }
Пример #4
0
 static SegmentBase LoadSegmentBase(XElement element)
 {
     var result = new SegmentBase();
     PopulateSegmentBase(element, result);
     return result;
 }