Chromium Code Reviews| 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/checks.h" | 16 #include "webrtc/base/checks.h" |
| 17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 18 #include "webrtc/base/rate_limiter.h" | 18 #include "webrtc/base/rate_limiter.h" |
| 19 #include "webrtc/base/trace_event.h" | 19 #include "webrtc/base/trace_event.h" |
| 20 #include "webrtc/base/timeutils.h" | 20 #include "webrtc/base/timeutils.h" |
| 21 #include "webrtc/call.h" | 21 #include "webrtc/call.h" |
| 22 #include "webrtc/call/rtc_event_log.h" | 22 #include "webrtc/call/rtc_event_log.h" |
| 23 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | |
| 23 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" | 24 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" |
| 24 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 25 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
| 25 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" | 26 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" |
| 26 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 27 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
| 27 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 28 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
| 28 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h" | 29 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h" |
| 29 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h" | 30 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h" |
| 30 #include "webrtc/modules/rtp_rtcp/source/time_util.h" | 31 #include "webrtc/modules/rtp_rtcp/source/time_util.h" |
| 31 | 32 |
| 32 namespace webrtc { | 33 namespace webrtc { |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 897 | 898 |
| 898 // |capture_time_ms| <= 0 is considered invalid. | 899 // |capture_time_ms| <= 0 is considered invalid. |
| 899 // TODO(holmer): This should be changed all over Video Engine so that negative | 900 // TODO(holmer): This should be changed all over Video Engine so that negative |
| 900 // time is consider invalid, while 0 is considered a valid time. | 901 // time is consider invalid, while 0 is considered a valid time. |
| 901 if (packet->capture_time_ms() > 0) { | 902 if (packet->capture_time_ms() > 0) { |
| 902 packet->SetExtension<TransmissionOffset>( | 903 packet->SetExtension<TransmissionOffset>( |
| 903 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms())); | 904 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms())); |
| 904 } | 905 } |
| 905 packet->SetExtension<AbsoluteSendTime>(now_ms); | 906 packet->SetExtension<AbsoluteSendTime>(now_ms); |
| 906 | 907 |
| 908 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "SentBitrate[Kbps]", now_ms, \ | |
| 909 ActualSendBitrateKbit(), packet->Ssrc()); | |
| 910 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "FecBitrate[Kbps]", now_ms, \ | |
| 911 FecOverheadRate()/1000, packet->Ssrc()); | |
| 912 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "NackBitrate[Kbps]", now_ms, \ | |
| 913 NackOverheadRate()/1000, packet->Ssrc()); | |
| 914 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoBitrate[bps]", now_ms, \ | |
| 915 VideoBitrateSent()/1000, packet->Ssrc()); | |
|
stefan-webrtc
2016/09/02 11:13:04
Same here, remove '\' and add spaces around '/'.
| |
| 916 | |
| 907 if (paced_sender_) { | 917 if (paced_sender_) { |
| 908 uint16_t seq_no = packet->SequenceNumber(); | 918 uint16_t seq_no = packet->SequenceNumber(); |
| 909 uint32_t ssrc = packet->Ssrc(); | 919 uint32_t ssrc = packet->Ssrc(); |
| 910 // Correct offset between implementations of millisecond time stamps in | 920 // Correct offset between implementations of millisecond time stamps in |
| 911 // TickTime and Clock. | 921 // TickTime and Clock. |
| 912 int64_t corrected_time_ms = packet->capture_time_ms() + clock_delta_ms_; | 922 int64_t corrected_time_ms = packet->capture_time_ms() + clock_delta_ms_; |
| 913 size_t payload_length = packet->payload_size(); | 923 size_t payload_length = packet->payload_size(); |
| 914 packet_history_.PutRtpPacket(std::move(packet), storage, false); | 924 packet_history_.PutRtpPacket(std::move(packet), storage, false); |
| 915 | 925 |
| 916 paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms, | 926 paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms, |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1721 rtc::CritScope lock(&send_critsect_); | 1731 rtc::CritScope lock(&send_critsect_); |
| 1722 | 1732 |
| 1723 RtpState state; | 1733 RtpState state; |
| 1724 state.sequence_number = sequence_number_rtx_; | 1734 state.sequence_number = sequence_number_rtx_; |
| 1725 state.start_timestamp = timestamp_offset_; | 1735 state.start_timestamp = timestamp_offset_; |
| 1726 | 1736 |
| 1727 return state; | 1737 return state; |
| 1728 } | 1738 } |
| 1729 | 1739 |
| 1730 } // namespace webrtc | 1740 } // namespace webrtc |
| OLD | NEW |