OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/environment.h" | 5 #include "base/environment.h" |
6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
7 #include "content/renderer/media/webrtc_audio_capturer.h" | 7 #include "content/renderer/media/webrtc_audio_capturer.h" |
8 #include "content/renderer/media/webrtc_audio_device_impl.h" | 8 #include "content/renderer/media/webrtc_audio_device_impl.h" |
9 #include "content/renderer/media/webrtc_audio_renderer.h" | 9 #include "content/renderer/media/webrtc_audio_renderer.h" |
10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 channels_(0) { | 118 channels_(0) { |
119 } | 119 } |
120 virtual ~WebRTCMediaProcessImpl() {} | 120 virtual ~WebRTCMediaProcessImpl() {} |
121 | 121 |
122 // TODO(henrika): Refactor in WebRTC and convert to Chrome coding style. | 122 // TODO(henrika): Refactor in WebRTC and convert to Chrome coding style. |
123 virtual void Process(const int channel, | 123 virtual void Process(const int channel, |
124 const webrtc::ProcessingTypes type, | 124 const webrtc::ProcessingTypes type, |
125 WebRtc_Word16 audio_10ms[], | 125 WebRtc_Word16 audio_10ms[], |
126 const int length, | 126 const int length, |
127 const int sampling_freq, | 127 const int sampling_freq, |
128 const bool is_stereo) { | 128 const bool is_stereo) OVERRIDE { |
129 base::AutoLock auto_lock(lock_); | 129 base::AutoLock auto_lock(lock_); |
130 channel_id_ = channel; | 130 channel_id_ = channel; |
131 type_ = type; | 131 type_ = type; |
132 packet_size_ = length; | 132 packet_size_ = length; |
133 sample_rate_ = sampling_freq; | 133 sample_rate_ = sampling_freq; |
134 channels_ = (is_stereo ? 2 : 1); | 134 channels_ = (is_stereo ? 2 : 1); |
135 if (event_) { | 135 if (event_) { |
136 // Signal that a new callback has been received. | 136 // Signal that a new callback has been received. |
137 event_->Signal(); | 137 event_->Signal(); |
138 } | 138 } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 531 |
532 renderer->Stop(); | 532 renderer->Stop(); |
533 EXPECT_EQ(0, base->StopSend(ch)); | 533 EXPECT_EQ(0, base->StopSend(ch)); |
534 EXPECT_EQ(0, base->StopPlayout(ch)); | 534 EXPECT_EQ(0, base->StopPlayout(ch)); |
535 | 535 |
536 EXPECT_EQ(0, base->DeleteChannel(ch)); | 536 EXPECT_EQ(0, base->DeleteChannel(ch)); |
537 EXPECT_EQ(0, base->Terminate()); | 537 EXPECT_EQ(0, base->Terminate()); |
538 } | 538 } |
539 | 539 |
540 } // namespace content | 540 } // namespace content |
OLD | NEW |