implement transcoder options file and auto mode #219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch implements transcoder options file allowing to easily define modules which transcoding should be enabled or not and also implements an automatic transcoding mode (in this mode transcoding will get enabled only if there are clients linked on the module with different codecs). Options on file (modules and ambed ip) can be changed and these will take "immediate" effect without the need to restart xlxd (the file will be monitored every 30s for changes and reload options if changed), this can also be useful if ambed is on dynamic IP (an external script may be easily made to monitor IP changes and update options file). The transcoder state (off/on/auto) is also added on modules list page of the dashboard.
The automatic transcoding mode may be useful to avoid wasting transcoder channels unnecessarily if all clients on a module use mode(s) with the same codec, having just one small disadvantage: for example if on a module there are only D-Star clients linked and none in DMR/YSF then the transcoding is not active, however if suddenly someone links on DMR/YSF while someone already transmitting on D-Star then this 1st DMR/YSF client will listen this ongoing transmission without audio, this is because transcoding is not active yet, only when a new transmission is started (after there are users linked on module with different codec) the transcoder will get active. Anyway this is a small inconvenience and I think this mode is useful mainly for modules where transcoding is used occasionally.
Note that for DPlus "listening" mode users, before they transmit then reflector doesn't know what module they are in, then these don't trigger transcoding in automatic mode (if remaining clients on the module are in DMR/YSF), however these DPlus users obviously just need to key PTT shortly to get module and trigger auto transcoding.