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 = {});