Allow native aec to be used in peerconnection_client if available on windows.
Change-Id: Ia0e2e8b5f755602e58c6be75b7ff57ab1e0528fb Bug: webrtc:8891 Reviewed-on: https://webrtc-review.googlesource.com/53740 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22032}
This commit is contained in:
parent
fd4ce50423
commit
2c599d663d
@ -415,18 +415,26 @@ void Conductor::AddStreams() {
|
||||
peer_connection_factory_->CreateAudioTrack(
|
||||
kAudioLabel, peer_connection_factory_->CreateAudioSource(NULL)));
|
||||
|
||||
rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
|
||||
peer_connection_factory_->CreateVideoTrack(
|
||||
kVideoLabel,
|
||||
peer_connection_factory_->CreateVideoSource(OpenVideoCaptureDevice(),
|
||||
NULL)));
|
||||
main_wnd_->StartLocalRenderer(video_track);
|
||||
rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track;
|
||||
auto video_device(OpenVideoCaptureDevice());
|
||||
if (video_device) {
|
||||
video_track =
|
||||
peer_connection_factory_->CreateVideoTrack(
|
||||
kVideoLabel,
|
||||
peer_connection_factory_->CreateVideoSource(std::move(video_device),
|
||||
NULL));
|
||||
main_wnd_->StartLocalRenderer(video_track);
|
||||
} else {
|
||||
RTC_LOG(LS_ERROR) << "OpenVideoCaptureDevice failed";
|
||||
}
|
||||
|
||||
rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
|
||||
peer_connection_factory_->CreateLocalMediaStream(kStreamLabel);
|
||||
|
||||
stream->AddTrack(audio_track);
|
||||
stream->AddTrack(video_track);
|
||||
if (video_track)
|
||||
stream->AddTrack(video_track);
|
||||
|
||||
if (!peer_connection_->AddStream(stream)) {
|
||||
RTC_LOG(LS_ERROR) << "Adding stream to PeerConnection failed";
|
||||
}
|
||||
|
||||
@ -2634,6 +2634,10 @@ int32_t AudioDeviceWindowsCore::PlayoutDelay(uint16_t& delayMS) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioDeviceWindowsCore::BuiltInAECIsAvailable() const {
|
||||
return _dmo != nullptr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Playing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -170,6 +170,8 @@ public:
|
||||
// Delay information and control
|
||||
virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
|
||||
|
||||
virtual bool BuiltInAECIsAvailable() const;
|
||||
|
||||
virtual int32_t EnableBuiltInAEC(bool enable);
|
||||
|
||||
public:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user