data_elements.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:python-ebml 作者: QBobWatson 项目源码 文件源码
def parse_SeekHead(self, child, stream): #pylint: disable=invalid-name
        "Parse SeekHead element and recursively read elements."
        LOG.debug("Segment: parsed {}".format(child))

        recursed = False
        for seek_entry in child.children_named('Seek'):
            try:
                self.find(seek_entry.seek_pos)
            except ValueError:
                # Recurse if this is the first time we've seen this seek entry
                LOG.debug("Segment: adding seek entry {}".format(seek_entry))
                if seek_entry.seek_id_name != 'Cluster' and stream:
                    # This recursively reads any elements this seek entry
                    # points to that haven't been read already.
                    self.read_element(stream, seek_entry.seek_pos,
                                      summary=True, seekfirst=True)
                    recursed = True
        if recursed:
            stream.seek(child.pos_end_absolute, SEEK_SET)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号