diff options
author | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-13 00:21:03 +0000 |
---|---|---|
committer | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-13 00:21:03 +0000 |
commit | f89a403cd8db88001322bbb0765c4636fd123700 (patch) | |
tree | abf9de7fd1040af1e4ad99d32ec7437940d1cd01 /app | |
parent | a064d5de938aebae46dfb11446ca4e66fac1762f (diff) | |
download | talk-f89a403cd8db88001322bbb0765c4636fd123700.tar.gz |
Update talk to 58127566 together with
https://webrtc-codereview.appspot.com/5309005/.
R=mallinath@webrtc.org, niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/5719004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5277 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'app')
-rw-r--r-- | app/webrtc/localaudiosource.cc | 4 | ||||
-rw-r--r-- | app/webrtc/mediaconstraintsinterface.h | 7 | ||||
-rw-r--r-- | app/webrtc/peerconnectionfactory.cc | 25 | ||||
-rw-r--r-- | app/webrtc/peerconnectionfactory.h | 5 | ||||
-rw-r--r-- | app/webrtc/peerconnectioninterface.h | 8 |
5 files changed, 35 insertions, 14 deletions
diff --git a/app/webrtc/localaudiosource.cc b/app/webrtc/localaudiosource.cc index 2cd472a..3dc5c6c 100644 --- a/app/webrtc/localaudiosource.cc +++ b/app/webrtc/localaudiosource.cc @@ -54,8 +54,6 @@ const char MediaConstraintsInterface::kHighpassFilter[] = const char MediaConstraintsInterface::kTypingNoiseDetection[] = "googTypingNoiseDetection"; const char MediaConstraintsInterface::kAudioMirroring[] = "googAudioMirroring"; -// TODO(perkj): Remove kInternalAecDump once its not used by Chrome. -const char MediaConstraintsInterface::kInternalAecDump[] = "deprecatedAecDump"; namespace { @@ -129,8 +127,6 @@ void LocalAudioSource::Initialize( return; } options_.SetAll(audio_options); - if (options.enable_aec_dump) - options_.aec_dump.Set(true); source_state_ = kLive; } diff --git a/app/webrtc/mediaconstraintsinterface.h b/app/webrtc/mediaconstraintsinterface.h index ba6b09b..5cf2184 100644 --- a/app/webrtc/mediaconstraintsinterface.h +++ b/app/webrtc/mediaconstraintsinterface.h @@ -117,13 +117,6 @@ class MediaConstraintsInterface { // stripped by Chrome before passed down to Libjingle. static const char kInternalConstraintPrefix[]; - // These constraints are for internal use only, representing Chrome command - // line flags. So they are prefixed with "internal" so JS values will be - // removed. - // Used by a local audio source. - // TODO(perkj): Remove once Chrome use PeerConnectionFactory::SetOptions. - static const char kInternalAecDump[]; // internalAecDump - protected: // Dtor protected as objects shouldn't be deleted via this interface virtual ~MediaConstraintsInterface() {} 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(); } diff --git a/app/webrtc/peerconnectionfactory.h b/app/webrtc/peerconnectionfactory.h index dff885d..63d37f0 100644 --- a/app/webrtc/peerconnectionfactory.h +++ b/app/webrtc/peerconnectionfactory.h @@ -78,6 +78,8 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface, CreateAudioTrack(const std::string& id, AudioSourceInterface* audio_source); + virtual bool StartAecDump(FILE* file); + virtual cricket::ChannelManager* channel_manager(); virtual talk_base::Thread* signaling_thread(); virtual talk_base::Thread* worker_thread(); @@ -93,7 +95,6 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface, cricket::WebRtcVideoDecoderFactory* video_decoder_factory); virtual ~PeerConnectionFactory(); - private: bool Initialize_s(); void Terminate_s(); @@ -108,6 +109,8 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface, PortAllocatorFactoryInterface* allocator_factory, DTLSIdentityServiceInterface* dtls_identity_service, PeerConnectionObserver* observer); + bool StartAecDump_s(FILE* file); + // Implements talk_base::MessageHandler. void OnMessage(talk_base::Message* msg); diff --git a/app/webrtc/peerconnectioninterface.h b/app/webrtc/peerconnectioninterface.h index a127dad..01f1e1c 100644 --- a/app/webrtc/peerconnectioninterface.h +++ b/app/webrtc/peerconnectioninterface.h @@ -393,11 +393,9 @@ class PeerConnectionFactoryInterface : public talk_base::RefCountInterface { class Options { public: Options() : - enable_aec_dump(false), disable_encryption(false), disable_sctp_data_channels(false) { } - bool enable_aec_dump; bool disable_encryption; bool disable_sctp_data_channels; }; @@ -442,6 +440,12 @@ class PeerConnectionFactoryInterface : public talk_base::RefCountInterface { CreateAudioTrack(const std::string& label, AudioSourceInterface* source) = 0; + // Starts AEC dump using existing file. Takes ownership of |file| and passes + // it on to VoiceEngine (via other objects) immediately, which will take + // the ownerhip. + // TODO(grunell): Remove when Chromium has started to use AEC in each source. + virtual bool StartAecDump(FILE* file) = 0; + protected: // Dtor and ctor protected as objects shouldn't be created or deleted via // this interface. |