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, |