Skip to content

Commit

Permalink
Add mot-encoder support for toolame-dab
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQueret committed Feb 9, 2016
1 parent 512af5c commit 813432f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 813432f

Please sign in to comment.