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

Side by Side Diff: voice_engine/channel.cc

Issue 2997973002: Split LogRtpHeader and LogRtcpPacket into separate versions for incoming and outgoing packets.
Patch Set: Split VerifyRtpEvent into one incoming and one outgoing version. Created 3 years, 2 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
« no previous file with comments | « modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "voice_engine/channel.h" 11 #include "voice_engine/channel.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <map>
15 #include <string>
14 #include <utility> 16 #include <utility>
17 #include <vector>
15 18
16 #include "api/array_view.h" 19 #include "api/array_view.h"
17 #include "audio/utility/audio_frame_operations.h" 20 #include "audio/utility/audio_frame_operations.h"
18 #include "call/rtp_transport_controller_send_interface.h" 21 #include "call/rtp_transport_controller_send_interface.h"
19 #include "logging/rtc_event_log/rtc_event_log.h" 22 #include "logging/rtc_event_log/rtc_event_log.h"
20 #include "modules/audio_coding/codecs/audio_format_conversion.h" 23 #include "modules/audio_coding/codecs/audio_format_conversion.h"
21 #include "modules/audio_device/include/audio_device.h" 24 #include "modules/audio_device/include/audio_device.h"
22 #include "modules/audio_processing/include/audio_processing.h" 25 #include "modules/audio_processing/include/audio_processing.h"
23 #include "modules/include/module_common_types.h" 26 #include "modules/include/module_common_types.h"
24 #include "modules/pacing/packet_router.h" 27 #include "modules/pacing/packet_router.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 94 }
92 95
93 void LogAudioSendStreamConfig( 96 void LogAudioSendStreamConfig(
94 const webrtc::rtclog::StreamConfig& config) override { 97 const webrtc::rtclog::StreamConfig& config) override {
95 rtc::CritScope lock(&crit_); 98 rtc::CritScope lock(&crit_);
96 if (event_log_) { 99 if (event_log_) {
97 event_log_->LogAudioSendStreamConfig(config); 100 event_log_->LogAudioSendStreamConfig(config);
98 } 101 }
99 } 102 }
100 103
101 void LogRtpHeader(webrtc::PacketDirection direction, 104 void LogIncomingRtpHeader(const RtpPacketReceived& packet) override {
102 const uint8_t* header,
103 size_t packet_length) override {
104 LogRtpHeader(direction, header, packet_length, PacedPacketInfo::kNotAProbe);
105 }
106
107 void LogRtpHeader(webrtc::PacketDirection direction,
108 const uint8_t* header,
109 size_t packet_length,
110 int probe_cluster_id) override {
111 rtc::CritScope lock(&crit_); 105 rtc::CritScope lock(&crit_);
112 if (event_log_) { 106 if (event_log_) {
113 event_log_->LogRtpHeader(direction, header, packet_length, 107 event_log_->LogIncomingRtpHeader(packet);
114 probe_cluster_id);
115 } 108 }
116 } 109 }
117 110
118 void LogRtcpPacket(webrtc::PacketDirection direction, 111 void LogOutgoingRtpHeader(const RtpPacketToSend& packet,
119 const uint8_t* packet, 112 int probe_cluster_id) override {
120 size_t length) override {
121 rtc::CritScope lock(&crit_); 113 rtc::CritScope lock(&crit_);
122 if (event_log_) { 114 if (event_log_) {
123 event_log_->LogRtcpPacket(direction, packet, length); 115 event_log_->LogOutgoingRtpHeader(packet, probe_cluster_id);
124 } 116 }
125 } 117 }
126 118
119 void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {
120 rtc::CritScope lock(&crit_);
121 if (event_log_) {
122 event_log_->LogIncomingRtcpPacket(packet);
123 }
124 }
125
126 void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {
127 rtc::CritScope lock(&crit_);
128 if (event_log_) {
129 event_log_->LogOutgoingRtcpPacket(packet);
130 }
131 }
132
127 void LogAudioPlayout(uint32_t ssrc) override { 133 void LogAudioPlayout(uint32_t ssrc) override {
128 rtc::CritScope lock(&crit_); 134 rtc::CritScope lock(&crit_);
129 if (event_log_) { 135 if (event_log_) {
130 event_log_->LogAudioPlayout(ssrc); 136 event_log_->LogAudioPlayout(ssrc);
131 } 137 }
132 } 138 }
133 139
134 void LogLossBasedBweUpdate(int32_t bitrate_bps, 140 void LogLossBasedBweUpdate(int32_t bitrate_bps,
135 uint8_t fraction_loss, 141 uint8_t fraction_loss,
136 int32_t total_packets) override { 142 int32_t total_packets) override {
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 int64_t min_rtt = 0; 2035 int64_t min_rtt = 0;
2030 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 2036 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
2031 0) { 2037 0) {
2032 return 0; 2038 return 0;
2033 } 2039 }
2034 return rtt; 2040 return rtt;
2035 } 2041 }
2036 2042
2037 } // namespace voe 2043 } // namespace voe
2038 } // namespace webrtc 2044 } // namespace webrtc
OLDNEW
« no previous file with comments | « modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698