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

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 3012273002: Ignore this CL - here as a baseline only (originally Bjorn's CL)
Patch Set: Created 3 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
« no previous file with comments | « webrtc/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 "webrtc/voice_engine/channel.h" 11 #include "webrtc/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 "webrtc/api/array_view.h" 19 #include "webrtc/api/array_view.h"
17 #include "webrtc/audio/utility/audio_frame_operations.h" 20 #include "webrtc/audio/utility/audio_frame_operations.h"
18 #include "webrtc/call/rtp_transport_controller_send_interface.h" 21 #include "webrtc/call/rtp_transport_controller_send_interface.h"
19 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 22 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
20 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" 23 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
21 #include "webrtc/modules/audio_device/include/audio_device.h" 24 #include "webrtc/modules/audio_device/include/audio_device.h"
22 #include "webrtc/modules/audio_processing/include/audio_processing.h" 25 #include "webrtc/modules/audio_processing/include/audio_processing.h"
23 #include "webrtc/modules/include/module_common_types.h" 26 #include "webrtc/modules/include/module_common_types.h"
24 #include "webrtc/modules/pacing/packet_router.h" 27 #include "webrtc/modules/pacing/packet_router.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 96 }
94 97
95 void LogAudioSendStreamConfig( 98 void LogAudioSendStreamConfig(
96 const webrtc::rtclog::StreamConfig& config) override { 99 const webrtc::rtclog::StreamConfig& config) override {
97 rtc::CritScope lock(&crit_); 100 rtc::CritScope lock(&crit_);
98 if (event_log_) { 101 if (event_log_) {
99 event_log_->LogAudioSendStreamConfig(config); 102 event_log_->LogAudioSendStreamConfig(config);
100 } 103 }
101 } 104 }
102 105
103 void LogRtpHeader(webrtc::PacketDirection direction, 106 void LogIncomingRtpHeader(const RtpPacketReceived& packet) override {
104 const uint8_t* header,
105 size_t packet_length) override {
106 LogRtpHeader(direction, header, packet_length, PacedPacketInfo::kNotAProbe);
107 }
108
109 void LogRtpHeader(webrtc::PacketDirection direction,
110 const uint8_t* header,
111 size_t packet_length,
112 int probe_cluster_id) override {
113 rtc::CritScope lock(&crit_); 107 rtc::CritScope lock(&crit_);
114 if (event_log_) { 108 if (event_log_) {
115 event_log_->LogRtpHeader(direction, header, packet_length, 109 event_log_->LogIncomingRtpHeader(packet);
116 probe_cluster_id);
117 } 110 }
118 } 111 }
119 112
120 void LogRtcpPacket(webrtc::PacketDirection direction, 113 void LogOutgoingRtpHeader(const RtpPacketToSend& packet,
121 const uint8_t* packet, 114 int probe_cluster_id) override {
122 size_t length) override {
123 rtc::CritScope lock(&crit_); 115 rtc::CritScope lock(&crit_);
124 if (event_log_) { 116 if (event_log_) {
125 event_log_->LogRtcpPacket(direction, packet, length); 117 event_log_->LogOutgoingRtpHeader(packet, probe_cluster_id);
126 } 118 }
127 } 119 }
128 120
121 void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {
122 rtc::CritScope lock(&crit_);
123 if (event_log_) {
124 event_log_->LogIncomingRtcpPacket(packet);
125 }
126 }
127
128 void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {
129 rtc::CritScope lock(&crit_);
130 if (event_log_) {
131 event_log_->LogOutgoingRtcpPacket(packet);
132 }
133 }
134
129 void LogAudioPlayout(uint32_t ssrc) override { 135 void LogAudioPlayout(uint32_t ssrc) override {
130 rtc::CritScope lock(&crit_); 136 rtc::CritScope lock(&crit_);
131 if (event_log_) { 137 if (event_log_) {
132 event_log_->LogAudioPlayout(ssrc); 138 event_log_->LogAudioPlayout(ssrc);
133 } 139 }
134 } 140 }
135 141
136 void LogLossBasedBweUpdate(int32_t bitrate_bps, 142 void LogLossBasedBweUpdate(int32_t bitrate_bps,
137 uint8_t fraction_loss, 143 uint8_t fraction_loss,
138 int32_t total_packets) override { 144 int32_t total_packets) override {
(...skipping 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 int64_t min_rtt = 0; 3138 int64_t min_rtt = 0;
3133 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3139 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3134 0) { 3140 0) {
3135 return 0; 3141 return 0;
3136 } 3142 }
3137 return rtt; 3143 return rtt;
3138 } 3144 }
3139 3145
3140 } // namespace voe 3146 } // namespace voe
3141 } // namespace webrtc 3147 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/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