blob: 92c5c354a79fd88914ed0ed870b7dd60dcbc5536 [file] [log] [blame]
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +00001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
12#define MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +000013
minyue9a7c8382015-11-16 08:07:01 -080014#include <stddef.h>
15
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#include "rtc_base/ignore_wundef.h"
kwiberg77eab702016-09-28 17:42:01 -070017
18RTC_PUSH_IGNORING_WUNDEF()
Oleh Prypincc7bd852022-06-28 09:21:44 +020019#include "third_party/opus/src/include/opus.h"
20#include "third_party/opus/src/include/opus_multistream.h"
kwiberg77eab702016-09-28 17:42:01 -070021RTC_POP_IGNORING_WUNDEF()
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +000022
23struct WebRtcOpusEncInst {
Alex Loiko50b8c392019-04-03 15:12:01 +020024 OpusEncoder* encoder;
25 OpusMSEncoder* multistream_encoder;
Peter Kasting69558702016-01-12 16:26:35 -080026 size_t channels;
minyue@webrtc.org0ca768b2014-12-11 16:09:35 +000027 int in_dtx_mode;
Jesús de Vicente Peña3b9abd82021-02-05 09:05:46 +010028 bool avoid_noise_pumping_during_dtx;
29 int sample_rate_hz;
30 float smooth_energy_non_active_frames;
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +000031};
32
33struct WebRtcOpusDecInst {
Alex Loiko50b8c392019-04-03 15:12:01 +020034 OpusDecoder* decoder;
35 OpusMSDecoder* multistream_decoder;
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +000036 int prev_decoded_samples;
Minyue Li8e83c7a2019-11-04 14:47:52 +010037 bool plc_use_prev_decoded_samples;
Peter Kasting69558702016-01-12 16:26:35 -080038 size_t channels;
minyue@webrtc.org0ca768b2014-12-11 16:09:35 +000039 int in_dtx_mode;
Karl Wiberga1d1a1e2019-05-28 14:41:07 +020040 int sample_rate_hz;
minyue@webrtc.org0040a6e2014-08-04 14:41:57 +000041};
42
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020043#endif // MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INST_H_