openwebrx-clone/csdr/chain/__init__.py

20 lines
480 B
Python
Raw Normal View History

2020-12-16 17:52:00 +00:00
class Chain(object):
def __init__(self, *workers):
self.workers = workers
stage = None
for w in self.workers:
if stage is not None:
w.setInput(stage.getBuffer())
stage = w
self.buffer = stage.getBuffer()
def stop(self):
for w in self.workers:
w.stop()
def setInput(self, buffer):
self.workers[0].setInput(buffer)
2020-12-16 17:52:00 +00:00
def getBuffer(self):
return self.buffer