OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override; | 203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override; |
204 | 204 |
205 // This accessor method is only intended for testing purposes. | 205 // This accessor method is only intended for testing purposes. |
206 const SyncBuffer* sync_buffer_for_test() const; | 206 const SyncBuffer* sync_buffer_for_test() const; |
207 Operations last_operation_for_test() const; | 207 Operations last_operation_for_test() const; |
208 | 208 |
209 protected: | 209 protected: |
210 static const int kOutputSizeMs = 10; | 210 static const int kOutputSizeMs = 10; |
211 static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. | 211 static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. |
212 // TODO(hlundin): Provide a better value for kSyncBufferSize. | 212 // TODO(hlundin): Provide a better value for kSyncBufferSize. |
213 static const size_t kSyncBufferSize = 2 * kMaxFrameSize; | 213 // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for |
| 214 // calculating correlations of current frame against history. |
| 215 static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48; |
214 | 216 |
215 // Inserts a new packet into NetEq. This is used by the InsertPacket method | 217 // Inserts a new packet into NetEq. This is used by the InsertPacket method |
216 // above. Returns 0 on success, otherwise an error code. | 218 // above. Returns 0 on success, otherwise an error code. |
217 // TODO(hlundin): Merge this with InsertPacket above? | 219 // TODO(hlundin): Merge this with InsertPacket above? |
218 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, | 220 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, |
219 rtc::ArrayView<const uint8_t> payload, | 221 rtc::ArrayView<const uint8_t> payload, |
220 uint32_t receive_timestamp, | 222 uint32_t receive_timestamp, |
221 bool is_sync_packet) | 223 bool is_sync_packet) |
222 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 224 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
223 | 225 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 bool nack_enabled_ GUARDED_BY(crit_sect_); | 407 bool nack_enabled_ GUARDED_BY(crit_sect_); |
406 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = | 408 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = |
407 AudioFrame::kVadPassive; | 409 AudioFrame::kVadPassive; |
408 | 410 |
409 private: | 411 private: |
410 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 412 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
411 }; | 413 }; |
412 | 414 |
413 } // namespace webrtc | 415 } // namespace webrtc |
414 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 416 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
OLD | NEW |