From: Guillaume Pellerin Date: Sun, 8 Jun 2025 23:36:15 +0000 (+0200) Subject: add post_commands X-Git-Tag: 4.1.0~3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=808f15ff80a0bf9325dc8c67684e4b2651cf6b71;p=telecaster-server.git add post_commands --- 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():