diff options
author | MaZderMind <github@mazdermind.de> | 2015-05-14 19:59:16 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-05-14 19:59:16 +0200 |
commit | 038bc89367f26fe9be8bff135c8c0eca3f9faaaf (patch) | |
tree | 692306fb3bb14b75b09056711b4fe4bfd74d2860 /voctocore/lib/pipeline.py | |
parent | 51ac59343673286cc4c5d1d9b484b1e3a8f657a5 (diff) |
implement switchable preview source in mjpg coding for the GUI
Diffstat (limited to 'voctocore/lib/pipeline.py')
-rw-r--r-- | voctocore/lib/pipeline.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/voctocore/lib/pipeline.py b/voctocore/lib/pipeline.py index 3aa8085..5a9ce3e 100644 --- a/voctocore/lib/pipeline.py +++ b/voctocore/lib/pipeline.py @@ -6,6 +6,7 @@ from gi.repository import Gst from lib.config import Config from lib.avsource import AVSource from lib.avrawoutput import AVRawOutput +from lib.avpreviewoutput import AVPreviewOutput from lib.videomix import VideoMix from lib.audiomix import AudioMix @@ -14,9 +15,12 @@ class Pipeline(object): log = logging.getLogger('Pipeline') sources = [] - outputs = [] + mirrors = [] + previews = [] + vmix = None amix = None + mixout = None def __init__(self): self.log.info('Video-Caps configured to: %s', Config.get('mix', 'videocaps')) @@ -39,7 +43,15 @@ class Pipeline(object): self.log.info('Creating Mirror-Output for AVSource %s at tcp-port %u', name, port) mirror = AVRawOutput('%s_mirror' % name, port) - self.outputs.append(mirror) + self.mirrors.append(mirror) + + + if Config.getboolean('previews', 'enabled'): + port = 14000 + idx + self.log.info('Creating Preview-Output for AVSource %s at tcp-port %u', name, port) + + preview = AVPreviewOutput('%s_preview' % name, port) + self.previews.append(preview) self.log.info('Creating Videmixer') @@ -50,6 +62,10 @@ class Pipeline(object): 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) - output = AVRawOutput('mix', port) - self.outputs.append(output) + self.mixpreview = AVPreviewOutput('mix_preview', port) |