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

Side by Side Diff: remoting/protocol/webrtc_audio_module.h

Issue 2653563004: Revert 25680c62320767f590d037d301edfe15e9c55650 (Closed)
Patch Set: . Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_audio_module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_
6 #define REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/timer/timer.h"
10 #include "third_party/webrtc/modules/audio_device/include/audio_device.h" 11 #include "third_party/webrtc/modules/audio_device/include/audio_device.h"
11 12
12 namespace base { 13 namespace base {
13 class RepeatingTimer;
14 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
15 } // namespace base 15 } // namespace base
16 16
17 namespace remoting { 17 namespace remoting {
18 namespace protocol { 18 namespace protocol {
19 19
20 // Audio module passed to WebRTC. It doesn't access actual audio devices, but it 20 // Audio module passed to WebRTC. It doesn't access actual audio devices, but it
21 // provides all functionality we need to ensure that audio streaming works 21 // provides all functionality we need to ensure that audio streaming works
22 // properly in WebRTC. Particularly it's responsible for calling AudioTransport 22 // properly in WebRTC. Particularly it's responsible for calling AudioTransport
23 // on regular intervals when playback is active. This ensures that all incoming 23 // on regular intervals when playback is active. This ensures that all incoming
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // |lock_| must be locked when accessing |initialized_|, |playing_| and 148 // |lock_| must be locked when accessing |initialized_|, |playing_| and
149 // |audio_transport_|. 149 // |audio_transport_|.
150 mutable base::Lock lock_; 150 mutable base::Lock lock_;
151 151
152 bool initialized_ = false; 152 bool initialized_ = false;
153 bool playing_ = false; 153 bool playing_ = false;
154 webrtc::AudioTransport* audio_transport_ = nullptr; 154 webrtc::AudioTransport* audio_transport_ = nullptr;
155 155
156 // Timer running on the |audio_task_runner_| that polls audio from 156 // Timer running on the |audio_task_runner_| that polls audio from
157 // |audio_transport_|. 157 // |audio_transport_|.
158 std::unique_ptr<base::RepeatingTimer> poll_timer_; 158 base::RepeatingTimer poll_timer_;
159 }; 159 };
160 160
161 } // namespace protocol 161 } // namespace protocol
162 } // namespace remoting 162 } // namespace remoting
163 163
164 #endif // REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_ 164 #endif // REMOTING_PROTOCOL_WEBRTC_AUDIO_MODULE_H_
OLDNEW
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_audio_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698