]> git.parisson.com Git - telecaster-server.git/commitdiff
add post_commands
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 8 Jun 2025 23:36:15 +0000 (01:36 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 8 Jun 2025 23:36:15 +0000 (01:36 +0200)
bin/streaming/telecaster.py

index 6e90017dda5a2b6cb622674954f775c7291e73e0..ac574bf0b0df584eaa8a64339bdd9ba221a47c10 100755 (executable)
@@ -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():