From 21eb9fc71c1c95d1c40e1f5104b815ad963cb217 Mon Sep 17 00:00:00 2001 From: Ivo Creusen Date: Tue, 12 Dec 2017 10:45:51 +0100 Subject: [PATCH] Make the old GetStats interface on AudioProcessorInterface impure. This is the first step towards removing this function from the interface. Once all implementers of the interface remove their implementations this can be removed. Bug: webrtc:8572 Change-Id: Ia8f7f1b6949a482787df67b193d4cf999142e06e Reviewed-on: https://webrtc-review.googlesource.com/27620 Reviewed-by: Karl Wiberg Commit-Queue: Ivo Creusen Cr-Commit-Position: refs/heads/master@{#21271} --- api/mediastreaminterface.cc | 9 +++++++++ api/mediastreaminterface.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/api/mediastreaminterface.cc b/api/mediastreaminterface.cc index 4821da83b3..0bc5d61e80 100644 --- a/api/mediastreaminterface.cc +++ b/api/mediastreaminterface.cc @@ -9,12 +9,21 @@ */ #include "api/mediastreaminterface.h" +#include "rtc_base/checks.h" +#include "rtc_base/logging.h" namespace webrtc { const char MediaStreamTrackInterface::kVideoKind[] = "video"; const char MediaStreamTrackInterface::kAudioKind[] = "audio"; +void AudioProcessorInterface::GetStats(AudioProcessorStats* /*stats*/) { + RTC_NOTREACHED() << "Old-style GetStats() is called but it has no " + << "implementation."; + RTC_LOG(LS_ERROR) << "Old-style GetStats() is called but it has no " + << "implementation."; +} + // TODO(ivoc): Remove this when the function becomes pure virtual. AudioProcessorInterface::AudioProcessorStatistics AudioProcessorInterface::GetStats(bool /*has_remote_tracks*/) { diff --git a/api/mediastreaminterface.h b/api/mediastreaminterface.h index 448cf9ad0c..1699e4cccb 100644 --- a/api/mediastreaminterface.h +++ b/api/mediastreaminterface.h @@ -258,7 +258,7 @@ class AudioProcessorInterface : public rtc::RefCountInterface { }; // Get audio processor statistics. - virtual void GetStats(AudioProcessorStats* stats) = 0; + virtual void GetStats(AudioProcessorStats* stats); // Get audio processor statistics. The |has_remote_tracks| argument should be // set if there are active remote tracks (this would usually be true during