Exemplo n.º 1
0
 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)
Exemplo n.º 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)
Exemplo n.º 5
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)
Exemplo n.º 6
0
 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)