示例#1
0
文件: ogg.py 项目: 070499/Sick-Beard
 def __init__(self, parent, *args, **kw):
     Fragment.__init__(self, parent, *args, **kw)
     if parent['last_page'].value:
         next = None
     else:
         next = self.createNext
     self.setLinks(parent.parent.streams.setdefault(parent['serial'].value, self), next)
 def __init__(self, parent, *args, **kw):
     Fragment.__init__(self, parent, *args, **kw)
     if parent['last_page'].value:
         next = None
     else:
         next = self.createNext
     self.setLinks(
         parent.parent.streams.setdefault(parent['serial'].value, self),
         next)
 def _createInputStream(self, **args):
     if self.first is self:
         return FragmentedStream(self,
                                 packets=Packets(self),
                                 tags=[("id", "ogg_stream")],
                                 **args)
     return Fragment._createInputStream(self, **args)
示例#4
0
 def __init__(self, parent, name="compressed_data"):
     Fragment.__init__(self, parent, name, None, 8*parent["size"].value)
     data = parent.name.split('[')
     data, next = "../%s[%%u]" % data[0], int(data[1][:-1]) + 1
     first = parent.getField(data % 0)
     if first is parent:
         first = None
         if has_deflate:
             CompressedField(self, Gunzip)
     else:
         first = first[name]
     try:
         _next = parent[data % next]
         next = lambda: _next[name]
     except MissingField:
         next = None
     self.setLinks(first, next)
示例#5
0
文件: png.py 项目: 070499/Sick-Beard
 def __init__(self, parent, name="compressed_data"):
     Fragment.__init__(self, parent, name, None, 8*parent["size"].value)
     data = parent.name.split('[')
     data, next = "../%s[%%u]" % data[0], int(data[1][:-1]) + 1
     first = parent.getField(data % 0)
     if first is parent:
         first = None
         if has_deflate:
             CompressedField(self, Gunzip)
     else:
         first = first[name]
     try:
         _next = parent[data % next]
         next = lambda: _next[name]
     except MissingField:
         next = None
     self.setLinks(first, next)
示例#6
0
文件: ogg.py 项目: 070499/Sick-Beard
 def _createInputStream(self, **args):
     if self.first is self:
         return FragmentedStream(self, packets=Packets(self), tags=[("id","ogg_stream")], **args)
     return Fragment._createInputStream(self, **args)