From 90d1979d77ab07f9524e6e7738f135636c45bb74 Mon Sep 17 00:00:00 2001 From: "xians@webrtc.org" Date: Tue, 30 Sep 2014 15:15:22 +0000 Subject: [PATCH] Fixed the android build by making the interface pure virtual. TBR=asapersson@webrtc.org, bjornv@webrtc.org, Review URL: https://webrtc-codereview.appspot.com/24789004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7338 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/webrtc/fakewebrtcvoiceengine.h | 2 ++ webrtc/modules/audio_processing/include/audio_processing.h | 2 +- webrtc/modules/audio_processing/include/mock_audio_processing.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/talk/media/webrtc/fakewebrtcvoiceengine.h b/talk/media/webrtc/fakewebrtcvoiceengine.h index 52a50ff28..542581a8f 100644 --- a/talk/media/webrtc/fakewebrtcvoiceengine.h +++ b/talk/media/webrtc/fakewebrtcvoiceengine.h @@ -38,6 +38,7 @@ #include "talk/media/webrtc/fakewebrtccommon.h" #include "talk/media/webrtc/webrtcvoe.h" #include "webrtc/base/basictypes.h" +#include "webrtc/base/fileutils.h" #include "webrtc/base/gunit.h" #include "webrtc/base/stringutils.h" #ifdef USE_WEBRTC_DEV_BRANCH @@ -128,6 +129,7 @@ class FakeAudioProcessing : public webrtc::AudioProcessing { WEBRTC_STUB_CONST(delay_offset_ms, ()); WEBRTC_STUB(StartDebugRecording, (const char filename[kMaxFilenameSize])); WEBRTC_STUB(StartDebugRecording, (FILE* handle)); + WEBRTC_STUB(StartDebugRecording, (rtc::PlatformFile handle)); WEBRTC_STUB(StopDebugRecording, ()); virtual webrtc::EchoCancellation* echo_cancellation() const OVERRIDE { return NULL; diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h index 53157ae66..bcc83ae47 100644 --- a/webrtc/modules/audio_processing/include/audio_processing.h +++ b/webrtc/modules/audio_processing/include/audio_processing.h @@ -329,7 +329,7 @@ class AudioProcessing { // Same as above but uses an existing PlatformFile handle. Takes ownership // of |handle| and closes it at StopDebugRecording(). // TODO(xians): Make this interface pure virtual. - virtual int StartDebugRecording(rtc::PlatformFile handle) { return -1; } + virtual int StartDebugRecording(rtc::PlatformFile handle) = 0; // Stops recording debugging information, and closes the file. Recording // cannot be resumed in the same file (without overwriting it). diff --git a/webrtc/modules/audio_processing/include/mock_audio_processing.h b/webrtc/modules/audio_processing/include/mock_audio_processing.h index 8258bb6cf..3f2b1f951 100644 --- a/webrtc/modules/audio_processing/include/mock_audio_processing.h +++ b/webrtc/modules/audio_processing/include/mock_audio_processing.h @@ -239,6 +239,8 @@ class MockAudioProcessing : public AudioProcessing { int(const char filename[kMaxFilenameSize])); MOCK_METHOD1(StartDebugRecording, int(FILE* handle)); + MOCK_METHOD1(StartDebugRecording, + int(rtc::PlatformFile handle)); MOCK_METHOD0(StopDebugRecording, int()); virtual MockEchoCancellation* echo_cancellation() const {