diff options
Diffstat (limited to 'app/webrtc/peerconnectionfactory.cc')
-rw-r--r-- | app/webrtc/peerconnectionfactory.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/webrtc/peerconnectionfactory.cc b/app/webrtc/peerconnectionfactory.cc index e8b8f63..ee15b5d 100644 --- a/app/webrtc/peerconnectionfactory.cc +++ b/app/webrtc/peerconnectionfactory.cc @@ -105,12 +105,21 @@ struct CreateVideoSourceParams : public talk_base::MessageData { scoped_refptr<webrtc::VideoSourceInterface> source; }; +struct StartAecDumpParams : public talk_base::MessageData { + explicit StartAecDumpParams(FILE* aec_dump_file) + : aec_dump_file(aec_dump_file) { + } + FILE* aec_dump_file; + bool result; +}; + enum { MSG_INIT_FACTORY = 1, MSG_TERMINATE_FACTORY, MSG_CREATE_PEERCONNECTION, MSG_CREATE_AUDIOSOURCE, MSG_CREATE_VIDEOSOURCE, + MSG_START_AEC_DUMP, }; } // namespace @@ -223,6 +232,12 @@ void PeerConnectionFactory::OnMessage(talk_base::Message* msg) { pdata->source = CreateVideoSource_s(pdata->capturer, pdata->constraints); break; } + case MSG_START_AEC_DUMP: { + StartAecDumpParams* pdata = + static_cast<StartAecDumpParams*>(msg->pdata); + pdata->result = StartAecDump_s(pdata->aec_dump_file); + break; + } } } @@ -274,6 +289,10 @@ PeerConnectionFactory::CreateVideoSource_s( return VideoSourceProxy::Create(signaling_thread_, source); } +bool PeerConnectionFactory::StartAecDump_s(FILE* file) { + return channel_manager_->StartAecDump(file); +} + scoped_refptr<PeerConnectionInterface> PeerConnectionFactory::CreatePeerConnection( const PeerConnectionInterface::IceServers& configuration, @@ -361,6 +380,12 @@ scoped_refptr<AudioTrackInterface> PeerConnectionFactory::CreateAudioTrack( return AudioTrackProxy::Create(signaling_thread_, track); } +bool PeerConnectionFactory::StartAecDump(FILE* file) { + StartAecDumpParams params(file); + signaling_thread_->Send(this, MSG_START_AEC_DUMP, ¶ms); + return params.result; +} + cricket::ChannelManager* PeerConnectionFactory::channel_manager() { return channel_manager_.get(); } |