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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/peerconnectionfactory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 virtual void StopRtcEventLog() = 0; 627 virtual void StopRtcEventLog() = 0;
628 628
629 protected: 629 protected:
630 // Dtor and ctor protected as objects shouldn't be created or deleted via 630 // Dtor and ctor protected as objects shouldn't be created or deleted via
631 // this interface. 631 // this interface.
632 PeerConnectionFactoryInterface() {} 632 PeerConnectionFactoryInterface() {}
633 ~PeerConnectionFactoryInterface() {} // NOLINT 633 ~PeerConnectionFactoryInterface() {} // NOLINT
634 }; 634 };
635 635
636 // Create a new instance of PeerConnectionFactoryInterface. 636 // Create a new instance of PeerConnectionFactoryInterface.
637 //
638 // This method relies on the thread it's called on as the "signaling thread"
639 // for the PeerConnectionFactory it creates.
640 //
641 // As such, if the current thread is not already running an rtc::Thread message
642 // loop, an application using this method must eventually either call
643 // rtc::Thread::Current()->Run(), or call
644 // rtc::Thread::Current()->ProcessMessages() within the application's own
645 // message loop.
637 rtc::scoped_refptr<PeerConnectionFactoryInterface> 646 rtc::scoped_refptr<PeerConnectionFactoryInterface>
638 CreatePeerConnectionFactory(); 647 CreatePeerConnectionFactory();
639 648
640 // Create a new instance of PeerConnectionFactoryInterface. 649 // Create a new instance of PeerConnectionFactoryInterface.
641 // Ownership of |factory|, |default_adm|, and optionally |encoder_factory| and 650 //
642 // |decoder_factory| transferred to the returned factory. 651 // |worker_thread| and |signaling_thread| are the only mandatory
652 // parameters.
653 //
654 // If non-null, ownership of |default_adm|, |encoder_factory| and
655 // |decoder_factory| are transferred to the returned factory.
643 rtc::scoped_refptr<PeerConnectionFactoryInterface> 656 rtc::scoped_refptr<PeerConnectionFactoryInterface>
644 CreatePeerConnectionFactory( 657 CreatePeerConnectionFactory(
645 rtc::Thread* worker_thread, 658 rtc::Thread* worker_thread,
646 rtc::Thread* signaling_thread, 659 rtc::Thread* signaling_thread,
647 AudioDeviceModule* default_adm, 660 AudioDeviceModule* default_adm,
648 cricket::WebRtcVideoEncoderFactory* encoder_factory, 661 cricket::WebRtcVideoEncoderFactory* encoder_factory,
649 cricket::WebRtcVideoDecoderFactory* decoder_factory); 662 cricket::WebRtcVideoDecoderFactory* decoder_factory);
650 663
651 } // namespace webrtc 664 } // namespace webrtc
652 665
653 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 666 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« 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