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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1757683002: Make the audio channel communicate network state changes to the call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Made the Call class keep track of network state for audio and video separately Created 4 years, 10 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
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 0e9866064df142cf7d1529065a818560a674dea3..65cee806da048d450e286948f8b5465ed5edd973 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -625,6 +625,9 @@ WebRtcVideoChannel2::WebRtcVideoChannel2(
default_send_ssrc_ = 0;
RTC_DCHECK(ValidateCodecFormats(recv_codecs));
recv_codecs_ = FilterSupportedCodecs(MapCodecs(recv_codecs));
+ call_->SignalChannelNetworkState(
+ webrtc::MediaType::VIDEO,
+ webrtc::ChannelNetworkState::CHANNEL_NETWORK_UP);
the sun 2016/03/04 12:40:48 I'd think Call can already figure this out since i
}
WebRtcVideoChannel2::~WebRtcVideoChannel2() {
@@ -632,6 +635,9 @@ WebRtcVideoChannel2::~WebRtcVideoChannel2() {
delete kv.second;
for (auto& kv : receive_streams_)
delete kv.second;
+ call_->SignalChannelNetworkState(
the sun 2016/03/04 12:40:48 Likewise.
+ webrtc::MediaType::VIDEO,
+ webrtc::ChannelNetworkState::CHANNEL_NOT_PRESENT);
}
bool WebRtcVideoChannel2::CodecIsExternallySupported(
@@ -1360,7 +1366,11 @@ void WebRtcVideoChannel2::OnRtcpReceived(
void WebRtcVideoChannel2::OnReadyToSend(bool ready) {
LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready.");
- call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown);
+ call_->SignalChannelNetworkState(
+ webrtc::MediaType::VIDEO,
+ ready ?
+ webrtc::ChannelNetworkState::CHANNEL_NETWORK_UP :
+ webrtc::ChannelNetworkState::CHANNEL_NETWORK_DOWN);
}
bool WebRtcVideoChannel2::MuteStream(uint32_t ssrc, bool mute) {

Powered by Google App Engine
This is Rietveld 408576698