2015-11-26 04:44:54 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
|
|
|
|
|
#define MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
|
2015-11-26 04:44:54 -08:00
|
|
|
|
2016-04-27 01:19:58 -07:00
|
|
|
#include <memory>
|
2015-12-09 06:20:58 -08:00
|
|
|
#include <string>
|
Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
static int NumberOfCodecs();
static int Codec(int, CodecInst*);
static int Codec(const char*, CodecInst*, int, size_t);
static int Codec(const char*, int, size_t);
absl::optional<CodecInst> SendCodec() const;
bool RegisterReceiveCodec(int, const SdpAudioFormat&);
int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
int UnregisterReceiveCodec(uint8_t);
int32_t ReceiveCodec(CodecInst*);
absl::optional<SdpAudioFormat> ReceiveFormat();
As well as this method on RtpRtcp module:
int32_t RegisterSendPayload(const CodecInst&);
Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-11 12:22:10 +01:00
|
|
|
#include <utility>
|
2015-11-26 04:44:54 -08:00
|
|
|
#include <vector>
|
|
|
|
|
|
2018-06-19 13:26:36 +02:00
|
|
|
#include "absl/types/optional.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/audio_codecs/audio_decoder_factory.h"
|
|
|
|
|
#include "api/audio_codecs/audio_encoder.h"
|
2019-03-21 14:37:36 +01:00
|
|
|
#include "api/function_view.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/audio_coding/include/audio_coding_module_typedefs.h"
|
|
|
|
|
#include "modules/audio_coding/neteq/include/neteq.h"
|
|
|
|
|
#include "system_wrappers/include/clock.h"
|
2015-11-26 04:44:54 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
// forward declarations
|
|
|
|
|
class AudioDecoder;
|
|
|
|
|
class AudioEncoder;
|
|
|
|
|
class AudioFrame;
|
2019-02-15 15:21:47 +01:00
|
|
|
struct RTPHeader;
|
2015-11-26 04:44:54 -08:00
|
|
|
|
|
|
|
|
#define WEBRTC_10MS_PCM_AUDIO 960 // 16 bits super wideband 48 kHz
|
|
|
|
|
|
|
|
|
|
// Callback class used for sending data ready to be packetized
|
|
|
|
|
class AudioPacketizationCallback {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~AudioPacketizationCallback() {}
|
|
|
|
|
|
2019-04-25 16:31:18 +02:00
|
|
|
virtual int32_t SendData(AudioFrameType frame_type,
|
|
|
|
|
uint8_t payload_type,
|
|
|
|
|
uint32_t timestamp,
|
|
|
|
|
const uint8_t* payload_data,
|
2019-04-26 15:46:12 +02:00
|
|
|
size_t payload_len_bytes) = 0;
|
2015-11-26 04:44:54 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Callback class used for reporting VAD decision
|
|
|
|
|
class ACMVADCallback {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~ACMVADCallback() {}
|
|
|
|
|
|
2019-03-07 10:18:23 +01:00
|
|
|
virtual int32_t InFrameType(AudioFrameType frame_type) = 0;
|
2015-11-26 04:44:54 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class AudioCodingModule {
|
|
|
|
|
protected:
|
|
|
|
|
AudioCodingModule() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
struct Config {
|
2018-04-06 10:06:42 +02:00
|
|
|
explicit Config(
|
|
|
|
|
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory = nullptr);
|
2016-08-29 05:33:32 -07:00
|
|
|
Config(const Config&);
|
|
|
|
|
~Config();
|
2015-11-26 04:44:54 -08:00
|
|
|
|
|
|
|
|
NetEq::Config neteq_config;
|
|
|
|
|
Clock* clock;
|
2016-05-25 07:37:43 -07:00
|
|
|
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory;
|
2015-11-26 04:44:54 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static AudioCodingModule* Create(const Config& config);
|
|
|
|
|
virtual ~AudioCodingModule() = default;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Sender
|
|
|
|
|
//
|
|
|
|
|
|
2016-03-30 03:10:05 -07:00
|
|
|
// |modifier| is called exactly once with one argument: a pointer to the
|
|
|
|
|
// unique_ptr that holds the current encoder (which is null if there is no
|
|
|
|
|
// current encoder). For the duration of the call, |modifier| has exclusive
|
|
|
|
|
// access to the unique_ptr; it may call the encoder, steal the encoder and
|
|
|
|
|
// replace it with another encoder or with nullptr, etc.
|
|
|
|
|
virtual void ModifyEncoder(
|
2016-09-28 11:57:10 -07:00
|
|
|
rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) = 0;
|
2016-03-30 03:10:05 -07:00
|
|
|
|
|
|
|
|
// Utility method for simply replacing the existing encoder with a new one.
|
|
|
|
|
void SetEncoder(std::unique_ptr<AudioEncoder> new_encoder) {
|
|
|
|
|
ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
|
|
|
|
|
*encoder = std::move(new_encoder);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-26 04:44:54 -08:00
|
|
|
// int32_t RegisterTransportCallback()
|
|
|
|
|
// Register a transport callback which will be called to deliver
|
|
|
|
|
// the encoded buffers whenever Process() is called and a
|
|
|
|
|
// bit-stream is ready.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -transport : pointer to the callback class
|
|
|
|
|
// transport->SendData() is called whenever
|
|
|
|
|
// Process() is called and bit-stream is ready
|
|
|
|
|
// to deliver.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if the transport callback could not be registered
|
|
|
|
|
// 0 if registration is successful.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t RegisterTransportCallback(
|
|
|
|
|
AudioPacketizationCallback* transport) = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t Add10MsData()
|
|
|
|
|
// Add 10MS of raw (PCM) audio data and encode it. If the sampling
|
|
|
|
|
// frequency of the audio does not match the sampling frequency of the
|
|
|
|
|
// current encoder ACM will resample the audio. If an encoded packet was
|
|
|
|
|
// produced, it will be delivered via the callback object registered using
|
|
|
|
|
// RegisterTransportCallback, and the return value from this function will
|
|
|
|
|
// be the number of bytes encoded.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -audio_frame : the input audio frame, containing raw audio
|
2018-04-12 22:44:09 +02:00
|
|
|
// sampling frequency etc.
|
2015-11-26 04:44:54 -08:00
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// >= 0 number of bytes encoded.
|
|
|
|
|
// -1 some error occurred.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t Add10MsData(const AudioFrame& audio_frame) = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int SetPacketLossRate()
|
|
|
|
|
// Sets expected packet loss rate for encoding. Some encoders provide packet
|
|
|
|
|
// loss gnostic encoding to make stream less sensitive to packet losses,
|
|
|
|
|
// through e.g., FEC. No effects on codecs that do not provide such encoding.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -packet_loss_rate : expected packet loss rate (0 -- 100 inclusive).
|
|
|
|
|
//
|
|
|
|
|
// Return value
|
|
|
|
|
// -1 if failed to set packet loss rate,
|
|
|
|
|
// 0 if succeeded.
|
|
|
|
|
//
|
2016-10-12 05:00:55 -07:00
|
|
|
// This is only used in test code that rely on old ACM APIs.
|
|
|
|
|
// TODO(minyue): Remove it when possible.
|
2015-11-26 04:44:54 -08:00
|
|
|
virtual int SetPacketLossRate(int packet_loss_rate) = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// (VAD) Voice Activity Detection
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t RegisterVADCallback()
|
|
|
|
|
// Call this method to register a callback function which is called
|
|
|
|
|
// any time that ACM encounters an empty frame. That is a frame which is
|
|
|
|
|
// recognized inactive. Depending on the codec WebRtc VAD or internal codec
|
|
|
|
|
// VAD is employed to identify a frame as active/inactive.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -vad_callback : pointer to a callback function.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to register the callback function.
|
|
|
|
|
// 0 if the callback function is registered successfully.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t RegisterVADCallback(ACMVADCallback* vad_callback) = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Receiver
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t InitializeReceiver()
|
|
|
|
|
// Any decoder-related state of ACM will be initialized to the
|
|
|
|
|
// same state when ACM is created. This will not interrupt or
|
|
|
|
|
// effect encoding functionality of ACM. ACM would lose all the
|
|
|
|
|
// decoding-related settings by calling this function.
|
|
|
|
|
// For instance, all registered codecs are deleted and have to be
|
|
|
|
|
// registered again.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to initialize,
|
|
|
|
|
// 0 if succeeded.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t InitializeReceiver() = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t ReceiveFrequency()
|
|
|
|
|
// Get sampling frequency of the last received payload.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// non-negative the sampling frequency in Hertz.
|
|
|
|
|
// -1 if an error has occurred.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t ReceiveFrequency() const = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t PlayoutFrequency()
|
|
|
|
|
// Get sampling frequency of audio played out.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// the sampling frequency in Hertz.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t PlayoutFrequency() const = 0;
|
|
|
|
|
|
2017-03-27 07:15:49 -07:00
|
|
|
// Replace any existing decoders with the given payload type -> decoder map.
|
|
|
|
|
virtual void SetReceiveCodecs(
|
|
|
|
|
const std::map<int, SdpAudioFormat>& codecs) = 0;
|
|
|
|
|
|
2016-10-12 11:04:10 -07:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
static int NumberOfCodecs();
static int Codec(int, CodecInst*);
static int Codec(const char*, CodecInst*, int, size_t);
static int Codec(const char*, int, size_t);
absl::optional<CodecInst> SendCodec() const;
bool RegisterReceiveCodec(int, const SdpAudioFormat&);
int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
int UnregisterReceiveCodec(uint8_t);
int32_t ReceiveCodec(CodecInst*);
absl::optional<SdpAudioFormat> ReceiveFormat();
As well as this method on RtpRtcp module:
int32_t RegisterSendPayload(const CodecInst&);
Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-11 12:22:10 +01:00
|
|
|
// absl::optional<std::pair<int, SdpAudioFormat>> ReceiveCodec()
|
|
|
|
|
// Get the codec info associated with last received payload.
|
2016-10-12 11:04:10 -07:00
|
|
|
//
|
|
|
|
|
// Return value:
|
Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
static int NumberOfCodecs();
static int Codec(int, CodecInst*);
static int Codec(const char*, CodecInst*, int, size_t);
static int Codec(const char*, int, size_t);
absl::optional<CodecInst> SendCodec() const;
bool RegisterReceiveCodec(int, const SdpAudioFormat&);
int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
int UnregisterReceiveCodec(uint8_t);
int32_t ReceiveCodec(CodecInst*);
absl::optional<SdpAudioFormat> ReceiveFormat();
As well as this method on RtpRtcp module:
int32_t RegisterSendPayload(const CodecInst&);
Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-11 12:22:10 +01:00
|
|
|
// A payload type and SdpAudioFormat describing the format associated with
|
|
|
|
|
// the last received payload.
|
2016-10-12 11:04:10 -07:00
|
|
|
// An empty Optional if no payload has yet been received.
|
|
|
|
|
//
|
Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
static int NumberOfCodecs();
static int Codec(int, CodecInst*);
static int Codec(const char*, CodecInst*, int, size_t);
static int Codec(const char*, int, size_t);
absl::optional<CodecInst> SendCodec() const;
bool RegisterReceiveCodec(int, const SdpAudioFormat&);
int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
int UnregisterReceiveCodec(uint8_t);
int32_t ReceiveCodec(CodecInst*);
absl::optional<SdpAudioFormat> ReceiveFormat();
As well as this method on RtpRtcp module:
int32_t RegisterSendPayload(const CodecInst&);
Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-11 12:22:10 +01:00
|
|
|
virtual absl::optional<std::pair<int, SdpAudioFormat>> ReceiveCodec()
|
|
|
|
|
const = 0;
|
2016-10-12 11:04:10 -07:00
|
|
|
|
2015-11-26 04:44:54 -08:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t IncomingPacket()
|
|
|
|
|
// Call this function to insert a parsed RTP packet into ACM.
|
|
|
|
|
//
|
|
|
|
|
// Inputs:
|
|
|
|
|
// -incoming_payload : received payload.
|
|
|
|
|
// -payload_len_bytes : the length of payload in bytes.
|
|
|
|
|
// -rtp_info : the relevant information retrieved from RTP
|
|
|
|
|
// header.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to push in the payload
|
|
|
|
|
// 0 if payload is successfully pushed in.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t IncomingPacket(const uint8_t* incoming_payload,
|
|
|
|
|
const size_t payload_len_bytes,
|
2019-02-15 15:21:47 +01:00
|
|
|
const RTPHeader& rtp_header) = 0;
|
2015-11-26 04:44:54 -08:00
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int SetMinimumPlayoutDelay()
|
|
|
|
|
// Set a minimum for the playout delay, used for lip-sync. NetEq maintains
|
|
|
|
|
// such a delay unless channel condition yields to a higher delay.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -time_ms : minimum delay in milliseconds.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to set the delay,
|
|
|
|
|
// 0 if the minimum delay is set.
|
|
|
|
|
//
|
|
|
|
|
virtual int SetMinimumPlayoutDelay(int time_ms) = 0;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int SetMaximumPlayoutDelay()
|
|
|
|
|
// Set a maximum for the playout delay
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -time_ms : maximum delay in milliseconds.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to set the delay,
|
|
|
|
|
// 0 if the maximum delay is set.
|
|
|
|
|
//
|
|
|
|
|
virtual int SetMaximumPlayoutDelay(int time_ms) = 0;
|
|
|
|
|
|
2019-02-06 09:45:56 +01:00
|
|
|
// Sets a base minimum for the playout delay. Base minimum delay sets lower
|
|
|
|
|
// bound minimum delay value which is set via SetMinimumPlayoutDelay.
|
|
|
|
|
//
|
|
|
|
|
// Returns true if value was successfully set, false overwise.
|
|
|
|
|
virtual bool SetBaseMinimumPlayoutDelayMs(int delay_ms) = 0;
|
|
|
|
|
|
|
|
|
|
// Returns current value of base minimum delay in milliseconds.
|
|
|
|
|
virtual int GetBaseMinimumPlayoutDelayMs() const = 0;
|
|
|
|
|
|
2016-04-06 01:39:22 -07:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t PlayoutTimestamp()
|
|
|
|
|
// The send timestamp of an RTP packet is associated with the decoded
|
|
|
|
|
// audio of the packet in question. This function returns the timestamp of
|
|
|
|
|
// the latest audio obtained by calling PlayoutData10ms(), or empty if no
|
|
|
|
|
// valid timestamp is available.
|
|
|
|
|
//
|
2018-06-19 13:26:36 +02:00
|
|
|
virtual absl::optional<uint32_t> PlayoutTimestamp() = 0;
|
2015-11-26 04:44:54 -08:00
|
|
|
|
2016-08-22 15:39:53 -07:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int FilteredCurrentDelayMs()
|
|
|
|
|
// Returns the current total delay from NetEq (packet buffer and sync buffer)
|
|
|
|
|
// in ms, with smoothing applied to even out short-time fluctuations due to
|
|
|
|
|
// jitter. The packet buffer part of the delay is not updated during DTX/CNG
|
|
|
|
|
// periods.
|
|
|
|
|
//
|
|
|
|
|
virtual int FilteredCurrentDelayMs() const = 0;
|
|
|
|
|
|
2017-11-29 09:14:04 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int FilteredCurrentDelayMs()
|
|
|
|
|
// Returns the current target delay for NetEq in ms.
|
|
|
|
|
//
|
|
|
|
|
virtual int TargetDelayMs() const = 0;
|
|
|
|
|
|
2015-11-26 04:44:54 -08:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t PlayoutData10Ms(
|
|
|
|
|
// Get 10 milliseconds of raw audio data for playout, at the given sampling
|
|
|
|
|
// frequency. ACM will perform a resampling if required.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -desired_freq_hz : the desired sampling frequency, in Hertz, of the
|
|
|
|
|
// output audio. If set to -1, the function returns
|
|
|
|
|
// the audio at the current sampling frequency.
|
|
|
|
|
//
|
|
|
|
|
// Output:
|
|
|
|
|
// -audio_frame : output audio frame which contains raw audio data
|
2018-04-12 22:44:09 +02:00
|
|
|
// and other relevant parameters.
|
2016-05-13 03:45:24 -07:00
|
|
|
// -muted : if true, the sample data in audio_frame is not
|
|
|
|
|
// populated, and must be interpreted as all zero.
|
2015-11-26 04:44:54 -08:00
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if the function fails,
|
|
|
|
|
// 0 if the function succeeds.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t PlayoutData10Ms(int32_t desired_freq_hz,
|
2016-05-13 03:45:24 -07:00
|
|
|
AudioFrame* audio_frame,
|
|
|
|
|
bool* muted) = 0;
|
|
|
|
|
|
2015-11-26 04:44:54 -08:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// statistics
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// int32_t GetNetworkStatistics()
|
|
|
|
|
// Get network statistics. Note that the internal statistics of NetEq are
|
|
|
|
|
// reset by this call.
|
|
|
|
|
//
|
|
|
|
|
// Input:
|
|
|
|
|
// -network_statistics : a structure that contains network statistics.
|
|
|
|
|
//
|
|
|
|
|
// Return value:
|
|
|
|
|
// -1 if failed to set the network statistics,
|
|
|
|
|
// 0 if statistics are set successfully.
|
|
|
|
|
//
|
|
|
|
|
virtual int32_t GetNetworkStatistics(
|
|
|
|
|
NetworkStatistics* network_statistics) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void GetDecodingCallStatistics(
|
|
|
|
|
AudioDecodingCallStats* call_stats) const = 0;
|
2017-09-08 08:13:19 -07:00
|
|
|
|
|
|
|
|
virtual ANAStats GetANAStats() const = 0;
|
2015-11-26 04:44:54 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
|