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

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

Issue 1581693006: Adding "first packet received" notification to PeerConnectionObserver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Implementing onFirstMediaPacketReceived in objc AppRTC client. 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/peerconnection.cc
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc
index ccca18af67d9074a03b700a965d730a5615f1909..fc362de4957d682a86af3df200f378f16451c33d 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/talk/app/webrtc/peerconnection.cc
@@ -663,6 +663,8 @@ bool PeerConnection::Initialize(
this, &PeerConnection::OnDataChannelDestroyed);
session_->SignalDataChannelOpenMessage.connect(
this, &PeerConnection::OnDataChannelOpenMessage);
+ session_->SignalFirstMediaPacketReceived.connect(
+ this, &PeerConnection::OnFirstMediaPacketReceived);
return true;
}
@@ -1956,6 +1958,11 @@ void PeerConnection::OnDataChannelOpenMessage(
DataChannelProxy::Create(signaling_thread(), channel));
}
+void PeerConnection::OnFirstMediaPacketReceived() {
+ RTC_DCHECK(signaling_thread()->IsCurrent());
+ observer_->OnFirstMediaPacketReceived();
+}
+
RtpSenderInterface* PeerConnection::FindSenderById(const std::string& id) {
auto it =
std::find_if(senders_.begin(), senders_.end(),

Powered by Google App Engine
This is Rietveld 408576698