diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-01-30 10:51:25 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-01-30 10:51:25 +0000 |
commit | 5bee9ae499d9427e1a7ce513c5bf49090a487135 (patch) | |
tree | 00db6e6d4283bedddf5ca1ffc3bf5900d80dbfed | |
parent | 0f896f1027b3b2f20ceae4d642974d59c6a022b9 (diff) | |
parent | 1d3331f51b7e0cabe37696764e2cc0b3b9735a6d (diff) | |
download | talk-kitkat-wear.tar.gz |
Merge from Chromium at DEPS revision 33.0.1750.58android-4.4w_r1android-4.4.4_r2.0.1android-4.4.4_r2android-4.4.4_r1.0.1android-4.4.4_r1android-4.4.3_r1.1.0.1android-4.4.3_r1.1android-4.4.3_r1.0.1android-4.4.3_r1kitkat-wearkitkat-mr2.2-releasekitkat-mr2.1-releasekitkat-mr2-releasekitkat-dev
This commit was generated by merge_to_master.py.
Change-Id: I66992f5a285b2813e3e28eddfaa4e165ee9e9ba1
-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 | ||||
-rw-r--r-- | media/base/fakemediaengine.h | 2 | ||||
-rw-r--r-- | media/base/filemediaengine.h | 1 | ||||
-rw-r--r-- | media/base/mediaengine.h | 7 | ||||
-rw-r--r-- | media/webrtc/webrtcmediaengine.h | 3 | ||||
-rw-r--r-- | media/webrtc/webrtcvoiceengine.cc | 18 | ||||
-rw-r--r-- | media/webrtc/webrtcvoiceengine.h | 3 | ||||
-rw-r--r-- | session/media/channelmanager.cc | 5 | ||||
-rw-r--r-- | session/media/channelmanager.h | 3 |
13 files changed, 15 insertions, 76 deletions
diff --git a/app/webrtc/localaudiosource.cc b/app/webrtc/localaudiosource.cc index 3dc5c6c..2cd472a 100644 --- a/app/webrtc/localaudiosource.cc +++ b/app/webrtc/localaudiosource.cc @@ -54,6 +54,8 @@ 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 { @@ -127,6 +129,8 @@ 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 5cf2184..ba6b09b 100644 --- a/app/webrtc/mediaconstraintsinterface.h +++ b/app/webrtc/mediaconstraintsinterface.h @@ -117,6 +117,13 @@ 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 ee15b5d..e8b8f63 100644 --- a/app/webrtc/peerconnectionfactory.cc +++ b/app/webrtc/peerconnectionfactory.cc @@ -105,21 +105,12 @@ 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 @@ -232,12 +223,6 @@ 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; - } } } @@ -289,10 +274,6 @@ 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, @@ -380,12 +361,6 @@ 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 63d37f0..dff885d 100644 --- a/app/webrtc/peerconnectionfactory.h +++ b/app/webrtc/peerconnectionfactory.h @@ -78,8 +78,6 @@ 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(); @@ -95,6 +93,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface, cricket::WebRtcVideoDecoderFactory* video_decoder_factory); virtual ~PeerConnectionFactory(); + private: bool Initialize_s(); void Terminate_s(); @@ -109,8 +108,6 @@ 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 01f1e1c..a127dad 100644 --- a/app/webrtc/peerconnectioninterface.h +++ b/app/webrtc/peerconnectioninterface.h @@ -393,9 +393,11 @@ 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; }; @@ -440,12 +442,6 @@ 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. diff --git a/media/base/fakemediaengine.h b/media/base/fakemediaengine.h index d71c660..1a4e8ab 100644 --- a/media/base/fakemediaengine.h +++ b/media/base/fakemediaengine.h @@ -778,8 +778,6 @@ class FakeVoiceEngine : public FakeBaseEngine { bool SetLocalMonitor(bool enable) { return true; } - bool StartAecDump(FILE* file) { return false; } - bool RegisterProcessor(uint32 ssrc, VoiceProcessor* voice_processor, MediaProcessorDirection direction) { if (direction == MPD_RX) { diff --git a/media/base/filemediaengine.h b/media/base/filemediaengine.h index 843806b..dfdb037 100644 --- a/media/base/filemediaengine.h +++ b/media/base/filemediaengine.h @@ -133,7 +133,6 @@ class FileMediaEngine : public MediaEngineInterface { virtual bool FindVideoCodec(const VideoCodec& codec) { return true; } virtual void SetVoiceLogging(int min_sev, const char* filter) {} virtual void SetVideoLogging(int min_sev, const char* filter) {} - virtual bool StartAecDump(FILE* file) { return false; } virtual bool RegisterVideoProcessor(VideoProcessor* processor) { return true; diff --git a/media/base/mediaengine.h b/media/base/mediaengine.h index c04df9f..f916572 100644 --- a/media/base/mediaengine.h +++ b/media/base/mediaengine.h @@ -135,9 +135,6 @@ class MediaEngineInterface { virtual void SetVoiceLogging(int min_sev, const char* filter) = 0; virtual void SetVideoLogging(int min_sev, const char* filter) = 0; - // Starts AEC dump using existing file. - virtual bool StartAecDump(FILE* file) = 0; - // Voice processors for effects. virtual bool RegisterVoiceProcessor(uint32 ssrc, VoiceProcessor* video_processor, @@ -256,10 +253,6 @@ class CompositeMediaEngine : public MediaEngineInterface { video_.SetLogging(min_sev, filter); } - virtual bool StartAecDump(FILE* file) { - return voice_.StartAecDump(file); - } - virtual bool RegisterVoiceProcessor(uint32 ssrc, VoiceProcessor* processor, MediaProcessorDirection direction) { diff --git a/media/webrtc/webrtcmediaengine.h b/media/webrtc/webrtcmediaengine.h index 82abefa..94e7a99 100644 --- a/media/webrtc/webrtcmediaengine.h +++ b/media/webrtc/webrtcmediaengine.h @@ -145,9 +145,6 @@ class WebRtcMediaEngine : public cricket::MediaEngineInterface { virtual void SetVideoLogging(int min_sev, const char* filter) OVERRIDE { delegate_->SetVideoLogging(min_sev, filter); } - virtual bool StartAecDump(FILE* file) OVERRIDE { - return delegate_->StartAecDump(file); - } virtual bool RegisterVoiceProcessor( uint32 ssrc, VoiceProcessor* video_processor, MediaProcessorDirection direction) OVERRIDE { diff --git a/media/webrtc/webrtcvoiceengine.cc b/media/webrtc/webrtcvoiceengine.cc index 2aa6b8c..51da9ac 100644 --- a/media/webrtc/webrtcvoiceengine.cc +++ b/media/webrtc/webrtcvoiceengine.cc @@ -1433,22 +1433,6 @@ bool WebRtcVoiceEngine::SetAudioDeviceModule(webrtc::AudioDeviceModule* adm, return true; } -bool WebRtcVoiceEngine::StartAecDump(FILE* file) { -#ifdef USE_WEBRTC_DEV_BRANCH - StopAecDump(); - if (voe_wrapper_->processing()->StartDebugRecording(file) != - webrtc::AudioProcessing::kNoError) { - LOG_RTCERR1(StartDebugRecording, "FILE*"); - fclose(file); - return false; - } - is_dumping_aec_ = true; - return true; -#else - return false; -#endif -} - bool WebRtcVoiceEngine::RegisterProcessor( uint32 ssrc, VoiceProcessor* voice_processor, @@ -1606,7 +1590,7 @@ void WebRtcVoiceEngine::StartAecDump(const std::string& filename) { // Start dumping AEC when we are not dumping. if (voe_wrapper_->processing()->StartDebugRecording( filename.c_str()) != webrtc::AudioProcessing::kNoError) { - LOG_RTCERR1(StartDebugRecording, filename.c_str()); + LOG_RTCERR0(StartDebugRecording); } else { is_dumping_aec_ = true; } diff --git a/media/webrtc/webrtcvoiceengine.h b/media/webrtc/webrtcvoiceengine.h index adf4853..23d97f5 100644 --- a/media/webrtc/webrtcvoiceengine.h +++ b/media/webrtc/webrtcvoiceengine.h @@ -174,9 +174,6 @@ class WebRtcVoiceEngine bool SetAudioDeviceModule(webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc); - // Starts AEC dump using existing file. - bool StartAecDump(FILE* file); - // Check whether the supplied trace should be ignored. bool ShouldIgnoreTrace(const std::string& trace); diff --git a/session/media/channelmanager.cc b/session/media/channelmanager.cc index 4d5d8fc..d4fcc79 100644 --- a/session/media/channelmanager.cc +++ b/session/media/channelmanager.cc @@ -947,9 +947,4 @@ bool ChannelManager::SetAudioOptions(const AudioOptions& options) { return true; } -bool ChannelManager::StartAecDump(FILE* file) { - return worker_thread_->Invoke<bool>( - Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); -} - } // namespace cricket diff --git a/session/media/channelmanager.h b/session/media/channelmanager.h index f19d3d0..fdb8f73 100644 --- a/session/media/channelmanager.h +++ b/session/media/channelmanager.h @@ -214,9 +214,6 @@ class ChannelManager : public talk_base::MessageHandler, void SetVideoCaptureDeviceMaxFormat(const std::string& usb_id, const VideoFormat& max_format); - // Starts AEC dump using existing file. - bool StartAecDump(FILE* file); - sigslot::repeater0<> SignalDevicesChange; sigslot::signal2<VideoCapturer*, CaptureState> SignalVideoCaptureStateChange; |