summaryrefslogtreecommitdiff
path: root/modules/opus
diff options
context:
space:
mode:
authorSebastian Reimers <service@it-sreimers.de>2014-05-19 19:08:01 +0200
committerSebastian Reimers <info@miete-admin.de>2014-11-02 11:46:36 +0100
commitddc9fb1e453a91b3bb3320755c71607bd16c2a57 (patch)
tree236323132259204e27b57bcebbc533ed6812817c /modules/opus
parent2c03352fd7e05d3fbc6b72f02e5173a6b4dc38f6 (diff)
opus fmtp config
Diffstat (limited to 'modules/opus')
-rw-r--r--modules/opus/opus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/opus/opus.c b/modules/opus/opus.c
index 28b24b9..62cffaa 100644
--- a/modules/opus/opus.c
+++ b/modules/opus/opus.c
@@ -41,6 +41,17 @@ static struct aucodec opus = {
static int module_init(void)
{
+ struct conf *conf = conf_cur();
+ uint32_t value;
+ static char fmtp[128];
+
+ if (0 == conf_get_u32(conf, "opus_bitrate", &value)) {
+ (void)re_snprintf(fmtp, sizeof(fmtp),
+ "stereo=1;sprop-stereo=1;maxaveragebitrate=%d",
+ value);
+ opus.fmtp = fmtp;
+ }
+
aucodec_register(&opus);
return 0;