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

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: move logging to ctor/dtor 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
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
(...skipping 30 matching lines...) Expand all
41 return ss.str(); 41 return ss.str();
42 } 42 }
43 43
44 namespace internal { 44 namespace internal {
45 AudioReceiveStream::AudioReceiveStream( 45 AudioReceiveStream::AudioReceiveStream(
46 RemoteBitrateEstimator* remote_bitrate_estimator, 46 RemoteBitrateEstimator* remote_bitrate_estimator,
47 const webrtc::AudioReceiveStream::Config& config) 47 const webrtc::AudioReceiveStream::Config& config)
48 : remote_bitrate_estimator_(remote_bitrate_estimator), 48 : remote_bitrate_estimator_(remote_bitrate_estimator),
49 config_(config), 49 config_(config),
50 rtp_header_parser_(RtpHeaderParser::Create()) { 50 rtp_header_parser_(RtpHeaderParser::Create()) {
51 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString();
51 RTC_DCHECK(config.voe_channel_id != -1); 52 RTC_DCHECK(config.voe_channel_id != -1);
52 RTC_DCHECK(remote_bitrate_estimator_ != nullptr); 53 RTC_DCHECK(remote_bitrate_estimator_ != nullptr);
53 RTC_DCHECK(rtp_header_parser_ != nullptr); 54 RTC_DCHECK(rtp_header_parser_ != nullptr);
54 for (const auto& ext : config.rtp.extensions) { 55 for (const auto& ext : config.rtp.extensions) {
55 // One-byte-extension local identifiers are in the range 1-14 inclusive. 56 // One-byte-extension local identifiers are in the range 1-14 inclusive.
56 RTC_DCHECK_GE(ext.id, 1); 57 RTC_DCHECK_GE(ext.id, 1);
57 RTC_DCHECK_LE(ext.id, 14); 58 RTC_DCHECK_LE(ext.id, 14);
58 if (ext.name == RtpExtension::kAudioLevel) { 59 if (ext.name == RtpExtension::kAudioLevel) {
59 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 60 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
60 kRtpExtensionAudioLevel, ext.id)); 61 kRtpExtensionAudioLevel, ext.id));
61 } else if (ext.name == RtpExtension::kAbsSendTime) { 62 } else if (ext.name == RtpExtension::kAbsSendTime) {
62 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 63 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
63 kRtpExtensionAbsoluteSendTime, ext.id)); 64 kRtpExtensionAbsoluteSendTime, ext.id));
64 } else if (ext.name == RtpExtension::kTransportSequenceNumber) { 65 } else if (ext.name == RtpExtension::kTransportSequenceNumber) {
65 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 66 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
66 kRtpExtensionTransportSequenceNumber, ext.id)); 67 kRtpExtensionTransportSequenceNumber, ext.id));
67 } else { 68 } else {
68 RTC_NOTREACHED() << "Unsupported RTP extension."; 69 RTC_NOTREACHED() << "Unsupported RTP extension.";
69 } 70 }
70 } 71 }
71 } 72 }
72 73
74 AudioReceiveStream::~AudioReceiveStream() {
75 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
76 }
77
73 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { 78 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
74 return webrtc::AudioReceiveStream::Stats(); 79 return webrtc::AudioReceiveStream::Stats();
75 } 80 }
76 81
82 const webrtc::AudioReceiveStream::Config AudioReceiveStream::config() const {
83 return config_;
84 }
85
77 void AudioReceiveStream::Start() { 86 void AudioReceiveStream::Start() {
78 } 87 }
79 88
80 void AudioReceiveStream::Stop() { 89 void AudioReceiveStream::Stop() {
81 } 90 }
82 91
83 void AudioReceiveStream::SignalNetworkState(NetworkState state) { 92 void AudioReceiveStream::SignalNetworkState(NetworkState state) {
84 } 93 }
85 94
86 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) { 95 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
(...skipping 17 matching lines...) Expand all
104 if (packet_time.timestamp >= 0) 113 if (packet_time.timestamp >= 0)
105 arrival_time_ms = (packet_time.timestamp + 500) / 1000; 114 arrival_time_ms = (packet_time.timestamp + 500) / 1000;
106 size_t payload_size = length - header.headerLength; 115 size_t payload_size = length - header.headerLength;
107 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, 116 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size,
108 header, false); 117 header, false);
109 } 118 }
110 return true; 119 return true;
111 } 120 }
112 } // namespace internal 121 } // namespace internal
113 } // namespace webrtc 122 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/call/call.cc » ('j') | webrtc/call/call.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698