Convert PeerConnectionWrapper from FakeVideoCapturer to FakeVideoTrackSource.
Bug: webrtc:6353
Change-Id: I735317815820888f1e9042b6b18ac77e4c938193
Reviewed-on: https://webrtc-review.googlesource.com/79482
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23443}
diff --git a/pc/peerconnectionwrapper.cc b/pc/peerconnectionwrapper.cc
index 36d3072..dfc5af7 100644
--- a/pc/peerconnectionwrapper.cc
+++ b/pc/peerconnectionwrapper.cc
@@ -16,8 +16,8 @@
#include <vector>
#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<VideoTrackInterface> PeerConnectionWrapper::CreateVideoTrack(
const std::string& label) {
- auto video_source = pc_factory()->CreateVideoSource(
- rtc::MakeUnique<cricket::FakeVideoCapturer>());
- return pc_factory()->CreateVideoTrack(label, video_source);
+ return pc_factory()->CreateVideoTrack(label, FakeVideoTrackSource::Create());
}
rtc::scoped_refptr<RtpSenderInterface> PeerConnectionWrapper::AddTrack(
diff --git a/pc/peerconnectionwrapper.h b/pc/peerconnectionwrapper.h
index b1abf62..f7de67e 100644
--- a/pc/peerconnectionwrapper.h
+++ b/pc/peerconnectionwrapper.h
@@ -148,7 +148,7 @@
const std::vector<std::string>& 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<RtpSenderInterface> AddVideoTrack(
const std::string& track_label,
const std::vector<std::string>& stream_ids = {});