| 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 14 matching lines...) Expand all Loading... |
| 25 #include "webrtc/system_wrappers/interface/logging.h" | 25 #include "webrtc/system_wrappers/interface/logging.h" |
| 26 #include "webrtc/system_wrappers/interface/metrics.h" | 26 #include "webrtc/system_wrappers/interface/metrics.h" |
| 27 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h" | 27 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h" |
| 28 #include "webrtc/system_wrappers/interface/trace.h" | 28 #include "webrtc/system_wrappers/interface/trace.h" |
| 29 #include "webrtc/typedefs.h" | 29 #include "webrtc/typedefs.h" |
| 30 | 30 |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 | 32 |
| 33 namespace acm2 { | 33 namespace acm2 { |
| 34 | 34 |
| 35 enum { | |
| 36 kACMToneEnd = 999 | |
| 37 }; | |
| 38 | |
| 39 // Maximum number of bytes in one packet (PCM16B, 20 ms packets, stereo). | |
| 40 enum { | |
| 41 kMaxPacketSize = 2560 | |
| 42 }; | |
| 43 | |
| 44 // Maximum number of payloads that can be packed in one RED packet. For | |
| 45 // regular RED, we only pack two payloads. In case of dual-streaming, in worst | |
| 46 // case we might pack 3 payloads in one RED packet. | |
| 47 enum { | |
| 48 kNumRedFragmentationVectors = 2, | |
| 49 kMaxNumFragmentationVectors = 3 | |
| 50 }; | |
| 51 | |
| 52 // If packet N is arrived all packets prior to N - |kNackThresholdPackets| which | |
| 53 // are not received are considered as lost, and appear in NACK list. | |
| 54 enum { | |
| 55 kNackThresholdPackets = 2 | |
| 56 }; | |
| 57 | |
| 58 namespace { | 35 namespace { |
| 59 | 36 |
| 60 // TODO(turajs): the same functionality is used in NetEq. If both classes | 37 // TODO(turajs): the same functionality is used in NetEq. If both classes |
| 61 // need them, make it a static function in ACMCodecDB. | 38 // need them, make it a static function in ACMCodecDB. |
| 62 bool IsCodecRED(const CodecInst* codec) { | 39 bool IsCodecRED(const CodecInst* codec) { |
| 63 return (STR_CASE_CMP(codec->plname, "RED") == 0); | 40 return (STR_CASE_CMP(codec->plname, "RED") == 0); |
| 64 } | 41 } |
| 65 | 42 |
| 66 bool IsCodecRED(int index) { | 43 bool IsCodecRED(int index) { |
| 67 return (IsCodecRED(&ACMCodecDB::database_[index])); | 44 return (IsCodecRED(&ACMCodecDB::database_[index])); |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 *sample_rate_hz = 8000; | 1085 *sample_rate_hz = 8000; |
| 1109 *channels = 1; | 1086 *channels = 1; |
| 1110 break; | 1087 break; |
| 1111 default: | 1088 default: |
| 1112 FATAL() << "Codec type " << codec_type << " not supported."; | 1089 FATAL() << "Codec type " << codec_type << " not supported."; |
| 1113 } | 1090 } |
| 1114 return true; | 1091 return true; |
| 1115 } | 1092 } |
| 1116 | 1093 |
| 1117 } // namespace webrtc | 1094 } // namespace webrtc |
| OLD | NEW |