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 |
11 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
| 16 #include "webrtc/base/arraysize.h" |
| 17 #include "webrtc/base/checks.h" |
| 18 #include "webrtc/base/logging.h" |
| 19 #include "webrtc/base/rate_limiter.h" |
| 20 #include "webrtc/base/safe_minmax.h" |
| 21 #include "webrtc/base/timeutils.h" |
| 22 #include "webrtc/base/trace_event.h" |
16 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 23 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
17 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
18 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" |
19 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 26 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
20 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" | 27 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" |
21 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 28 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
22 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 29 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
23 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h" | 30 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h" |
24 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h" | 31 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h" |
25 #include "webrtc/modules/rtp_rtcp/source/time_util.h" | 32 #include "webrtc/modules/rtp_rtcp/source/time_util.h" |
26 #include "webrtc/rtc_base/arraysize.h" | |
27 #include "webrtc/rtc_base/checks.h" | |
28 #include "webrtc/rtc_base/logging.h" | |
29 #include "webrtc/rtc_base/rate_limiter.h" | |
30 #include "webrtc/rtc_base/safe_minmax.h" | |
31 #include "webrtc/rtc_base/timeutils.h" | |
32 #include "webrtc/rtc_base/trace_event.h" | |
33 #include "webrtc/system_wrappers/include/field_trial.h" | 33 #include "webrtc/system_wrappers/include/field_trial.h" |
34 | 34 |
35 namespace webrtc { | 35 namespace webrtc { |
36 | 36 |
37 namespace { | 37 namespace { |
38 // Max in the RFC 3550 is 255 bytes, we limit it to be modulus 32 for SRTP. | 38 // Max in the RFC 3550 is 255 bytes, we limit it to be modulus 32 for SRTP. |
39 constexpr size_t kMaxPaddingLength = 224; | 39 constexpr size_t kMaxPaddingLength = 224; |
40 constexpr size_t kMinAudioPaddingLength = 50; | 40 constexpr size_t kMinAudioPaddingLength = 50; |
41 constexpr int kSendSideDelayWindowMs = 1000; | 41 constexpr int kSendSideDelayWindowMs = 1000; |
42 constexpr size_t kRtpHeaderLength = 12; | 42 constexpr size_t kRtpHeaderLength = 12; |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { | 1283 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { |
1284 return; | 1284 return; |
1285 } | 1285 } |
1286 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1286 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
1287 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; | 1287 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; |
1288 } | 1288 } |
1289 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1289 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
1290 } | 1290 } |
1291 | 1291 |
1292 } // namespace webrtc | 1292 } // namespace webrtc |
OLD | NEW |