| 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 // level) in order to trigger GenerateFEC(), before |params_.max_fec_frames| is | 25 // level) in order to trigger GenerateFEC(), before |params_.max_fec_frames| is |
| 26 // reached. | 26 // reached. |
| 27 enum { kMinimumMediaPackets = 4 }; | 27 enum { kMinimumMediaPackets = 4 }; |
| 28 // Threshold on the received FEC protection level, above which we enforce at | 28 // Threshold on the received FEC protection level, above which we enforce at |
| 29 // least |kMinimumMediaPackets| packets for the FEC code. Below this | 29 // least |kMinimumMediaPackets| packets for the FEC code. Below this |
| 30 // threshold |kMinimumMediaPackets| is set to default value of 1. | 30 // threshold |kMinimumMediaPackets| is set to default value of 1. |
| 31 enum { kHighProtectionThreshold = 80 }; // Corresponds to ~30 overhead, range | 31 enum { kHighProtectionThreshold = 80 }; // Corresponds to ~30 overhead, range |
| 32 // is 0 to 255, where 255 corresponds to 100% overhead (relative to number of | 32 // is 0 to 255, where 255 corresponds to 100% overhead (relative to number of |
| 33 // media packets). | 33 // media packets). |
| 34 | 34 |
| 35 struct RtpPacket { | |
| 36 uint16_t rtpHeaderLength; | |
| 37 ForwardErrorCorrection::Packet* pkt; | |
| 38 }; | |
| 39 | |
| 40 RedPacket::RedPacket(size_t length) | 35 RedPacket::RedPacket(size_t length) |
| 41 : data_(new uint8_t[length]), | 36 : data_(new uint8_t[length]), |
| 42 length_(length), | 37 length_(length), |
| 43 header_length_(0) { | 38 header_length_(0) { |
| 44 } | 39 } |
| 45 | 40 |
| 46 RedPacket::~RedPacket() { | 41 RedPacket::~RedPacket() { |
| 47 delete [] data_; | 42 delete [] data_; |
| 48 } | 43 } |
| 49 | 44 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 252 |
| 258 void ProducerFec::DeletePackets() { | 253 void ProducerFec::DeletePackets() { |
| 259 while (!media_packets_fec_.empty()) { | 254 while (!media_packets_fec_.empty()) { |
| 260 delete media_packets_fec_.front(); | 255 delete media_packets_fec_.front(); |
| 261 media_packets_fec_.pop_front(); | 256 media_packets_fec_.pop_front(); |
| 262 } | 257 } |
| 263 assert(media_packets_fec_.empty()); | 258 assert(media_packets_fec_.empty()); |
| 264 } | 259 } |
| 265 | 260 |
| 266 } // namespace webrtc | 261 } // namespace webrtc |
| OLD | NEW |