Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: synchronizing remote_bitrate_estimator.gypi Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 if (video_) {
909 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate[kbps]", now_ms,
910 ActualSendBitrateKbit(), packet->Ssrc());
911 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate[Kbps]", now_ms,
912 FecOverheadRate() / 1000, packet->Ssrc());
913 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate[Kbps]", now_ms,
914 NackOverheadRate() / 1000, packet->Ssrc());
915 } else {
916 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioTotBitrate[kbps]", now_ms,
917 ActualSendBitrateKbit(), packet->Ssrc());
918 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioNackBitrate[Kbps]", now_ms,
919 NackOverheadRate() / 1000, packet->Ssrc());
920 }
921
907 if (paced_sender_) { 922 if (paced_sender_) {
908 uint16_t seq_no = packet->SequenceNumber(); 923 uint16_t seq_no = packet->SequenceNumber();
909 uint32_t ssrc = packet->Ssrc(); 924 uint32_t ssrc = packet->Ssrc();
910 // Correct offset between implementations of millisecond time stamps in 925 // Correct offset between implementations of millisecond time stamps in
911 // TickTime and Clock. 926 // TickTime and Clock.
912 int64_t corrected_time_ms = packet->capture_time_ms() + clock_delta_ms_; 927 int64_t corrected_time_ms = packet->capture_time_ms() + clock_delta_ms_;
913 size_t payload_length = packet->payload_size(); 928 size_t payload_length = packet->payload_size();
914 packet_history_.PutRtpPacket(std::move(packet), storage, false); 929 packet_history_.PutRtpPacket(std::move(packet), storage, false);
915 930
916 paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms, 931 paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms,
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 rtc::CritScope lock(&send_critsect_); 1736 rtc::CritScope lock(&send_critsect_);
1722 1737
1723 RtpState state; 1738 RtpState state;
1724 state.sequence_number = sequence_number_rtx_; 1739 state.sequence_number = sequence_number_rtx_;
1725 state.start_timestamp = timestamp_offset_; 1740 state.start_timestamp = timestamp_offset_;
1726 1741
1727 return state; 1742 return state;
1728 } 1743 }
1729 1744
1730 } // namespace webrtc 1745 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698