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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 int* max_num_packets) const override; | 197 int* max_num_packets) const override; |
198 | 198 |
199 void EnableNack(size_t max_nack_list_size) override; | 199 void EnableNack(size_t max_nack_list_size) override; |
200 | 200 |
201 void DisableNack() override; | 201 void DisableNack() override; |
202 | 202 |
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 | 208 |
208 protected: | 209 protected: |
209 static const int kOutputSizeMs = 10; | 210 static const int kOutputSizeMs = 10; |
210 static const size_t kMaxFrameSize = 2880; // 60 ms @ 48 kHz. | 211 static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. |
211 // TODO(hlundin): Provide a better value for kSyncBufferSize. | 212 // TODO(hlundin): Provide a better value for kSyncBufferSize. |
212 static const size_t kSyncBufferSize = 2 * kMaxFrameSize; | 213 static const size_t kSyncBufferSize = 2 * kMaxFrameSize; |
213 | 214 |
214 // Inserts a new packet into NetEq. This is used by the InsertPacket method | 215 // Inserts a new packet into NetEq. This is used by the InsertPacket method |
215 // above. Returns 0 on success, otherwise an error code. | 216 // above. Returns 0 on success, otherwise an error code. |
216 // TODO(hlundin): Merge this with InsertPacket above? | 217 // TODO(hlundin): Merge this with InsertPacket above? |
217 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, | 218 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, |
218 rtc::ArrayView<const uint8_t> payload, | 219 rtc::ArrayView<const uint8_t> payload, |
219 uint32_t receive_timestamp, | 220 uint32_t receive_timestamp, |
220 bool is_sync_packet) | 221 bool is_sync_packet) |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 RandomVector random_vector_ GUARDED_BY(crit_sect_); | 377 RandomVector random_vector_ GUARDED_BY(crit_sect_); |
377 std::unique_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_); | 378 std::unique_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_); |
378 Rtcp rtcp_ GUARDED_BY(crit_sect_); | 379 Rtcp rtcp_ GUARDED_BY(crit_sect_); |
379 StatisticsCalculator stats_ GUARDED_BY(crit_sect_); | 380 StatisticsCalculator stats_ GUARDED_BY(crit_sect_); |
380 int fs_hz_ GUARDED_BY(crit_sect_); | 381 int fs_hz_ GUARDED_BY(crit_sect_); |
381 int fs_mult_ GUARDED_BY(crit_sect_); | 382 int fs_mult_ GUARDED_BY(crit_sect_); |
382 int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); | 383 int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); |
383 size_t output_size_samples_ GUARDED_BY(crit_sect_); | 384 size_t output_size_samples_ GUARDED_BY(crit_sect_); |
384 size_t decoder_frame_length_ GUARDED_BY(crit_sect_); | 385 size_t decoder_frame_length_ GUARDED_BY(crit_sect_); |
385 Modes last_mode_ GUARDED_BY(crit_sect_); | 386 Modes last_mode_ GUARDED_BY(crit_sect_); |
| 387 Operations last_operation_ GUARDED_BY(crit_sect_); |
386 std::unique_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_); | 388 std::unique_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_); |
387 size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); | 389 size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); |
388 std::unique_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_); | 390 std::unique_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_); |
389 uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); | 391 uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); |
390 bool new_codec_ GUARDED_BY(crit_sect_); | 392 bool new_codec_ GUARDED_BY(crit_sect_); |
391 uint32_t timestamp_ GUARDED_BY(crit_sect_); | 393 uint32_t timestamp_ GUARDED_BY(crit_sect_); |
392 bool reset_decoder_ GUARDED_BY(crit_sect_); | 394 bool reset_decoder_ GUARDED_BY(crit_sect_); |
393 uint8_t current_rtp_payload_type_ GUARDED_BY(crit_sect_); | 395 uint8_t current_rtp_payload_type_ GUARDED_BY(crit_sect_); |
394 uint8_t current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); | 396 uint8_t current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); |
395 uint32_t ssrc_ GUARDED_BY(crit_sect_); | 397 uint32_t ssrc_ GUARDED_BY(crit_sect_); |
396 bool first_packet_ GUARDED_BY(crit_sect_); | 398 bool first_packet_ GUARDED_BY(crit_sect_); |
397 int error_code_ GUARDED_BY(crit_sect_); // Store last error code. | 399 int error_code_ GUARDED_BY(crit_sect_); // Store last error code. |
398 int decoder_error_code_ GUARDED_BY(crit_sect_); | 400 int decoder_error_code_ GUARDED_BY(crit_sect_); |
399 const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); | 401 const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); |
400 NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); | 402 NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); |
401 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); | 403 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); |
402 std::unique_ptr<Nack> nack_ GUARDED_BY(crit_sect_); | 404 std::unique_ptr<Nack> nack_ GUARDED_BY(crit_sect_); |
403 bool nack_enabled_ GUARDED_BY(crit_sect_); | 405 bool nack_enabled_ GUARDED_BY(crit_sect_); |
404 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = | 406 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = |
405 AudioFrame::kVadPassive; | 407 AudioFrame::kVadPassive; |
406 | 408 |
407 private: | 409 private: |
408 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 410 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
409 }; | 411 }; |
410 | 412 |
411 } // namespace webrtc | 413 } // namespace webrtc |
412 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 414 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
OLD | NEW |