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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 (audio_fifo_ && | 657 (audio_fifo_ && |
658 audio_fifo_->SizeInFrames() != source_frames_per_buffer)) { | 658 audio_fifo_->SizeInFrames() != source_frames_per_buffer)) { |
659 audio_fifo_.reset(new media::AudioPullFifo( | 659 audio_fifo_.reset(new media::AudioPullFifo( |
660 kChannels, source_frames_per_buffer, | 660 kChannels, source_frames_per_buffer, |
661 base::Bind(&WebRtcAudioRenderer::SourceCallback, | 661 base::Bind(&WebRtcAudioRenderer::SourceCallback, |
662 base::Unretained(this)))); | 662 base::Unretained(this)))); |
663 } | 663 } |
664 sink_params_ = new_sink_params; | 664 sink_params_ = new_sink_params; |
665 } | 665 } |
666 | 666 |
| 667 // Specify the latency info to be passed to the browser side. |
| 668 new_sink_params.set_latency_tag(AudioDeviceFactory::GetSourceLatencyType( |
| 669 AudioDeviceFactory::AudioDeviceFactory::kSourceWebRtc)); |
667 sink_->Initialize(new_sink_params, this); | 670 sink_->Initialize(new_sink_params, this); |
668 } | 671 } |
669 | 672 |
670 } // namespace content | 673 } // namespace content |
OLD | NEW |