else:
self.input_stepsize = blocksize / 2
- self.parents.append(Spectrogram(blocksize=self.input_blocksize,
- stepsize=self.input_stepsize))
+ @staticmethod
+ @interfacedoc
+ def parents(self):
+ return list(Spectrogram(blocksize=self.input_blocksize,
+ stepsize=self.input_stepsize))
@interfacedoc
def setup(self, channels=None, samplerate=None,
def uuid():
"""Return the UUID of the processor"""
+ @staticmethod
+ def parents(self):
+ """Return the parent processor list of the processor"""
+
class IEncoder(IProcessor):
"""Encoder driver interface. Each encoder is expected to support a specific
self.parents = []
self.source_mediainfo = None
self.pipe = None
- self.UUID = "%08x" % random.getrandbits(32)
+ self._uuid = "%08x" % random.getrandbits(32)
+
+ interfacedoc
+ def parents(self):
+ pass
@interfacedoc
def setup(self, channels=None, samplerate=None, blocksize=None,
if not hasattr(self, 'input_stepsize'):
self.input_stepsize = self.source_blocksize
-
# default channels(), samplerate() and blocksize() implementations returns
# the source characteristics, but processors may change this behaviour by
# overloading those methods
@interfacedoc
def uuid(self):
- return self.UUID
+ return self._uuid
def __del__(self):
self.release()
def __ior__(self, other):
if isinstance(other, Processor):
self |= other.parents
+ print self
self.processors.append(other)
elif isinstance(other, ProcessPipe):
self.processors.extend(other.processors)