| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/media/webrtc/peer_connection_dependency_factory.h" | 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 DCHECK(CalledOnValidThread()); | 637 DCHECK(CalledOnValidThread()); |
| 638 DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()); | 638 DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()); |
| 639 DCHECK(PeerConnectionFactoryCreated()); | 639 DCHECK(PeerConnectionFactoryCreated()); |
| 640 | 640 |
| 641 base::File file = IPC::PlatformFileForTransitToFile(file_handle); | 641 base::File file = IPC::PlatformFileForTransitToFile(file_handle); |
| 642 DCHECK(file.IsValid()); | 642 DCHECK(file.IsValid()); |
| 643 | 643 |
| 644 // |pc_factory_| always takes ownership of |aec_dump_file|. If StartAecDump() | 644 // |pc_factory_| always takes ownership of |aec_dump_file|. If StartAecDump() |
| 645 // fails, |aec_dump_file| will be closed. | 645 // fails, |aec_dump_file| will be closed. |
| 646 if (!GetPcFactory()->StartAecDump(file.TakePlatformFile())) | 646 if (!GetPcFactory()->StartAecDump(file.TakePlatformFile())) |
| 647 VLOG(1) << "Could not start AEC dump."; | 647 DVLOG(1) << "Could not start AEC dump."; |
| 648 } | 648 } |
| 649 | 649 |
| 650 void PeerConnectionDependencyFactory::OnDisableAecDump() { | 650 void PeerConnectionDependencyFactory::OnDisableAecDump() { |
| 651 DCHECK(CalledOnValidThread()); | 651 DCHECK(CalledOnValidThread()); |
| 652 DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()); | 652 DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()); |
| 653 // Do nothing. We never disable AEC dump for non-track-processing case. | 653 // Do nothing. We never disable AEC dump for non-track-processing case. |
| 654 } | 654 } |
| 655 | 655 |
| 656 void PeerConnectionDependencyFactory::OnIpcClosing() { | 656 void PeerConnectionDependencyFactory::OnIpcClosing() { |
| 657 DCHECK(CalledOnValidThread()); | 657 DCHECK(CalledOnValidThread()); |
| 658 aec_dump_message_filter_ = NULL; | 658 aec_dump_message_filter_ = NULL; |
| 659 } | 659 } |
| 660 | 660 |
| 661 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 661 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 662 if (audio_device_.get()) | 662 if (audio_device_.get()) |
| 663 return; | 663 return; |
| 664 | 664 |
| 665 audio_device_ = new WebRtcAudioDeviceImpl(); | 665 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 } // namespace content | 668 } // namespace content |
| OLD | NEW |