예제 #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;
 }