commit | 332274dfefdf1f7a106c9f035f83eb8b001b2e44 | [log] [tgz] |
---|---|---|
author | Minyue Li <minyue@webrtc.org> | Wed Nov 13 16:05:46 2019 +0100 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Nov 19 14:14:06 2019 +0000 |
tree | 4823499ef371e5be5ec60da5fe18652bb57ec00a | |
parent | 67e5bd34421ddee7dbe3a9eb4cabbec71c15e093 [diff] [blame] |
Adding GetInDtx to WebRTC Opus Interface. Bug: webrtc:11085 Change-Id: Ie9152cbe3f3c70f6febafb877852d68a831bcae9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159708 Commit-Queue: Minyue Li <minyue@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29834}
diff --git a/modules/audio_coding/codecs/opus/opus_interface.cc b/modules/audio_coding/codecs/opus/opus_interface.cc index 2f475cb..f98afd7 100644 --- a/modules/audio_coding/codecs/opus/opus_interface.cc +++ b/modules/audio_coding/codecs/opus/opus_interface.cc
@@ -370,6 +370,18 @@ } } +int32_t WebRtcOpus_GetInDtx(OpusEncInst* inst) { + if (!inst) { + return -1; + } + int32_t in_dtx; + if (ENCODER_CTL(inst, OPUS_GET_IN_DTX(&in_dtx)) == 0) { + return in_dtx; + } else { + return -1; + } +} + int16_t WebRtcOpus_DecoderCreate(OpusDecInst** inst, size_t channels, int sample_rate_hz) {