def parse(self, xmlnode): self.xmlns = parse_attr_value(xmlnode, 'xmlns', str) self.id = parse_attr_value(xmlnode, 'id', str) self.type = parse_attr_value(xmlnode, 'type', str) self.profiles = parse_attr_value(xmlnode, 'profiles', str) self.availability_start_time = parse_attr_value( xmlnode, 'availabilityStartTime', str) self.availability_end_time = parse_attr_value(xmlnode, 'availabilityEndTime', str) self.publish_time = parse_attr_value(xmlnode, 'publishTime', str) self.media_presentation_duration = parse_attr_value( xmlnode, 'mediaPresentationDuration', str) self.minimum_update_period = parse_attr_value(xmlnode, 'minimumUpdatePeriod', str) self.min_buffer_time = parse_attr_value(xmlnode, 'minBufferTime', str) self.time_shift_buffer_depth = parse_attr_value( xmlnode, 'timeShiftBufferDepth', str) self.suggested_presentation_delay = parse_attr_value( xmlnode, 'suggestedPresentationDelay', str) self.max_segment_duration = parse_attr_value(xmlnode, 'maxSegmentDuration', str) self.max_subsegment_duration = parse_attr_value( xmlnode, 'maxSubsegmentDuration', str) self.program_informations = parse_child_nodes(xmlnode, 'ProgramInformation', ProgramInformation) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.locations = parse_child_nodes(xmlnode, 'Location', str) self.periods = parse_child_nodes(xmlnode, 'Period', Period) self.metrics = parse_child_nodes(xmlnode, 'Metrics', Metrics)
def parse(self, xmlnode): RepresentationBase.parse(self, xmlnode) self.id = parse_attr_value(xmlnode, 'id', int) self.group = parse_attr_value(xmlnode, 'group', int) self.lang = parse_attr_value(xmlnode, 'lang', str) self.content_type = parse_attr_value(xmlnode, 'contentType', str) self.par = parse_attr_value(xmlnode, 'par', str) self.min_bandwidth = parse_attr_value(xmlnode, 'minBandwidth', int) self.max_bandwidth = parse_attr_value(xmlnode, 'maxBandwidth', int) self.min_width = parse_attr_value(xmlnode, 'minWidth', int) self.max_width = parse_attr_value(xmlnode, 'maxWidth', int) self.min_height = parse_attr_value(xmlnode, 'minHeight', int) self.max_height = parse_attr_value(xmlnode, 'maxHeight', int) self.min_frame_rate = parse_attr_value(xmlnode, 'minFrameRate', str) self.max_frame_rate = parse_attr_value(xmlnode, 'maxFrameRate', str) self.segment_alignment = parse_attr_value(xmlnode, 'segmentAlignment', bool) self.subsegment_alignment = parse_attr_value(xmlnode, 'subsegmentAlignment', bool) self.subsegment_starts_with_sap = parse_attr_value(xmlnode, 'subsegmentStartsWithSAP', int) self.bitstream_switching = parse_attr_value(xmlnode, 'bitstreamSwitching', bool) self.accessibilities = parse_child_nodes(xmlnode, 'Accessibility', Descriptor) self.roles = parse_child_nodes(xmlnode, 'Role', Descriptor) self.ratings = parse_child_nodes(xmlnode, 'Rating', Descriptor) self.viewpoints = parse_child_nodes(xmlnode, 'Viewpoint', Descriptor) self.content_components = parse_child_nodes(xmlnode, 'ContentComponent', ContentComponent) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.representations = parse_child_nodes(xmlnode, 'Representation', Representation)
def parse(self, xmlnode): self.lang = parse_attr_value(xmlnode, 'lang', str) self.more_information_url = parse_attr_value(xmlnode, 'moreInformationURL', str) self.titles = parse_child_nodes(xmlnode, 'Title', str) self.sources = parse_child_nodes(xmlnode, 'Source', str) self.copyrights = parse_child_nodes(xmlnode, 'Copyright', str)
def parse(self, xmlnode): self.lang = parse_attr_value(xmlnode, 'lang', str) self.more_information_url = parse_attr_value(xmlnode, 'moreInformationURL', str) self.titles = parse_child_nodes(xmlnode, 'Title', str) self.sources = parse_child_nodes(xmlnode, 'Source', str) self.copyrights = parse_child_nodes(xmlnode, 'Copyright', str)
def parse(self, xmlnode): SegmentBase.parse(self, xmlnode) self.duration = parse_attr_value(xmlnode, 'duration', int) self.start_number = parse_attr_value(xmlnode, 'startNumber', int) self.segment_timelines = parse_child_nodes(xmlnode, 'SegmentTimeline', SegmentTimeline) self.bitstream_switchings = parse_child_nodes(xmlnode, 'BitstreamSwitching', URL)
def parse(self, xmlnode): self.timescale = parse_attr_value(xmlnode, 'timescale', int) self.index_range = parse_attr_value(xmlnode, 'indexRange', str) self.index_range_exact = parse_attr_value(xmlnode, 'indexRangeExact', bool) self.presentation_time_offset = parse_attr_value(xmlnode, 'presentationTimeOffset', int) self.availability_time_offset = parse_attr_value(xmlnode, 'availabilityTimeOffset', float) self.availability_time_complete = parse_attr_value(xmlnode, 'availabilityTimeComplete', bool) self.initializations = parse_child_nodes(xmlnode, 'Initialization', URL) self.representation_indexes = parse_child_nodes(xmlnode, 'RepresentationIndex', URL)
def parse(self, xmlnode): self.id = parse_attr_value(xmlnode, 'id', int) self.lang = parse_attr_value(xmlnode, 'lang', str) self.content_type = parse_attr_value(xmlnode, 'contentType', str) self.par = parse_attr_value(xmlnode, 'par', str) self.accessibilities = parse_child_nodes(xmlnode, 'Accessibility', Descriptor) self.roles = parse_child_nodes(xmlnode, 'Role', Descriptor) self.ratings = parse_child_nodes(xmlnode, 'Rating', Descriptor) self.viewpoints = parse_child_nodes(xmlnode, 'Viewpoint', Descriptor)
def parse(self, xmlnode): SegmentBase.parse(self, xmlnode) self.duration = parse_attr_value(xmlnode, 'duration', int) self.start_number = parse_attr_value(xmlnode, 'startNumber', int) self.segment_timelines = parse_child_nodes(xmlnode, 'SegmentTimeline', SegmentTimeline) self.bitstream_switchings = parse_child_nodes(xmlnode, 'BitstreamSwitching', URL)
def parse(self, xmlnode): self.id = parse_attr_value(xmlnode, 'id', int) self.lang = parse_attr_value(xmlnode, 'lang', str) self.content_type = parse_attr_value(xmlnode, 'contentType', str) self.par = parse_attr_value(xmlnode, 'par', str) self.accessibilities = parse_child_nodes(xmlnode, 'Accessibility', Descriptor) self.roles = parse_child_nodes(xmlnode, 'Role', Descriptor) self.ratings = parse_child_nodes(xmlnode, 'Rating', Descriptor) self.viewpoints = parse_child_nodes(xmlnode, 'Viewpoint', Descriptor)
def parse(self, xmlnode): RepresentationBase.parse(self, xmlnode) self.id = parse_attr_value(xmlnode, 'id', str) self.bandwidth = parse_attr_value(xmlnode, 'bandwidth', int) self.quality_ranking = parse_attr_value(xmlnode, 'qualityRanking', int) self.dependency_id = parse_attr_value(xmlnode, 'dependencyId', [str]) self.num_channels = parse_attr_value(xmlnode, 'numChannels', int) self.sample_rate = parse_attr_value(xmlnode, 'sampleRate', int) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.sub_representations = parse_child_nodes(xmlnode, 'SubRepresentation', SubRepresentation)
def parse(self, xmlnode): self.timescale = parse_attr_value(xmlnode, 'timescale', int) self.index_range = parse_attr_value(xmlnode, 'indexRange', str) self.index_range_exact = parse_attr_value(xmlnode, 'indexRangeExact', bool) self.presentation_time_offset = parse_attr_value( xmlnode, 'presentationTimeOffset', int) self.availability_time_offset = parse_attr_value( xmlnode, 'availabilityTimeOffset', float) self.availability_time_complete = parse_attr_value( xmlnode, 'availabilityTimeComplete', bool) self.initializations = parse_child_nodes(xmlnode, 'Initialization', URL) self.representation_indexes = parse_child_nodes( xmlnode, 'RepresentationIndex', URL)
def parse(self, xmlnode): RepresentationBase.parse(self, xmlnode) self.id = parse_attr_value(xmlnode, 'id', int) self.group = parse_attr_value(xmlnode, 'group', int) self.lang = parse_attr_value(xmlnode, 'lang', str) self.content_type = parse_attr_value(xmlnode, 'contentType', str) self.par = parse_attr_value(xmlnode, 'par', str) self.min_bandwidth = parse_attr_value(xmlnode, 'minBandwidth', int) self.max_bandwidth = parse_attr_value(xmlnode, 'maxBandwidth', int) self.min_width = parse_attr_value(xmlnode, 'minWidth', int) self.max_width = parse_attr_value(xmlnode, 'maxWidth', int) self.min_height = parse_attr_value(xmlnode, 'minHeight', int) self.max_height = parse_attr_value(xmlnode, 'maxHeight', int) self.min_frame_rate = parse_attr_value(xmlnode, 'minFrameRate', str) self.max_frame_rate = parse_attr_value(xmlnode, 'maxFrameRate', str) self.segment_alignment = parse_attr_value(xmlnode, 'segmentAlignment', bool) self.subsegment_alignment = parse_attr_value(xmlnode, 'subsegmentAlignment', bool) self.subsegment_starts_with_sap = parse_attr_value( xmlnode, 'subsegmentStartsWithSAP', int) self.bitstream_switching = parse_attr_value(xmlnode, 'bitstreamSwitching', bool) self.accessibilities = parse_child_nodes(xmlnode, 'Accessibility', Descriptor) self.roles = parse_child_nodes(xmlnode, 'Role', Descriptor) self.ratings = parse_child_nodes(xmlnode, 'Rating', Descriptor) self.viewpoints = parse_child_nodes(xmlnode, 'Viewpoint', Descriptor) self.content_components = parse_child_nodes(xmlnode, 'ContentComponent', ContentComponent) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.representations = parse_child_nodes(xmlnode, 'Representation', Representation)
def parse(self, xmlnode): RepresentationBase.parse(self, xmlnode) self.id = parse_attr_value(xmlnode, 'id', str) self.bandwidth = parse_attr_value(xmlnode, 'bandwidth', int) self.quality_ranking = parse_attr_value(xmlnode, 'qualityRanking', int) self.dependency_id = parse_attr_value(xmlnode, 'dependencyId', [str]) self.num_channels = parse_attr_value(xmlnode, 'numChannels', int) self.sample_rate = parse_attr_value(xmlnode, 'sampleRate', int) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.sub_representations = parse_child_nodes(xmlnode, 'SubRepresentation', SubRepresentation)
def parse(self, xmlnode): self.xmlns = parse_attr_value(xmlnode, 'xmlns', str) self.id = parse_attr_value(xmlnode, 'id', str) self.type = parse_attr_value(xmlnode, 'type', str) self.profiles = parse_attr_value(xmlnode, 'profiles', str) self.availability_start_time = parse_attr_value(xmlnode, 'availabilityStartTime', str) self.availability_end_time = parse_attr_value(xmlnode, 'availabilityEndTime', str) self.publish_time = parse_attr_value(xmlnode, 'publishTime', str) self.media_presentation_duration = parse_attr_value(xmlnode, 'mediaPresentationDuration', str) self.minimum_update_period = parse_attr_value(xmlnode, 'minimumUpdatePeriod', str) self.min_buffer_time = parse_attr_value(xmlnode, 'minBufferTime', str) self.time_shift_buffer_depth = parse_attr_value(xmlnode, 'timeShiftBufferDepth', str) self.suggested_presentation_delay = parse_attr_value(xmlnode, 'suggestedPresentationDelay', str) self.max_segment_duration = parse_attr_value(xmlnode, 'maxSegmentDuration', str) self.max_subsegment_duration = parse_attr_value(xmlnode, 'maxSubsegmentDuration', str) self.program_informations = parse_child_nodes(xmlnode, 'ProgramInformation', ProgramInformation) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.locations = parse_child_nodes(xmlnode, 'Location', str) self.periods = parse_child_nodes(xmlnode, 'Period', Period) self.metrics = parse_child_nodes(xmlnode, 'Metrics', Metrics)
def parse(self, xmlnode): self.id = parse_attr_value(xmlnode, 'id', str) self.start = parse_attr_value(xmlnode, 'start', str) self.duration = parse_attr_value(xmlnode, 'duration', str) self.bitstream_switching = parse_attr_value(xmlnode, 'bitstreamSwitching', bool) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.asset_identifiers = parse_child_nodes(xmlnode, 'AssetIdentifier', Descriptor) self.event_streams = parse_child_nodes(xmlnode, 'EventStream', EventStream) self.adaptation_sets = parse_child_nodes(xmlnode, 'AdaptationSet', AdaptationSet) self.subsets = parse_child_nodes(xmlnode, 'Subset', Subset)
def parse(self, xmlnode): self.id = parse_attr_value(xmlnode, 'id', str) self.start = parse_attr_value(xmlnode, 'start', str) self.duration = parse_attr_value(xmlnode, 'duration', str) self.bitstream_switching = parse_attr_value(xmlnode, 'bitstreamSwitching', bool) self.base_urls = parse_child_nodes(xmlnode, 'BaseURL', BaseURL) self.segment_bases = parse_child_nodes(xmlnode, 'SegmentBase', SegmentBase) self.segment_lists = parse_child_nodes(xmlnode, 'SegmentList', SegmentList) self.segment_templates = parse_child_nodes(xmlnode, 'SegmentTemplate', SegmentTemplate) self.asset_identifiers = parse_child_nodes(xmlnode, 'AssetIdentifier', Descriptor) self.event_streams = parse_child_nodes(xmlnode, 'EventStream', EventStream) self.adaptation_sets = parse_child_nodes(xmlnode, 'AdaptationSet', AdaptationSet) self.subsets = parse_child_nodes(xmlnode, 'Subset', Subset)
def parse(self, xmlnode): self.profiles = parse_attr_value(xmlnode, 'profile', str) self.width = parse_attr_value(xmlnode, 'width', int) self.height = parse_attr_value(xmlnode, 'height', int) self.sar = parse_attr_value(xmlnode, 'sar', str) self.frame_rate = parse_attr_value(xmlnode, 'frameRate', str) self.audio_sampling_rate = parse_attr_value(xmlnode, 'audioSamplingRate', str) self.mime_type = parse_attr_value(xmlnode, 'mimeType', str) self.segment_profiles = parse_attr_value(xmlnode, 'segmentProfiles', str) self.codecs = parse_attr_value(xmlnode, 'codecs', str) self.maximum_sap_period = parse_attr_value(xmlnode, 'maximumSAPPeriod', float) self.start_with_sap = parse_attr_value(xmlnode, 'startWithSAP', int) self.max_playout_rate = parse_attr_value(xmlnode, 'maxPlayoutRate', float) self.coding_dependency = parse_attr_value(xmlnode, 'codingDependency', bool) self.scan_type = parse_attr_value(xmlnode, 'scanType', str) self.frame_packings = parse_child_nodes(xmlnode, 'FramePacking', Descriptor) self.audio_channel_configurations = parse_child_nodes(xmlnode, 'AudioChannelConfiguration', Descriptor) self.content_protections = parse_child_nodes(xmlnode, 'ContentProtection', Descriptor) self.essential_properties = parse_child_nodes(xmlnode, 'EssentialProperty', Descriptor) self.supplemental_properties = parse_child_nodes(xmlnode, 'SupplementalProperty', Descriptor) self.inband_event_streams = parse_child_nodes(xmlnode, 'InbandEventStream', Descriptor)
def parse(self, xmlnode): self.profiles = parse_attr_value(xmlnode, 'profile', str) self.width = parse_attr_value(xmlnode, 'width', int) self.height = parse_attr_value(xmlnode, 'height', int) self.sar = parse_attr_value(xmlnode, 'sar', str) self.frame_rate = parse_attr_value(xmlnode, 'frameRate', str) self.audio_sampling_rate = parse_attr_value(xmlnode, 'audioSamplingRate', str) self.mime_type = parse_attr_value(xmlnode, 'mimeType', str) self.segment_profiles = parse_attr_value(xmlnode, 'segmentProfiles', str) self.codecs = parse_attr_value(xmlnode, 'codecs', str) self.maximum_sap_period = parse_attr_value(xmlnode, 'maximumSAPPeriod', float) self.start_with_sap = parse_attr_value(xmlnode, 'startWithSAP', int) self.max_playout_rate = parse_attr_value(xmlnode, 'maxPlayoutRate', float) self.coding_dependency = parse_attr_value(xmlnode, 'codingDependency', bool) self.scan_type = parse_attr_value(xmlnode, 'scanType', str) self.frame_packings = parse_child_nodes(xmlnode, 'FramePacking', Descriptor) self.audio_channel_configurations = parse_child_nodes( xmlnode, 'AudioChannelConfiguration', Descriptor) self.content_protections = parse_child_nodes(xmlnode, 'ContentProtection', Descriptor) self.essential_properties = parse_child_nodes(xmlnode, 'EssentialProperty', Descriptor) self.supplemental_properties = parse_child_nodes( xmlnode, 'SupplementalProperty', Descriptor) self.inband_event_streams = parse_child_nodes(xmlnode, 'InbandEventStream', Descriptor)
def parse(self, xmlnode): self.Ss = parse_child_nodes(xmlnode, 'S', S)
def parse(self, xmlnode): self.scheme_id_uri = parse_attr_value(xmlnode, 'schemeIdUri', str) self.value = parse_attr_value(xmlnode, 'value', str) self.timescale = parse_attr_value(xmlnode, 'timescale', int) self.events = parse_child_nodes(xmlnode, 'Event', Event)
def parse(self, xmlnode): self.scheme_id_uri = parse_attr_value(xmlnode, 'schemeIdUri', str) self.value = parse_attr_value(xmlnode, 'value', str) self.timescale = parse_attr_value(xmlnode, 'timescale', int) self.events = parse_child_nodes(xmlnode, 'Event', Event)
def parse(self, xmlnode): MultipleSegmentBase.parse(self, xmlnode) self.segment_urls = parse_child_nodes(xmlnode, 'SegmentURL', SegmentURL)
def parse(self, xmlnode): self.metrics = parse_attr_value(xmlnode, 'metrics', str) self.reportings = parse_child_nodes(xmlnode, 'Reporting', Descriptor) self.ranges = parse_child_nodes(xmlnode, 'Range', Range)
def parse(self, xmlnode): self.Ss = parse_child_nodes(xmlnode, 'S', S)
def parse(self, xmlnode): MultipleSegmentBase.parse(self, xmlnode) self.segment_urls = parse_child_nodes(xmlnode, 'SegmentURL', SegmentURL)
def parse(cls, string_or_url): xml_root_node = cls.load_xmldom(string_or_url) return parse_child_nodes(xml_root_node, 'MPD', MPD)[0]
def parse(self, xmlnode): self.metrics = parse_attr_value(xmlnode, 'metrics', str) self.reportings = parse_child_nodes(xmlnode, 'Reporting', Descriptor) self.ranges = parse_child_nodes(xmlnode, 'Range', Range)