OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/host/audio_pump.h" | 5 #include "remoting/host/audio_pump.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
10 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
11 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
12 #include "remoting/codec/audio_encoder.h" | 13 #include "remoting/codec/audio_encoder.h" |
13 #include "remoting/host/audio_capturer.h" | 14 #include "remoting/host/audio_capturer.h" |
14 #include "remoting/proto/audio.pb.h" | 15 #include "remoting/proto/audio.pb.h" |
15 #include "remoting/protocol/audio_stub.h" | 16 #include "remoting/protocol/audio_stub.h" |
16 | 17 |
17 namespace remoting { | 18 namespace remoting { |
18 | 19 |
19 // Limit the data stored in the pending send buffers to 250ms. | 20 // Limit the data stored in the pending send buffers to 250ms. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 base::Bind(&AudioPump::OnPacketSent, weak_factory_.GetWeakPtr(), size)); | 153 base::Bind(&AudioPump::OnPacketSent, weak_factory_.GetWeakPtr(), size)); |
153 } | 154 } |
154 | 155 |
155 void AudioPump::OnPacketSent(int size) { | 156 void AudioPump::OnPacketSent(int size) { |
156 audio_task_runner_->PostTask( | 157 audio_task_runner_->PostTask( |
157 FROM_HERE, | 158 FROM_HERE, |
158 base::Bind(&Core::OnPacketSent, base::Unretained(core_.get()), size)); | 159 base::Bind(&Core::OnPacketSent, base::Unretained(core_.get()), size)); |
159 } | 160 } |
160 | 161 |
161 } // namespace remoting | 162 } // namespace remoting |
OLD | NEW |