xref: /aosp_15_r20/external/webrtc/modules/audio_coding/codecs/opus/opus_inst.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
12 #define MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
13 
14 #include <stddef.h>
15 
16 #include "rtc_base/ignore_wundef.h"
17 
18 RTC_PUSH_IGNORING_WUNDEF()
19 #include "third_party/opus/src/include/opus.h"
20 #include "third_party/opus/src/include/opus_multistream.h"
21 RTC_POP_IGNORING_WUNDEF()
22 
23 struct WebRtcOpusEncInst {
24   OpusEncoder* encoder;
25   OpusMSEncoder* multistream_encoder;
26   size_t channels;
27   int in_dtx_mode;
28   bool avoid_noise_pumping_during_dtx;
29   int sample_rate_hz;
30   float smooth_energy_non_active_frames;
31 };
32 
33 struct WebRtcOpusDecInst {
34   OpusDecoder* decoder;
35   OpusMSDecoder* multistream_decoder;
36   int prev_decoded_samples;
37   bool plc_use_prev_decoded_samples;
38   size_t channels;
39   int in_dtx_mode;
40   int sample_rate_hz;
41 };
42 
43 #endif  // MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
44