From e8ae5df1030f4108b04fa373cd24cbc6de0c3ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Tue, 29 May 2018 09:13:57 +0200 Subject: [PATCH] Convert PeerConnectionWrapper from FakeVideoCapturer to FakeVideoTrackSource. Bug: webrtc:6353 Change-Id: I735317815820888f1e9042b6b18ac77e4c938193 Reviewed-on: https://webrtc-review.googlesource.com/79482 Reviewed-by: Steve Anton Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#23443} --- pc/peerconnectionwrapper.cc | 6 ++---- pc/peerconnectionwrapper.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pc/peerconnectionwrapper.cc b/pc/peerconnectionwrapper.cc index 36d30723f1..dfc5af7bbf 100644 --- a/pc/peerconnectionwrapper.cc +++ b/pc/peerconnectionwrapper.cc @@ -16,8 +16,8 @@ #include #include "api/jsepsessiondescription.h" -#include "media/base/fakevideocapturer.h" #include "pc/sdputils.h" +#include "pc/test/fakevideotracksource.h" #include "rtc_base/function_view.h" #include "rtc_base/gunit.h" #include "rtc_base/ptr_util.h" @@ -269,9 +269,7 @@ rtc::scoped_refptr PeerConnectionWrapper::CreateAudioTrack( rtc::scoped_refptr PeerConnectionWrapper::CreateVideoTrack( const std::string& label) { - auto video_source = pc_factory()->CreateVideoSource( - rtc::MakeUnique()); - return pc_factory()->CreateVideoTrack(label, video_source); + return pc_factory()->CreateVideoTrack(label, FakeVideoTrackSource::Create()); } rtc::scoped_refptr PeerConnectionWrapper::AddTrack( diff --git a/pc/peerconnectionwrapper.h b/pc/peerconnectionwrapper.h index b1abf62609..f7de67ecc8 100644 --- a/pc/peerconnectionwrapper.h +++ b/pc/peerconnectionwrapper.h @@ -148,7 +148,7 @@ class PeerConnectionWrapper { const std::vector& stream_ids = {}); // Calls the underlying PeerConnection's AddTrack method with a video media - // stream track fed by a fake video capturer. + // stream track fed by a FakeVideoTrackSource. rtc::scoped_refptr AddVideoTrack( const std::string& track_label, const std::vector& stream_ids = {});