blob: 0bc5d61e800e793a83a3d0ba4145721af7fa4b8a [file] [log] [blame]
phoglund37ebcf02016-01-08 05:04:57 -08001/*
ossu7bb87ee2017-01-23 04:56:25 -08002 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
phoglund37ebcf02016-01-08 05:04:57 -08003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * 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.
phoglund37ebcf02016-01-08 05:04:57 -08009 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "api/mediastreaminterface.h"
Ivo Creusen21eb9fc2017-12-12 10:45:51 +010012#include "rtc_base/checks.h"
13#include "rtc_base/logging.h"
phoglund37ebcf02016-01-08 05:04:57 -080014
15namespace webrtc {
16
ossu7bb87ee2017-01-23 04:56:25 -080017const char MediaStreamTrackInterface::kVideoKind[] = "video";
18const char MediaStreamTrackInterface::kAudioKind[] = "audio";
phoglund37ebcf02016-01-08 05:04:57 -080019
Ivo Creusen21eb9fc2017-12-12 10:45:51 +010020void AudioProcessorInterface::GetStats(AudioProcessorStats* /*stats*/) {
21 RTC_NOTREACHED() << "Old-style GetStats() is called but it has no "
22 << "implementation.";
23 RTC_LOG(LS_ERROR) << "Old-style GetStats() is called but it has no "
24 << "implementation.";
25}
26
Ivo Creusenae026092017-11-20 13:07:16 +010027// TODO(ivoc): Remove this when the function becomes pure virtual.
28AudioProcessorInterface::AudioProcessorStatistics
29AudioProcessorInterface::GetStats(bool /*has_remote_tracks*/) {
30 AudioProcessorStats stats;
31 GetStats(&stats);
32 AudioProcessorStatistics new_stats;
Ivo Creusen56d46092017-11-24 17:29:59 +010033 new_stats.apm_statistics.divergent_filter_fraction =
34 stats.aec_divergent_filter_fraction;
35 new_stats.apm_statistics.delay_median_ms = stats.echo_delay_median_ms;
36 new_stats.apm_statistics.delay_standard_deviation_ms =
37 stats.echo_delay_std_ms;
38 new_stats.apm_statistics.echo_return_loss = stats.echo_return_loss;
39 new_stats.apm_statistics.echo_return_loss_enhancement =
40 stats.echo_return_loss_enhancement;
41 new_stats.apm_statistics.residual_echo_likelihood =
42 stats.residual_echo_likelihood;
43 new_stats.apm_statistics.residual_echo_likelihood_recent_max =
44 stats.residual_echo_likelihood_recent_max;
Ivo Creusenae026092017-11-20 13:07:16 +010045 return new_stats;
46}
47
phoglund37ebcf02016-01-08 05:04:57 -080048} // namespace webrtc