| 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/decision_logic_fax.h" | 11 #include "webrtc/modules/audio_coding/neteq/decision_logic_fax.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 | 14 |
| 15 #include <algorithm> | 15 #include <algorithm> |
| 16 | 16 |
| 17 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" | 17 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" |
| 18 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h" | 18 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 | 21 |
| 22 Operations DecisionLogicFax::GetDecisionSpecialized( | 22 Operations DecisionLogicFax::GetDecisionSpecialized( |
| 23 const SyncBuffer& sync_buffer, | 23 const SyncBuffer& sync_buffer, |
| 24 const Expand& expand, | 24 const Expand& expand, |
| 25 int decoder_frame_length, | 25 size_t decoder_frame_length, |
| 26 const RTPHeader* packet_header, | 26 const RTPHeader* packet_header, |
| 27 Modes prev_mode, | 27 Modes prev_mode, |
| 28 bool play_dtmf, | 28 bool play_dtmf, |
| 29 bool* reset_decoder) { | 29 bool* reset_decoder) { |
| 30 assert(playout_mode_ == kPlayoutFax || playout_mode_ == kPlayoutOff); | 30 assert(playout_mode_ == kPlayoutFax || playout_mode_ == kPlayoutOff); |
| 31 uint32_t target_timestamp = sync_buffer.end_timestamp(); | 31 uint32_t target_timestamp = sync_buffer.end_timestamp(); |
| 32 uint32_t available_timestamp = 0; | 32 uint32_t available_timestamp = 0; |
| 33 int is_cng_packet = 0; | 33 int is_cng_packet = 0; |
| 34 if (packet_header) { | 34 if (packet_header) { |
| 35 available_timestamp = packet_header->timestamp; | 35 available_timestamp = packet_header->timestamp; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 assert(0); | 93 assert(0); |
| 94 return kUndefined; | 94 return kUndefined; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 } // namespace webrtc | 102 } // namespace webrtc |
| OLD | NEW |