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

Unified Diff: webrtc/pc/peerconnectionfactory.h

Issue 2685093002: Switching some interfaces to use std::unique_ptr<>. (Closed)
Patch Set: Rebase onto master Created 3 years, 10 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: webrtc/pc/peerconnectionfactory.h
diff --git a/webrtc/pc/peerconnectionfactory.h b/webrtc/pc/peerconnectionfactory.h
index 932821f6405abbd7462b0e9b438e3af04ce2f81d..53c6745ba9878bd1b791d90feec93a1875fdc20a 100644
--- a/webrtc/pc/peerconnectionfactory.h
+++ b/webrtc/pc/peerconnectionfactory.h
@@ -33,6 +33,12 @@ class RtcEventLog;
class PeerConnectionFactory : public PeerConnectionFactoryInterface {
public:
+ // Use the overloads of CreateVideoSource that take raw VideoCapturer
+ // pointers from PeerConnectionFactoryInterface.
+ // TODO(deadbeef): Remove this using statement once those overloads are
+ // removed.
+ using PeerConnectionFactoryInterface::CreateVideoSource;
+
void SetOptions(const Options& options) override;
// Deprecated, use version without constraints.
@@ -61,13 +67,13 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
const MediaConstraintsInterface* constraints) override;
virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource(
- cricket::VideoCapturer* capturer) override;
+ std::unique_ptr<cricket::VideoCapturer> capturer) override;
// This version supports filtering on width, height and frame rate.
// For the "constraints=null" case, use the version without constraints.
// TODO(hta): Design a version without MediaConstraintsInterface.
// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617
rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource(
- cricket::VideoCapturer* capturer,
+ std::unique_ptr<cricket::VideoCapturer> capturer,
const MediaConstraintsInterface* constraints) override;
rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack(
@@ -118,7 +124,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
virtual ~PeerConnectionFactory();
private:
- cricket::MediaEngineInterface* CreateMediaEngine_w();
+ std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine_w();
bool owns_ptrs_;
bool wraps_current_thread_;

Powered by Google App Engine
This is Rietveld 408576698