! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live.mp3 > /dev/null
"""
-BOOT_TIME_DELAY = 1
-
DEFAULT_CONFIG_FILE = "/etc/telecaster/telecaster.yml"
PARAMS = {
self.params = PARAMS[audio_engine]
self.params["options"] = self.params["options"].format(**self.conf["audio"][audio_engine])
self.params["gst_audio_options"] = self.params["gst_audio_options"].format(**self.conf["audio"][audio_engine])
+ if self.conf["boot_time_delay"]:
+ self.time_delay = self.conf["boot_time_delay"]
+ else:
+ self.time_delay = 1
if self.verbose:
print(self.params)
print(command)
if not self.dry_run:
thread.start()
- time.sleep(BOOT_TIME_DELAY)
+ time.sleep(self.time_delay)
def audio_tools_start(self):
for tool in self.params["tools"]:
if not self.dry_run:
stream.start()
- time.sleep(BOOT_TIME_DELAY)
+ time.sleep(self.time_delay)
deefuzzer_local_conf = deepcopy(deefuzzer_station_conf)
relay_url = "http://{ip}:{port}/telecaster_live_{id}.webm".format(**video, **self.conf["server"])
# print(deefuzzer_local_conf)
deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
- time.sleep(BOOT_TIME_DELAY)
+ time.sleep(self.time_delay)
if not self.dry_run:
self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_video_conf_file)
if not self.dry_run:
stream.start()
- time.sleep(BOOT_TIME_DELAY)
+ time.sleep(self.time_delay)
deefuzzer_local_conf = deepcopy(deefuzzer_station_conf)
# print(deefuzzer_local_conf)
deefuzzer_local_conf["record"]["dir"] = self.conf["record_dir"] + os.sep + "mp3"
deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
- time.sleep(BOOT_TIME_DELAY)
+ time.sleep(self.time_delay)
if not self.dry_run:
self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_audio_conf_file)