OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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/rtp_rtcp/source/flexfec_header_reader_writer.h" | 11 #include "webrtc/modules/rtp_rtcp/source/flexfec_header_reader_writer.h" |
12 | 12 |
13 #include <string.h> | 13 #include <string.h> |
14 | 14 |
15 #include <utility> | 15 #include <utility> |
16 | 16 |
| 17 #include "webrtc/base/checks.h" |
| 18 #include "webrtc/base/logging.h" |
17 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 19 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
18 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h" | 20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h" |
19 #include "webrtc/rtc_base/checks.h" | |
20 #include "webrtc/rtc_base/logging.h" | |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Maximum number of media packets that can be protected in one batch. | 26 // Maximum number of media packets that can be protected in one batch. |
27 constexpr size_t kMaxMediaPackets = 48; // Since we are reusing ULPFEC masks. | 27 constexpr size_t kMaxMediaPackets = 48; // Since we are reusing ULPFEC masks. |
28 | 28 |
29 // Maximum number of FEC packets stored inside ForwardErrorCorrection. | 29 // Maximum number of FEC packets stored inside ForwardErrorCorrection. |
30 constexpr size_t kMaxFecPackets = kMaxMediaPackets; | 30 constexpr size_t kMaxFecPackets = kMaxMediaPackets; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 written_packet_mask[2] |= 0x80; // Set K-bit 1. | 302 written_packet_mask[2] |= 0x80; // Set K-bit 1. |
303 written_packet_mask[2] |= 0x40; // Set bit 15. | 303 written_packet_mask[2] |= 0x40; // Set bit 15. |
304 } | 304 } |
305 } else { | 305 } else { |
306 RTC_NOTREACHED() << "Incorrect packet mask size: " << packet_mask_size | 306 RTC_NOTREACHED() << "Incorrect packet mask size: " << packet_mask_size |
307 << "."; | 307 << "."; |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 } // namespace webrtc | 311 } // namespace webrtc |
OLD | NEW |