From 808f15ff80a0bf9325dc8c67684e4b2651cf6b71 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 9 Jun 2025 01:36:15 +0200 Subject: [PATCH] add post_commands --- bin/streaming/telecaster.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/streaming/telecaster.py b/bin/streaming/telecaster.py index 6e90017..ac574bf 100755 --- a/bin/streaming/telecaster.py +++ b/bin/streaming/telecaster.py @@ -48,11 +48,20 @@ DEFAULT_CONFIG_FILE = "/etc/telecaster/telecaster.yml" JACK_CONFIG = {"engine": "jackd", "options": "-R -P50 -dalsa -r48000 -p1024 -n3 -Chw:3 -Phw:3", - "tools": ["qjackctl", "catia", "konsole"]} + "tools": ["qjackctl", "catia", "konsole"], + "post_commands": + ["jack_connect system:capture_1 webm_streaming_0_audio:in_jackaudiosrc0_1", + "jack_connect system:capture_2 webm_streaming_0_audio:in_jackaudiosrc0_2", + "jack_connect system:capture_1 mp3_streaming_audio:in_jackaudiosrc0_1", + "jack_connect system:capture_2 mp3_streaming_audio:in_jackaudiosrc0_2" + ] + } PIPEWIRE_CONFIG = {"engine": "pipewire", "options": "", - "tools": ["qpwgraph", "konsole"]} + "tools": ["qpwgraph", "konsole"], + "post_commands":"" + } class TeleCasterGStream(Thread): @@ -207,11 +216,19 @@ class TeleCaster(Thread): time.sleep(BOOT_TIME_DELAY) self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_audio_conf_file) + + def post_commands(self): + for post_command in self.audio_config["post_commands"]: + command = TeleCasterCommand(post_command) + command.start() + def run(self): self.audio_engine_start() self.audio_tools_start() self.video_start() self.audio_start() + self.post_commands() + def main(): -- 2.39.5