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 26 matching lines...) Expand all Loading... |
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. | 43 static const int kAllowMergeWithoutExpandMs = 20; // 20 ms. |
44 static const int kReinitAfterExpands = 100; | 44 static const int kReinitAfterExpands = 100; |
45 static const int kMaxWaitForPacket = 10; | 45 static const int kMaxWaitForPacket = 10; |
46 | 46 |
47 // 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 | |
49 // 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 | |
51 // 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| | |
53 // should be set to true. The output variable |reset_decoder| will be set to | |
54 // true if a reset is required; otherwise it is left unchanged (i.e., it can | |
55 // remain true if it was true before the call). | |
56 Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer, | 47 Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer, |
57 const Expand& expand, | 48 const Expand& expand, |
58 size_t decoder_frame_length, | 49 size_t decoder_frame_length, |
59 const RTPHeader* packet_header, | 50 const Packet* next_packet, |
60 Modes prev_mode, | 51 Modes prev_mode, |
61 bool play_dtmf, | 52 bool play_dtmf, |
62 bool* reset_decoder, | 53 bool* reset_decoder, |
63 size_t generated_noise_samples) override; | 54 size_t generated_noise_samples) override; |
64 | 55 |
65 // Returns the operation to do given that the expected packet is not | 56 // Returns the operation to do given that the expected packet is not |
66 // available, but a packet further into the future is at hand. | 57 // available, but a packet further into the future is at hand. |
67 virtual Operations FuturePacketAvailable( | 58 virtual Operations FuturePacketAvailable( |
68 const SyncBuffer& sync_buffer, | 59 const SyncBuffer& sync_buffer, |
69 const Expand& expand, | 60 const Expand& expand, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool PacketTooEarly(uint32_t timestamp_leap) const; | 99 bool PacketTooEarly(uint32_t timestamp_leap) const; |
109 | 100 |
110 // Checks if num_consecutive_expands_ >= kMaxWaitForPacket. | 101 // Checks if num_consecutive_expands_ >= kMaxWaitForPacket. |
111 bool MaxWaitForPacket() const; | 102 bool MaxWaitForPacket() const; |
112 | 103 |
113 RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal); | 104 RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal); |
114 }; | 105 }; |
115 | 106 |
116 } // namespace webrtc | 107 } // namespace webrtc |
117 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ | 108 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_NORMAL_H_ |
OLD | NEW |