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 "content/test/webrtc_audio_device_test.h" | 5 #include "content/test/webrtc_audio_device_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(int* sample_rate) { | 269 void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(int* sample_rate) { |
270 EXPECT_TRUE(audio_util_callback_); | 270 EXPECT_TRUE(audio_util_callback_); |
271 *sample_rate = audio_util_callback_ ? | 271 *sample_rate = audio_util_callback_ ? |
272 audio_util_callback_->GetAudioInputHardwareSampleRate( | 272 audio_util_callback_->GetAudioInputHardwareSampleRate( |
273 media::AudioManagerBase::kDefaultDeviceId) : 0; | 273 media::AudioManagerBase::kDefaultDeviceId) : 0; |
274 } | 274 } |
275 | 275 |
276 void WebRTCAudioDeviceTest::OnGetHardwareInputChannelLayout( | 276 void WebRTCAudioDeviceTest::OnGetHardwareInputChannelLayout( |
277 ChannelLayout* layout) { | 277 media::ChannelLayout* layout) { |
278 EXPECT_TRUE(audio_util_callback_); | 278 EXPECT_TRUE(audio_util_callback_); |
279 *layout = audio_util_callback_ ? | 279 *layout = !audio_util_callback_ ? media::CHANNEL_LAYOUT_NONE : |
280 audio_util_callback_->GetAudioInputHardwareChannelLayout( | 280 audio_util_callback_->GetAudioInputHardwareChannelLayout( |
281 media::AudioManagerBase::kDefaultDeviceId) : CHANNEL_LAYOUT_NONE; | 281 media::AudioManagerBase::kDefaultDeviceId); |
282 } | 282 } |
283 | 283 |
284 // IPC::Listener implementation. | 284 // IPC::Listener implementation. |
285 bool WebRTCAudioDeviceTest::OnMessageReceived(const IPC::Message& message) { | 285 bool WebRTCAudioDeviceTest::OnMessageReceived(const IPC::Message& message) { |
286 if (render_thread_) { | 286 if (render_thread_) { |
287 IPC::ChannelProxy::MessageFilter* filter = | 287 IPC::ChannelProxy::MessageFilter* filter = |
288 render_thread_->audio_input_message_filter(); | 288 render_thread_->audio_input_message_filter(); |
289 if (filter->OnMessageReceived(message)) | 289 if (filter->OnMessageReceived(message)) |
290 return true; | 290 return true; |
291 | 291 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 WebRTCTransportImpl::~WebRTCTransportImpl() {} | 368 WebRTCTransportImpl::~WebRTCTransportImpl() {} |
369 | 369 |
370 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { | 370 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { |
371 return network_->ReceivedRTPPacket(channel, data, len); | 371 return network_->ReceivedRTPPacket(channel, data, len); |
372 } | 372 } |
373 | 373 |
374 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, | 374 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, |
375 int len) { | 375 int len) { |
376 return network_->ReceivedRTCPPacket(channel, data, len); | 376 return network_->ReceivedRTCPPacket(channel, data, len); |
377 } | 377 } |
OLD | NEW |