commit | 50b8c399c9ef7dce4777b4a2ef178240ef3948de | [log] [tgz] |
---|---|---|
author | Alex Loiko <aleloi@webrtc.org> | Wed Apr 03 15:12:01 2019 +0200 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Apr 04 14:06:44 2019 +0000 |
tree | e9eb12303bd400b0cb953377b9199e67dbb86b05 | |
parent | 21f6fd79ad058fc7f33f989eec67a60c77157fea [diff] [blame] |
Generalize the C-language Opus interface. Switch to explicit channel mappings (RFC 7845) when creating multi-stream Opus en/de-coders. The responsibility of setting up the channel mappings will shift from WebRTC to the WebRTC user. See https://webrtc-review.googlesource.com/c/src/+/121764 for the current vision. See also the first child CL https://webrtc-review.googlesource.com/c/src/+/129768 that sets up the Decoder to use this code. Bug: webrtc:8649 Change-Id: I55959a293d54bb4c982eff68ec107c5ef8666c5c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129767 Commit-Queue: Alex Loiko <aleloi@webrtc.org> Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27452}
diff --git a/modules/audio_coding/codecs/opus/opus_inst.h b/modules/audio_coding/codecs/opus/opus_inst.h index 0b31181..08c1e0f 100644 --- a/modules/audio_coding/codecs/opus/opus_inst.h +++ b/modules/audio_coding/codecs/opus/opus_inst.h
@@ -21,19 +21,15 @@ RTC_POP_IGNORING_WUNDEF() struct WebRtcOpusEncInst { - union { - OpusEncoder* encoder; - OpusMSEncoder* multistream_encoder; - } encoder; + OpusEncoder* encoder; + OpusMSEncoder* multistream_encoder; size_t channels; int in_dtx_mode; }; struct WebRtcOpusDecInst { - union { - OpusDecoder* decoder; - OpusMSDecoder* multistream_decoder; - } decoder; + OpusDecoder* decoder; + OpusMSDecoder* multistream_decoder; int prev_decoded_samples; size_t channels; int in_dtx_mode;