OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 22 matching lines...) Expand all Loading... |
33 : DecisionLogic(fs_hz, | 33 : DecisionLogic(fs_hz, |
34 output_size_samples, | 34 output_size_samples, |
35 playout_mode, | 35 playout_mode, |
36 decoder_database, | 36 decoder_database, |
37 packet_buffer, | 37 packet_buffer, |
38 delay_manager, | 38 delay_manager, |
39 buffer_level_filter, | 39 buffer_level_filter, |
40 tick_timer) {} | 40 tick_timer) {} |
41 | 41 |
42 protected: | 42 protected: |
43 static const int kAllowMergeWithoutExpandMs = 20; // 20 ms. | |
44 static const int kReinitAfterExpands = 100; | 43 static const int kReinitAfterExpands = 100; |
45 static const int kMaxWaitForPacket = 10; | 44 static const int kMaxWaitForPacket = 10; |
46 | 45 |
47 // Returns the operation that should be done next. |sync_buffer| and |expand| | 46 // Returns the operation that should be done next. |sync_buffer| and |expand| |
48 // are provided for reference. |decoder_frame_length| is the number of samples | 47 // are provided for reference. |decoder_frame_length| is the number of samples |
49 // obtained from the last decoded frame. If there is a packet available, the | 48 // obtained from the last decoded frame. If there is a packet available, the |
50 // packet header should be supplied in |packet_header|; otherwise it should | 49 // packet header should be supplied in |packet_header|; otherwise it should |
51 // be NULL. The mode resulting form the last call to NetEqImpl::GetAudio is | 50 // be NULL. The mode resulting form the last call to NetEqImpl::GetAudio is |
52 // supplied in |prev_mode|. If there is a DTMF event to play, |play_dtmf| | 51 // supplied in |prev_mode|. If there is a DTMF event to play, |play_dtmf| |
53 // should be set to true. The output variable |reset_decoder| will be set to | 52 // should be set to true. The output variable |reset_decoder| will be set to |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool PacketTooEarly(uint32_t timestamp_leap) const; | 107 bool PacketTooEarly(uint32_t timestamp_leap) const; |
109 | 108 |
110 // Checks if num_consecutive_expands_ >= kMaxWaitForPacket. | 109 // Checks if num_consecutive_expands_ >= kMaxWaitForPacket. |
111 bool MaxWaitForPacket() const; | 110 bool MaxWaitForPacket() const; |
112 | 111 |
113 RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal); | 112 RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal); |
114 }; | 113 }; |
115 | 114 |
116 } // namespace webrtc | 115 } // namespace webrtc |
117 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ | 116 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ |
OLD | NEW |