From 813432f224238adcfd0123b01c3da6149c981f0d Mon Sep 17 00:00:00 2001 From: Yoann QUERET Date: Tue, 9 Feb 2016 10:28:51 +0000 Subject: [PATCH] Add mot-encoder support for toolame-dab --- encoder.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/encoder.py b/encoder.py index 888eafd..fe4c274 100755 --- a/encoder.py +++ b/encoder.py @@ -157,12 +157,21 @@ def run_encoder(self): args += ' -s %s' % (self.config.output_dab_samplerate) args += ' -V %s' % (self.config.source_url) args += ' -b %s' % (self.config.output_dab_bitrate) + if self.config.mot == True: + args += ' -W %s' % (self.config.mot_dls_fifo_file) if self.config.source_type == 'alsa': args += ' -s %s' % (self.config.output_dab_samplerate) args += ' -V alsa://plug%s' % (self.config.source_device) args += ' -b %s' % (self.config.output_dab_bitrate) + if self.config.mot == True: + if not os.path.exists(self.config.mot_pad_fifo_file) or not stat.S_ISFIFO(os.stat(self.config.mot_pad_fifo_file).st_mode): + logger.warn('Pad file %s not exist or not a fifo file. Ignoring PAD parameters.' % (self.config.mot_pad_fifo_file)) + else: + args += ' -p %s' % (self.config.mot_pad) + args += ' -P %s' % (self.config.mot_pad_fifo_file) + hosts = self.config.output_zmq_host.replace(' ','').split(',') for host in hosts: args += ' tcp://%s;' % (host)