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

Side by Side Diff: webrtc/audio/audio_receive_stream.cc

Issue 1400333002: Log Call {audio, video} stream deletions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: updated comment Created 5 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 | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/call/call.cc » ('j') | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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/audio/audio_receive_stream.h" 11 #include "webrtc/audio/audio_receive_stream.h"
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "webrtc/base/checks.h" 15 #include "webrtc/base/checks.h"
16 #include "webrtc/base/logging.h"
16 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" 17 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h"
17 #include "webrtc/system_wrappers/interface/tick_util.h" 18 #include "webrtc/system_wrappers/interface/tick_util.h"
18 19
19 namespace webrtc { 20 namespace webrtc {
20 std::string AudioReceiveStream::Config::Rtp::ToString() const { 21 std::string AudioReceiveStream::Config::Rtp::ToString() const {
21 std::stringstream ss; 22 std::stringstream ss;
22 ss << "{remote_ssrc: " << remote_ssrc; 23 ss << "{remote_ssrc: " << remote_ssrc;
23 ss << ", extensions: ["; 24 ss << ", extensions: [";
24 for (size_t i = 0; i < extensions.size(); ++i) { 25 for (size_t i = 0; i < extensions.size(); ++i) {
25 ss << extensions[i].ToString(); 26 ss << extensions[i].ToString();
(...skipping 15 matching lines...) Expand all
41 return ss.str(); 42 return ss.str();
42 } 43 }
43 44
44 namespace internal { 45 namespace internal {
45 AudioReceiveStream::AudioReceiveStream( 46 AudioReceiveStream::AudioReceiveStream(
46 RemoteBitrateEstimator* remote_bitrate_estimator, 47 RemoteBitrateEstimator* remote_bitrate_estimator,
47 const webrtc::AudioReceiveStream::Config& config) 48 const webrtc::AudioReceiveStream::Config& config)
48 : remote_bitrate_estimator_(remote_bitrate_estimator), 49 : remote_bitrate_estimator_(remote_bitrate_estimator),
49 config_(config), 50 config_(config),
50 rtp_header_parser_(RtpHeaderParser::Create()) { 51 rtp_header_parser_(RtpHeaderParser::Create()) {
52 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString();
51 RTC_DCHECK(config.voe_channel_id != -1); 53 RTC_DCHECK(config.voe_channel_id != -1);
52 RTC_DCHECK(remote_bitrate_estimator_ != nullptr); 54 RTC_DCHECK(remote_bitrate_estimator_ != nullptr);
53 RTC_DCHECK(rtp_header_parser_ != nullptr); 55 RTC_DCHECK(rtp_header_parser_ != nullptr);
54 for (const auto& ext : config.rtp.extensions) { 56 for (const auto& ext : config.rtp.extensions) {
55 // One-byte-extension local identifiers are in the range 1-14 inclusive. 57 // One-byte-extension local identifiers are in the range 1-14 inclusive.
56 RTC_DCHECK_GE(ext.id, 1); 58 RTC_DCHECK_GE(ext.id, 1);
57 RTC_DCHECK_LE(ext.id, 14); 59 RTC_DCHECK_LE(ext.id, 14);
58 if (ext.name == RtpExtension::kAudioLevel) { 60 if (ext.name == RtpExtension::kAudioLevel) {
59 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 61 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
60 kRtpExtensionAudioLevel, ext.id)); 62 kRtpExtensionAudioLevel, ext.id));
61 } else if (ext.name == RtpExtension::kAbsSendTime) { 63 } else if (ext.name == RtpExtension::kAbsSendTime) {
62 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 64 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
63 kRtpExtensionAbsoluteSendTime, ext.id)); 65 kRtpExtensionAbsoluteSendTime, ext.id));
64 } else if (ext.name == RtpExtension::kTransportSequenceNumber) { 66 } else if (ext.name == RtpExtension::kTransportSequenceNumber) {
65 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 67 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
66 kRtpExtensionTransportSequenceNumber, ext.id)); 68 kRtpExtensionTransportSequenceNumber, ext.id));
67 } else { 69 } else {
68 RTC_NOTREACHED() << "Unsupported RTP extension."; 70 RTC_NOTREACHED() << "Unsupported RTP extension.";
69 } 71 }
70 } 72 }
71 } 73 }
72 74
75 AudioReceiveStream::~AudioReceiveStream() {
76 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
77 }
78
73 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { 79 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
74 return webrtc::AudioReceiveStream::Stats(); 80 return webrtc::AudioReceiveStream::Stats();
75 } 81 }
76 82
83 const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const {
84 return config_;
85 }
86
77 void AudioReceiveStream::Start() { 87 void AudioReceiveStream::Start() {
78 } 88 }
79 89
80 void AudioReceiveStream::Stop() { 90 void AudioReceiveStream::Stop() {
81 } 91 }
82 92
83 void AudioReceiveStream::SignalNetworkState(NetworkState state) { 93 void AudioReceiveStream::SignalNetworkState(NetworkState state) {
84 } 94 }
85 95
86 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) { 96 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
(...skipping 17 matching lines...) Expand all
104 if (packet_time.timestamp >= 0) 114 if (packet_time.timestamp >= 0)
105 arrival_time_ms = (packet_time.timestamp + 500) / 1000; 115 arrival_time_ms = (packet_time.timestamp + 500) / 1000;
106 size_t payload_size = length - header.headerLength; 116 size_t payload_size = length - header.headerLength;
107 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, 117 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size,
108 header, false); 118 header, false);
109 } 119 }
110 return true; 120 return true;
111 } 121 }
112 } // namespace internal 122 } // namespace internal
113 } // namespace webrtc 123 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698