OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/pc/currentspeakermonitor.h" | 11 #include "webrtc/pc/currentspeakermonitor.h" |
12 | 12 |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "webrtc/base/logging.h" | |
16 #include "webrtc/media/base/streamparams.h" | 15 #include "webrtc/media/base/streamparams.h" |
17 #include "webrtc/pc/audiomonitor.h" | 16 #include "webrtc/pc/audiomonitor.h" |
| 17 #include "webrtc/rtc_base/logging.h" |
18 | 18 |
19 namespace cricket { | 19 namespace cricket { |
20 | 20 |
21 namespace { | 21 namespace { |
22 const int kMaxAudioLevel = 9; | 22 const int kMaxAudioLevel = 9; |
23 // To avoid overswitching, we disable switching for a period of time after a | 23 // To avoid overswitching, we disable switching for a period of time after a |
24 // switch is done. | 24 // switch is done. |
25 const int kDefaultMinTimeBetweenSwitches = 1000; | 25 const int kDefaultMinTimeBetweenSwitches = 1000; |
26 } | 26 } |
27 | 27 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 void CurrentSpeakerMonitor::OnMediaStreamsReset( | 196 void CurrentSpeakerMonitor::OnMediaStreamsReset( |
197 AudioSourceContext* audio_source_context) { | 197 AudioSourceContext* audio_source_context) { |
198 if (audio_source_context == audio_source_context_) { | 198 if (audio_source_context == audio_source_context_) { |
199 ssrc_to_speaking_state_map_.clear(); | 199 ssrc_to_speaking_state_map_.clear(); |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 } // namespace cricket | 203 } // namespace cricket |
OLD | NEW |