Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: content/renderer/media/webrtc_audio_capturer_unittest.cc

Issue 90743004: Add generic interfaces for the sinks of the media stream audio track (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a DCHECK(other) and rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_capturer_unittest.cc
diff --git a/content/renderer/media/webrtc_audio_capturer_unittest.cc b/content/renderer/media/webrtc_audio_capturer_unittest.cc
index 08a3d9d6122b66d5751394a15da8c9e7eb850c5c..3f6fe18418c779dd79ed0b0cb919ab1f6ecead5b 100644
--- a/content/renderer/media/webrtc_audio_capturer_unittest.cc
+++ b/content/renderer/media/webrtc_audio_capturer_unittest.cc
@@ -65,20 +65,20 @@ class MockCapturerSource : public media::AudioCapturerSource {
virtual ~MockCapturerSource() {}
};
-class MockWebRtcAudioCapturerSink : public WebRtcAudioCapturerSink {
+class MockWebRtcAudioCapturerSink : public PeerConnectionAudioSink {
tommi (sloooow) - chröme 2013/11/29 13:00:20 change name to MockPeerConnectionAudioSink. Alter
no longer working on chromium 2013/11/29 15:02:04 Done.
public:
MockWebRtcAudioCapturerSink() {}
~MockWebRtcAudioCapturerSink() {}
- MOCK_METHOD9(CaptureData, int(const std::vector<int>& channels,
- const int16* audio_data,
- int sample_rate,
- int number_of_channels,
- int number_of_frames,
- int audio_delay_milliseconds,
- int current_volume,
- bool need_audio_processing,
- bool key_pressed));
- MOCK_METHOD1(SetCaptureFormat, void(const media::AudioParameters& params));
+ MOCK_METHOD9(OnData, int(const int16* audio_data,
+ int sample_rate,
+ int number_of_channels,
+ int number_of_frames,
+ const std::vector<int>& channels,
+ int audio_delay_milliseconds,
+ int current_volume,
+ bool need_audio_processing,
+ bool key_pressed));
+ MOCK_METHOD1(OnSetFormat, void(const media::AudioParameters& params));
};
} // namespace
@@ -145,12 +145,12 @@ TEST_F(WebRtcAudioCapturerTest, VerifyAudioParams) {
media::AudioCapturerSource::CaptureCallback* callback =
static_cast<media::AudioCapturerSource::CaptureCallback*>(capturer_);
// Verify the sink is getting the correct values.
- EXPECT_CALL(*sink, SetCaptureFormat(_));
+ EXPECT_CALL(*sink, OnSetFormat(_));
EXPECT_CALL(*sink,
- CaptureData(_, _, params_.sample_rate(), params_.channels(),
- expected_buffer_size, delay_ms,
- expected_volume_value, expected_need_audio_processing,
- key_pressed)).Times(AtLeast(1));
+ OnData(_, params_.sample_rate(), params_.channels(),
+ expected_buffer_size, _, delay_ms,
+ expected_volume_value, expected_need_audio_processing,
+ key_pressed)).Times(AtLeast(1));
callback->Capture(audio_bus.get(), delay_ms, volume, key_pressed);
// Verify the cached values in the capturer fits what we expect.

Powered by Google App Engine
This is Rietveld 408576698