diff options
author | ivoc <ivoc@webrtc.org> | 2015-12-19 10:14:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-19 18:14:18 +0000 |
commit | a4df27b6713583045e51e20c4eb93718d15ca33e (patch) | |
tree | c9576bbe1d9274c9c7c9afde21d81d041363cf34 /talk | |
parent | f4f5cb09277d5ef6aeac8341e5f54a055867803a (diff) | |
download | webrtc-a4df27b6713583045e51e20c4eb93718d15ca33e.tar.gz |
Revert of Reland "Added option to specify a maximum file size when recording an AEC dump." (patchset #2 id:20001 of https://codereview.webrtc.org/1541633002/ )
Reason for revert:
Compile error on Android needs to be fixed before relanding.
Original issue's description:
> Reland "Added option to specify a maximum file size when recording an AEC dump.", commit ae2c5ad12afc8cc29fe9c59dea432b697b871a87.
>
> The revert of the original CL was commit 36d4c545007129446e551c45c17b25377dce89a4.
> Original review: https://codereview.webrtc.org/1413483003/
>
> The original CL changes a function on audio_processing.h that is used by Chrome, this CL adds back the old function.
>
> NOTRY=true
> TBR=glaznev@webrtc.org, henrik.lundin@webrtc.org, solenberg@google.com, henrikg@webrtc.org, perkj@webrtc.org
> BUG=webrtc:4741
>
> Committed: https://crrev.com/f4f5cb09277d5ef6aeac8341e5f54a055867803a
> Cr-Commit-Position: refs/heads/master@{#11093}
TBR=glaznev@webrtc.org,henrik.lundin@webrtc.org,solenberg@google.com,henrikg@webrtc.org,perkj@webrtc.org,kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4741
Review URL: https://codereview.webrtc.org/1537213002
Cr-Commit-Position: refs/heads/master@{#11094}
Diffstat (limited to 'talk')
-rw-r--r-- | talk/app/webrtc/java/jni/peerconnection_jni.cc | 5 | ||||
-rw-r--r-- | talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java | 7 | ||||
-rw-r--r-- | talk/app/webrtc/peerconnectionfactory.cc | 5 | ||||
-rw-r--r-- | talk/app/webrtc/peerconnectionfactory.h | 2 | ||||
-rw-r--r-- | talk/app/webrtc/peerconnectionfactoryproxy.h | 2 | ||||
-rw-r--r-- | talk/app/webrtc/peerconnectioninterface.h | 8 | ||||
-rw-r--r-- | talk/media/base/fakemediaengine.h | 4 | ||||
-rw-r--r-- | talk/media/base/mediaengine.h | 10 | ||||
-rw-r--r-- | talk/media/webrtc/fakewebrtcvoiceengine.h | 5 | ||||
-rw-r--r-- | talk/media/webrtc/webrtcvoiceengine.cc | 12 | ||||
-rw-r--r-- | talk/media/webrtc/webrtcvoiceengine.h | 7 | ||||
-rw-r--r-- | talk/session/media/channelmanager.cc | 8 | ||||
-rw-r--r-- | talk/session/media/channelmanager.h | 6 |
13 files changed, 31 insertions, 50 deletions
diff --git a/talk/app/webrtc/java/jni/peerconnection_jni.cc b/talk/app/webrtc/java/jni/peerconnection_jni.cc index 52b67495eb..c31859def8 100644 --- a/talk/app/webrtc/java/jni/peerconnection_jni.cc +++ b/talk/app/webrtc/java/jni/peerconnection_jni.cc @@ -1280,12 +1280,11 @@ JOW(jlong, PeerConnectionFactory_nativeCreateAudioTrack)( } JOW(jboolean, PeerConnectionFactory_nativeStartAecDump)( - JNIEnv* jni, jclass, jlong native_factory, jint file, - jint filesize_limit_bytes) { + JNIEnv* jni, jclass, jlong native_factory, jint file) { #if defined(ANDROID) rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( factoryFromJava(native_factory)); - return factory->StartAecDump(file, filesize_limit_bytes); + return factory->StartAecDump(file); #else return false; #endif diff --git a/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java b/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java index e65c736ffc..d759c69271 100644 --- a/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java +++ b/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java @@ -143,8 +143,8 @@ public class PeerConnectionFactory { // Starts recording an AEC dump. Ownership of the file is transfered to the // native code. If an AEC dump is already in progress, it will be stopped and // a new one will start using the provided file. - public boolean startAecDump(int file_descriptor, int filesize_limit_bytes) { - return nativeStartAecDump(nativeFactory, file_descriptor, filesize_limit_bytes); + public boolean startAecDump(int file_descriptor) { + return nativeStartAecDump(nativeFactory, file_descriptor); } // Stops recording an AEC dump. If no AEC dump is currently being recorded, @@ -250,8 +250,7 @@ public class PeerConnectionFactory { private static native long nativeCreateAudioTrack( long nativeFactory, String id, long nativeSource); - private static native boolean nativeStartAecDump( - long nativeFactory, int file_descriptor, int filesize_limit_bytes); + private static native boolean nativeStartAecDump(long nativeFactory, int file_descriptor); private static native void nativeStopAecDump(long nativeFactory); diff --git a/talk/app/webrtc/peerconnectionfactory.cc b/talk/app/webrtc/peerconnectionfactory.cc index 872bdb61d3..6d36c8bc2f 100644 --- a/talk/app/webrtc/peerconnectionfactory.cc +++ b/talk/app/webrtc/peerconnectionfactory.cc @@ -232,10 +232,9 @@ PeerConnectionFactory::CreateVideoSource( return VideoSourceProxy::Create(signaling_thread_, source); } -bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file, - int64_t max_size_bytes) { +bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file) { RTC_DCHECK(signaling_thread_->IsCurrent()); - return channel_manager_->StartAecDump(file, max_size_bytes); + return channel_manager_->StartAecDump(file); } void PeerConnectionFactory::StopAecDump() { diff --git a/talk/app/webrtc/peerconnectionfactory.h b/talk/app/webrtc/peerconnectionfactory.h index 6d2d9729b6..cad89d4ab5 100644 --- a/talk/app/webrtc/peerconnectionfactory.h +++ b/talk/app/webrtc/peerconnectionfactory.h @@ -93,7 +93,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface { CreateAudioTrack(const std::string& id, AudioSourceInterface* audio_source) override; - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) override; + bool StartAecDump(rtc::PlatformFile file) override; void StopAecDump() override; bool StartRtcEventLog(rtc::PlatformFile file) override; void StopRtcEventLog() override; diff --git a/talk/app/webrtc/peerconnectionfactoryproxy.h b/talk/app/webrtc/peerconnectionfactoryproxy.h index f54ce5be1a..db34ea72ce 100644 --- a/talk/app/webrtc/peerconnectionfactoryproxy.h +++ b/talk/app/webrtc/peerconnectionfactoryproxy.h @@ -72,7 +72,7 @@ BEGIN_PROXY_MAP(PeerConnectionFactory) CreateVideoTrack, const std::string&, VideoSourceInterface*) PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, CreateAudioTrack, const std::string&, AudioSourceInterface*) - PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) + PROXY_METHOD1(bool, StartAecDump, rtc::PlatformFile) PROXY_METHOD0(void, StopAecDump) PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) PROXY_METHOD0(void, StopRtcEventLog) diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h index 475145a61e..46481768b9 100644 --- a/talk/app/webrtc/peerconnectioninterface.h +++ b/talk/app/webrtc/peerconnectioninterface.h @@ -640,11 +640,9 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface { // 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. If the operation fails, the file will be closed. - // A maximum file size in bytes can be specified. When the file size limit is - // reached, logging is stopped automatically. If max_size_bytes is set to a - // value <= 0, no limit will be used, and logging will continue until the - // StopAecDump function is called. - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; + // TODO(grunell): Remove when Chromium has started to use AEC in each source. + // http://crbug.com/264611. + virtual bool StartAecDump(rtc::PlatformFile file) = 0; // Stops logging the AEC dump. virtual void StopAecDump() = 0; diff --git a/talk/media/base/fakemediaengine.h b/talk/media/base/fakemediaengine.h index 3f56512da2..f5b21741d3 100644 --- a/talk/media/base/fakemediaengine.h +++ b/talk/media/base/fakemediaengine.h @@ -762,9 +762,7 @@ class FakeVoiceEngine : public FakeBaseEngine { int GetInputLevel() { return 0; } - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) { - return false; - } + bool StartAecDump(rtc::PlatformFile file) { return false; } void StopAecDump() {} diff --git a/talk/media/base/mediaengine.h b/talk/media/base/mediaengine.h index cd533c443e..43b4de5a52 100644 --- a/talk/media/base/mediaengine.h +++ b/talk/media/base/mediaengine.h @@ -102,10 +102,8 @@ class MediaEngineInterface { virtual const std::vector<VideoCodec>& video_codecs() = 0; virtual RtpCapabilities GetVideoCapabilities() = 0; - // Starts AEC dump using existing file, a maximum file size in bytes can be - // specified. Logging is stopped just before the size limit is exceeded. - // If max_size_bytes is set to a value <= 0, no limit will be used. - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; + // Starts AEC dump using existing file. + virtual bool StartAecDump(rtc::PlatformFile file) = 0; // Stops recording AEC dump. virtual void StopAecDump() = 0; @@ -187,8 +185,8 @@ class CompositeMediaEngine : public MediaEngineInterface { return video_.GetCapabilities(); } - virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) { - return voice_.StartAecDump(file, max_size_bytes); + virtual bool StartAecDump(rtc::PlatformFile file) { + return voice_.StartAecDump(file); } virtual void StopAecDump() { diff --git a/talk/media/webrtc/fakewebrtcvoiceengine.h b/talk/media/webrtc/fakewebrtcvoiceengine.h index debaa6e07a..bf22a290b8 100644 --- a/talk/media/webrtc/fakewebrtcvoiceengine.h +++ b/talk/media/webrtc/fakewebrtcvoiceengine.h @@ -113,9 +113,8 @@ class FakeAudioProcessing : public webrtc::AudioProcessing { WEBRTC_VOID_STUB(set_stream_key_pressed, (bool key_pressed)); WEBRTC_VOID_STUB(set_delay_offset_ms, (int offset)); WEBRTC_STUB_CONST(delay_offset_ms, ()); - WEBRTC_STUB(StartDebugRecording, - (const char filename[kMaxFilenameSize], int64_t max_size_bytes)); - WEBRTC_STUB(StartDebugRecording, (FILE * handle, int64_t max_size_bytes)); + WEBRTC_STUB(StartDebugRecording, (const char filename[kMaxFilenameSize])); + WEBRTC_STUB(StartDebugRecording, (FILE* handle)); WEBRTC_STUB(StopDebugRecording, ()); WEBRTC_VOID_STUB(UpdateHistogramsOnCallEnd, ()); webrtc::EchoCancellation* echo_cancellation() const override { return NULL; } diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc index 38b6c54b73..9eee2af202 100644 --- a/talk/media/webrtc/webrtcvoiceengine.cc +++ b/talk/media/webrtc/webrtcvoiceengine.cc @@ -1011,8 +1011,7 @@ bool WebRtcVoiceEngine::SetAudioDeviceModule(webrtc::AudioDeviceModule* adm) { return true; } -bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file, - int64_t max_size_bytes) { +bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file) { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); FILE* aec_dump_file_stream = rtc::FdopenPlatformFileForWriting(file); if (!aec_dump_file_stream) { @@ -1022,8 +1021,7 @@ bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file, return false; } StopAecDump(); - if (voe_wrapper_->base()->audio_processing()->StartDebugRecording( - aec_dump_file_stream, max_size_bytes) != + if (voe_wrapper_->processing()->StartDebugRecording(aec_dump_file_stream) != webrtc::AudioProcessing::kNoError) { LOG_RTCERR0(StartDebugRecording); fclose(aec_dump_file_stream); @@ -1037,8 +1035,8 @@ void WebRtcVoiceEngine::StartAecDump(const std::string& filename) { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); if (!is_dumping_aec_) { // Start dumping AEC when we are not dumping. - if (voe_wrapper_->base()->audio_processing()->StartDebugRecording( - filename.c_str(), -1) != webrtc::AudioProcessing::kNoError) { + if (voe_wrapper_->processing()->StartDebugRecording( + filename.c_str()) != webrtc::AudioProcessing::kNoError) { LOG_RTCERR1(StartDebugRecording, filename.c_str()); } else { is_dumping_aec_ = true; @@ -1050,7 +1048,7 @@ void WebRtcVoiceEngine::StopAecDump() { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); if (is_dumping_aec_) { // Stop dumping AEC when we are dumping. - if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != + if (voe_wrapper_->processing()->StopDebugRecording() != webrtc::AudioProcessing::kNoError) { LOG_RTCERR0(StopDebugRecording); } diff --git a/talk/media/webrtc/webrtcvoiceengine.h b/talk/media/webrtc/webrtcvoiceengine.h index ce3bdf3ed7..0f2f59e492 100644 --- a/talk/media/webrtc/webrtcvoiceengine.h +++ b/talk/media/webrtc/webrtcvoiceengine.h @@ -94,11 +94,8 @@ class WebRtcVoiceEngine final : public webrtc::TraceCallback { // Set the external ADM. This can only be called before Init. bool SetAudioDeviceModule(webrtc::AudioDeviceModule* adm); - // Starts AEC dump using an existing file. A maximum file size in bytes can be - // specified. When the maximum file size is reached, logging is stopped and - // the file is closed. If max_size_bytes is set to <= 0, no limit will be - // used. - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); + // Starts AEC dump using existing file. + bool StartAecDump(rtc::PlatformFile file); // Stops AEC dump. void StopAecDump(); diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc index bd89a41328..e7a4b8bddb 100644 --- a/talk/session/media/channelmanager.cc +++ b/talk/session/media/channelmanager.cc @@ -550,11 +550,9 @@ void ChannelManager::OnMessage(rtc::Message* message) { } } -bool ChannelManager::StartAecDump(rtc::PlatformFile file, - int64_t max_size_bytes) { - return worker_thread_->Invoke<bool>(Bind(&MediaEngineInterface::StartAecDump, - media_engine_.get(), file, - max_size_bytes)); +bool ChannelManager::StartAecDump(rtc::PlatformFile file) { + return worker_thread_->Invoke<bool>( + Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); } void ChannelManager::StopAecDump() { diff --git a/talk/session/media/channelmanager.h b/talk/session/media/channelmanager.h index f69bf9a293..2bc516bfaa 100644 --- a/talk/session/media/channelmanager.h +++ b/talk/session/media/channelmanager.h @@ -162,10 +162,8 @@ class ChannelManager : public rtc::MessageHandler, // The operations below occur on the main thread. - // Starts AEC dump using existing file, with a specified maximum file size in - // bytes. When the limit is reached, logging will stop and the file will be - // closed. If max_size_bytes is set to <= 0, no limit will be used. - bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); + // Starts AEC dump using existing file. + bool StartAecDump(rtc::PlatformFile file); // Stops recording AEC dump. void StopAecDump(); |