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

Unified Diff: talk/app/webrtc/webrtcsession.cc

Issue 1581693006: Adding "first packet received" notification to PeerConnectionObserver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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: talk/app/webrtc/webrtcsession.cc
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index 41e22daac2c555b3e060998f5120599890ac1e19..c092cb8e3e62e14070d810e84969a24fbcd0efea 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -1844,6 +1844,8 @@ bool WebRtcSession::CreateVoiceChannel(const cricket::ContentInfo* content) {
voice_channel_->SignalDtlsSetupFailure.connect(
this, &WebRtcSession::OnDtlsSetupFailure);
+ voice_channel_->SignalFirstPacketReceived.connect(
+ this, &WebRtcSession::OnChannelFirstPacketReceived);
SignalVoiceChannelCreated();
voice_channel_->transport_channel()->SignalSentPacket.connect(
@@ -1861,6 +1863,8 @@ bool WebRtcSession::CreateVideoChannel(const cricket::ContentInfo* content) {
video_channel_->SignalDtlsSetupFailure.connect(
this, &WebRtcSession::OnDtlsSetupFailure);
+ video_channel_->SignalFirstPacketReceived.connect(
+ this, &WebRtcSession::OnChannelFirstPacketReceived);
SignalVideoChannelCreated();
video_channel_->transport_channel()->SignalSentPacket.connect(
@@ -1883,6 +1887,8 @@ bool WebRtcSession::CreateDataChannel(const cricket::ContentInfo* content) {
data_channel_->SignalDtlsSetupFailure.connect(
this, &WebRtcSession::OnDtlsSetupFailure);
+ data_channel_->SignalFirstPacketReceived.connect(
+ this, &WebRtcSession::OnChannelFirstPacketReceived);
SignalDataChannelCreated();
data_channel_->transport_channel()->SignalSentPacket.connect(
@@ -1895,6 +1901,14 @@ void WebRtcSession::OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp) {
rtcp ? kDtlsSetupFailureRtcp : kDtlsSetupFailureRtp);
}
+void WebRtcSession::OnChannelFirstPacketReceived(cricket::BaseChannel*) {
+ ASSERT(signaling_thread()->IsCurrent());
+ if (has_received_packet_) {
pthatcher1 2016/01/14 23:50:09 Should that be "!has_recieved_packet_"?
Taylor Brandstetter 2016/01/15 17:06:58 Yep; I would have noticed this pretty quickly if I
+ has_received_packet_ = true;
+ SignalFirstPacketReceived();
+ }
+}
+
void WebRtcSession::OnDataChannelMessageReceived(
cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
« talk/app/webrtc/java/src/org/webrtc/PeerConnection.java ('K') | « talk/app/webrtc/webrtcsession.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698