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

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 1828463002: Adding comments about threading around CreatePeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 | « webrtc/api/peerconnectionfactory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 22109c4088e9415f0f55015ee95b9747dea24b4d..08a131920e3be649746ebbc083cdf8b4f64d7a69 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -634,12 +634,25 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
};
// Create a new instance of PeerConnectionFactoryInterface.
+//
+// This method relies on the thread it's called on as the "signaling thread"
+// for the PeerConnectionFactory it creates.
+//
+// As such, if the current thread is not already running an rtc::Thread message
+// loop, an application using this method must eventually either call
+// rtc::Thread::Current()->Run(), or call
+// rtc::Thread::Current()->ProcessMessages() within the application's own
+// message loop.
rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory();
// Create a new instance of PeerConnectionFactoryInterface.
-// Ownership of |factory|, |default_adm|, and optionally |encoder_factory| and
-// |decoder_factory| transferred to the returned factory.
+//
+// |worker_thread| and |signaling_thread| are the only mandatory
+// parameters.
+//
+// If non-null, ownership of |default_adm|, |encoder_factory| and
+// |decoder_factory| are transferred to the returned factory.
rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory(
rtc::Thread* worker_thread,
« no previous file with comments | « webrtc/api/peerconnectionfactory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698