From 1d88d7446ec1bedc4f927a97ce4bec08f6f17009 Mon Sep 17 00:00:00 2001 From: Zhi Huang Date: Wed, 15 Nov 2017 15:58:49 -0800 Subject: [PATCH] Remove the unused code. In BaseChannel, |selected_candidate_pair| is removed. In MediaContentDescription, |buffered_mode_latency_| and its getter/setter are removed. TBR=pthatcher@webrtc.org Bug: None Change-Id: I68c0a61136dcd078f587105f09c72098d7f8e620 Reviewed-on: https://webrtc-review.googlesource.com/23520 Commit-Queue: Zhi Huang Reviewed-by: Steve Anton Cr-Commit-Position: refs/heads/master@{#20694} --- pc/channel.cc | 10 +--------- pc/channel.h | 1 - pc/mediasession.h | 7 ------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/pc/channel.cc b/pc/channel.cc index ab7cde3e5e..544ef4fddd 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -152,8 +152,7 @@ BaseChannel::BaseChannel(rtc::Thread* worker_thread, content_name_(content_name), rtcp_mux_required_(rtcp_mux_required), srtp_required_(srtp_required), - media_channel_(std::move(media_channel)), - selected_candidate_pair_(nullptr) { + media_channel_(std::move(media_channel)) { RTC_DCHECK_RUN_ON(worker_thread_); if (srtp_required) { auto transport = @@ -768,13 +767,6 @@ void BaseChannel::ChannelWritable_n() { RTC_LOG(LS_INFO) << "Channel writable (" << content_name_ << ")" << (was_ever_writable_ ? "" : " for the first time"); - if (selected_candidate_pair_) - RTC_LOG(LS_INFO) - << "Using " - << selected_candidate_pair_->local_candidate().ToSensitiveString() - << "->" - << selected_candidate_pair_->remote_candidate().ToSensitiveString(); - was_ever_writable_ = true; MaybeSetupDtlsSrtp_n(); writable_ = true; diff --git a/pc/channel.h b/pc/channel.h index 352fda4dcd..00a57da836 100644 --- a/pc/channel.h +++ b/pc/channel.h @@ -415,7 +415,6 @@ class BaseChannel std::vector remote_streams_; MediaContentDirection local_content_direction_ = MD_INACTIVE; MediaContentDirection remote_content_direction_ = MD_INACTIVE; - CandidatePairInterface* selected_candidate_pair_; // The cached encrypted header extension IDs. rtc::Optional> catched_send_extension_ids_; diff --git a/pc/mediasession.h b/pc/mediasession.h index aa48ba3265..22770001f0 100644 --- a/pc/mediasession.h +++ b/pc/mediasession.h @@ -69,7 +69,6 @@ extern const char kMediaProtocolTcpDtlsSctp[]; // Options to control how session descriptions are generated. const int kAutoBandwidth = -1; -const int kBufferedModeDisabled = 0; // Default RTCP CNAME for unit tests. const char kDefaultRtcpCname[] = "DefaultRtcpCname"; @@ -294,11 +293,6 @@ class MediaContentDescription : public ContentDescription { void set_partial(bool partial) { partial_ = partial; } bool partial() const { return partial_; } - void set_buffered_mode_latency(int latency) { - buffered_mode_latency_ = latency; - } - int buffered_mode_latency() const { return buffered_mode_latency_; } - // https://tools.ietf.org/html/rfc4566#section-5.7 // May be present at the media or session level of SDP. If present at both // levels, the media-level attribute overwrites the session-level one. @@ -322,7 +316,6 @@ class MediaContentDescription : public ContentDescription { StreamParamsVec streams_; bool conference_mode_ = false; bool partial_ = false; - int buffered_mode_latency_ = kBufferedModeDisabled; MediaContentDirection direction_ = MD_SENDRECV; rtc::SocketAddress connection_address_; };