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/renderer/media/webrtc_audio_renderer.h" | 5 #include "content/renderer/media/webrtc_audio_renderer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 (audio_fifo_ && | 644 (audio_fifo_ && |
645 audio_fifo_->SizeInFrames() != source_frames_per_buffer)) { | 645 audio_fifo_->SizeInFrames() != source_frames_per_buffer)) { |
646 audio_fifo_.reset(new media::AudioPullFifo( | 646 audio_fifo_.reset(new media::AudioPullFifo( |
647 kChannels, source_frames_per_buffer, | 647 kChannels, source_frames_per_buffer, |
648 base::Bind(&WebRtcAudioRenderer::SourceCallback, | 648 base::Bind(&WebRtcAudioRenderer::SourceCallback, |
649 base::Unretained(this)))); | 649 base::Unretained(this)))); |
650 } | 650 } |
651 sink_params_ = new_sink_params; | 651 sink_params_ = new_sink_params; |
652 } | 652 } |
653 | 653 |
| 654 // Specify the latency info to be passed to the browser side. |
| 655 new_sink_params.set_latency_tag(AudioDeviceFactory::GetSourceLatencyType( |
| 656 AudioDeviceFactory::AudioDeviceFactory::kSourceWebRtc)); |
654 sink_->Initialize(new_sink_params, this); | 657 sink_->Initialize(new_sink_params, this); |
655 } | 658 } |
656 | 659 |
657 } // namespace content | 660 } // namespace content |
OLD | NEW |