summaryrefslogtreecommitdiff
path: root/voctocore/lib/pipeline.py
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-06-16 16:59:04 +0200
committerMaZderMind <github@mazdermind.de>2015-06-16 16:59:04 +0200
commitc69b7397171e49221a42c0c49154d29722d38af0 (patch)
treea2dd956c6d9e4597be70a4bd792e7356f8387f17 /voctocore/lib/pipeline.py
parent8e2359d8ed6b17fc6cad99d617c889c754eb44c1 (diff)
Implement Stream-Blanker
Diffstat (limited to 'voctocore/lib/pipeline.py')
-rw-r--r--voctocore/lib/pipeline.py31
1 files changed, 29 insertions, 2 deletions
diff --git a/voctocore/lib/pipeline.py b/voctocore/lib/pipeline.py
index 1004b0e..f341491 100644
--- a/voctocore/lib/pipeline.py
+++ b/voctocore/lib/pipeline.py
@@ -11,6 +11,7 @@ from lib.avrawoutput import AVRawOutput
from lib.avpreviewoutput import AVPreviewOutput
from lib.videomix import VideoMix
from lib.audiomix import AudioMix
+from lib.streamblanker import StreamBlanker
class Pipeline(object):
"""mixing, streaming and encoding pipeline constuction and control"""
@@ -27,6 +28,7 @@ class Pipeline(object):
self.sources = []
self.mirrors = []
self.previews = []
+ self.sbsources = []
self.log.info('Creating %u Creating AVSources: %s', len(names), names)
for idx, name in enumerate(names):
@@ -59,16 +61,41 @@ class Pipeline(object):
self.amix = AudioMix()
port = 16000
- self.log.info('Videomixer Background-Source-Port at tcp-port %u', port)
+ self.log.info('Creating Mixer-Background VSource at tcp-port %u', port)
self.bgsrc = VSource('background', port)
-
port = 11000
self.log.info('Creating Mixer-Output at tcp-port %u', port)
self.mixout = AVRawOutput('mix_out', port)
+
if Config.getboolean('previews', 'enabled'):
port = 12000
self.log.info('Creating Preview-Output for AVSource %s at tcp-port %u', name, port)
self.mixpreview = AVPreviewOutput('mix_preview', port)
+
+ if Config.getboolean('stream-blanker', 'enabled'):
+ names = Config.getlist('stream-blanker', 'sources')
+ if len(names) < 1:
+ raise RuntimeException("At least one StreamBlanker-Source must be configured or the StreamBlanker disabled!")
+ for idx, name in enumerate(names):
+ port = 17000 + idx
+ self.log.info('Creating StreamBlanker VSource %s at tcp-port %u', name, port)
+
+ source = VSource('%s_streamblanker' % name, port)
+ self.sbsources.append(source)
+
+ port = 18000
+ self.log.info('Creating StreamBlanker ASource at tcp-port %u', port)
+
+ source = ASource('streamblanker', port)
+ self.sbsources.append(source)
+
+
+ self.log.info('Creating StreamBlanker')
+ self.streamblanker = StreamBlanker()
+
+ port = 15000
+ self.log.info('Creating StreamBlanker-Output at tcp-port %u', port)
+ self.streamout = AVRawOutput('streamblanker_out', port)