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

Unified Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 671793004: Clean up the media stream audio track code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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/peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index 33406f213753dde260dfe8df97fc86a47d36a671..74f354ed241195d2d102563b266fd1310d45bf27 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -174,8 +174,6 @@ PeerConnectionDependencyFactory::PeerConnectionDependencyFactory(
PeerConnectionDependencyFactory::~PeerConnectionDependencyFactory() {
CleanupPeerConnectionFactory();
- if (aec_dump_message_filter_.get())
- aec_dump_message_filter_->RemoveDelegate(this);
}
blink::WebRTCPeerConnectionHandler*
@@ -352,17 +350,6 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
factory_options.disable_encryption =
cmd_line->HasSwitch(switches::kDisableWebRtcEncryption);
pc_factory_->SetOptions(factory_options);
-
- // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
- // is removed.
- if (!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
- aec_dump_message_filter_ = AecDumpMessageFilter::Get();
- // In unit tests not creating a message filter, |aec_dump_message_filter_|
- // will be NULL. We can just ignore that. Other unit tests and browser tests
- // ensure that we do get the filter when we should.
- if (aec_dump_message_filter_.get())
- aec_dump_message_filter_->AddDelegate(this);
- }
}
bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() {
@@ -456,12 +443,6 @@ void PeerConnectionDependencyFactory::CreateLocalAudioTrack(
void PeerConnectionDependencyFactory::StartLocalAudioTrack(
WebRtcLocalAudioTrack* audio_track) {
- // Add the WebRtcAudioDevice as the sink to the local audio track.
- // TODO(xians): Remove the following line of code after the APM in WebRTC is
- // completely deprecated. See http://crbug/365672.
- if (!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled())
- audio_track->AddSink(GetWebRtcAudioDevice());
-
// Start the audio track. This will hook the |audio_track| to the capturer
// as the sink of the audio, and only start the source of the capturer if
// it is the first audio track connecting to the capturer.
@@ -622,32 +603,6 @@ PeerConnectionDependencyFactory::GetWebRtcWorkerThread() const {
return chrome_worker_thread_.message_loop_proxy();
}
-void PeerConnectionDependencyFactory::OnAecDumpFile(
- const IPC::PlatformFileForTransit& file_handle) {
- DCHECK(CalledOnValidThread());
- DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled());
- DCHECK(PeerConnectionFactoryCreated());
-
- base::File file = IPC::PlatformFileForTransitToFile(file_handle);
- DCHECK(file.IsValid());
-
- // |pc_factory_| always takes ownership of |aec_dump_file|. If StartAecDump()
- // fails, |aec_dump_file| will be closed.
- if (!GetPcFactory()->StartAecDump(file.TakePlatformFile()))
- VLOG(1) << "Could not start AEC dump.";
-}
-
-void PeerConnectionDependencyFactory::OnDisableAecDump() {
- DCHECK(CalledOnValidThread());
- DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled());
- // Do nothing. We never disable AEC dump for non-track-processing case.
-}
-
-void PeerConnectionDependencyFactory::OnIpcClosing() {
- DCHECK(CalledOnValidThread());
- aec_dump_message_filter_ = NULL;
-}
-
void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
if (audio_device_.get())
return;

Powered by Google App Engine
This is Rietveld 408576698