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}
This commit is contained in:
Niels Möller
2018-05-29 09:13:57 +02:00
committed by Commit Bot
parent 593b3657d3
commit e8ae5df103
2 changed files with 3 additions and 5 deletions

View File

@ -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<AudioTrackInterface> PeerConnectionWrapper::CreateAudioTrack(
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(

View File

@ -148,7 +148,7 @@ class PeerConnectionWrapper {
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 = {});