OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 /* ForwardThisPacket() | 22 /* ForwardThisPacket() |
23 * Decide whether to forward a RTP packet, given its header. | 23 * Decide whether to forward a RTP packet, given its header. |
24 * | 24 * |
25 * Input: | 25 * Input: |
26 * rtp_header : Header of the RTP packet of interest. | 26 * rtp_header : Header of the RTP packet of interest. |
27 */ | 27 */ |
28 bool ForwardThisPacket(const webrtc::RTPHeader& rtp_header); | 28 bool ForwardThisPacket(const webrtc::RTPHeader& rtp_header); |
29 | 29 |
30 private: | 30 private: |
31 struct Status { | 31 struct Status { |
32 void Set(int audio_level, uint32 last_time_ms) { | 32 void Set(int audio_level, uint32_t last_time_ms) { |
33 this->audio_level = audio_level; | 33 this->audio_level = audio_level; |
34 this->last_time_ms = last_time_ms; | 34 this->last_time_ms = last_time_ms; |
35 } | 35 } |
36 int audio_level; | 36 int audio_level; |
37 uint32 last_time_ms; | 37 uint32_t last_time_ms; |
38 }; | 38 }; |
39 | 39 |
40 void RemoveTimeoutStreams(uint32 time_ms); | 40 void RemoveTimeoutStreams(uint32_t time_ms); |
41 unsigned int FindQuietestStream(); | 41 unsigned int FindQuietestStream(); |
42 | 42 |
43 // Keeps the streams being forwarded in pair<SSRC, Status>. | 43 // Keeps the streams being forwarded in pair<SSRC, Status>. |
44 std::map<unsigned int, Status> stream_levels_; | 44 std::map<unsigned int, Status> stream_levels_; |
45 | 45 |
46 const int32 kStreamTimeOutMs = 5000; | 46 const int32_t kStreamTimeOutMs = 5000; |
47 const size_t kMaxMixSize = 3; | 47 const size_t kMaxMixSize = 3; |
48 const int kInvalidAudioLevel = 128; | 48 const int kInvalidAudioLevel = 128; |
49 }; | 49 }; |
50 | 50 |
51 | 51 |
52 } // namespace voetest | 52 } // namespace voetest |
53 | 53 |
54 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_LOUDEST_FILTER_H_ | 54 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_LOUDEST_FILTER_H_ |
OLD | NEW |