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

Unified Diff: webrtc/pc/channel.h

Issue 2260963002: Some cleanup in BaseChannel RTCP mux code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clarifying comment. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/pc/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel.h
diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h
index 3c00ee3d4a1b684a826cc63c960f22d78c63171b..eea1d7f0da0508ced02ff24d3c01ef3171bd25e0 100644
--- a/webrtc/pc/channel.h
+++ b/webrtc/pc/channel.h
@@ -70,6 +70,7 @@ class BaseChannel
public MediaChannel::NetworkInterface,
public ConnectionStatsGetter {
public:
+ // |rtcp| represents whether or not this channel uses RTCP.
BaseChannel(rtc::Thread* worker_thread,
rtc::Thread* network_thread,
MediaChannel* channel,
@@ -197,7 +198,6 @@ class BaseChannel
rtc::Thread* signaling_thread() {
return transport_controller_->signaling_thread();
}
- bool rtcp_transport_enabled() const { return rtcp_transport_enabled_; }
void ConnectToTransportChannel(TransportChannel* tc);
void DisconnectFromTransportChannel(TransportChannel* tc);
@@ -342,34 +342,37 @@ class BaseChannel
// Transport related members that should be accessed from network thread.
TransportController* const transport_controller_;
std::string transport_name_;
- bool rtcp_transport_enabled_;
- TransportChannel* transport_channel_;
+ // Is RTCP used at all by this type of channel?
+ // Expected to be true (as of typing this) for everything except data
+ // channels.
+ const bool rtcp_enabled_;
+ TransportChannel* transport_channel_ = nullptr;
std::vector<std::pair<rtc::Socket::Option, int> > socket_options_;
- TransportChannel* rtcp_transport_channel_;
+ TransportChannel* rtcp_transport_channel_ = nullptr;
std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_;
SrtpFilter srtp_filter_;
RtcpMuxFilter rtcp_mux_filter_;
BundleFilter bundle_filter_;
- bool rtp_ready_to_send_;
- bool rtcp_ready_to_send_;
- bool writable_;
- bool was_ever_writable_;
- bool has_received_packet_;
- bool dtls_keyed_;
- bool secure_required_;
+ bool rtp_ready_to_send_ = false;
+ bool rtcp_ready_to_send_ = false;
+ bool writable_ = false;
+ bool was_ever_writable_ = false;
+ bool has_received_packet_ = false;
+ bool dtls_keyed_ = false;
+ bool secure_required_ = false;
rtc::CryptoOptions crypto_options_;
- int rtp_abs_sendtime_extn_id_;
+ int rtp_abs_sendtime_extn_id_ = -1;
// MediaChannel related members that should be access from worker thread.
MediaChannel* const media_channel_;
// Currently enabled_ flag accessed from signaling thread too, but it can
// be changed only when signaling thread does sunchronious call to worker
// thread, so it should be safe.
- bool enabled_;
+ bool enabled_ = false;
std::vector<StreamParams> local_streams_;
std::vector<StreamParams> remote_streams_;
- MediaContentDirection local_content_direction_;
- MediaContentDirection remote_content_direction_;
+ MediaContentDirection local_content_direction_ = MD_INACTIVE;
+ MediaContentDirection remote_content_direction_ = MD_INACTIVE;
};
// VoiceChannel is a specialization that adds support for early media, DTMF,
« no previous file with comments | « no previous file | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698