Added StopAecDump function to PeerConnectionFactory.
The function to stop recording an AEC dump was missing from the PeerConnectionFactory interface (only a start function was provided). This CL adds the missing stop function. BUG=webrtc:4741 Review URL: https://codereview.webrtc.org/1415733005 Cr-Commit-Position: refs/heads/master@{#10372}
This commit is contained in:
parent
a74c08dced
commit
797ef12324
@ -218,6 +218,11 @@ bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file) {
|
||||
return channel_manager_->StartAecDump(file);
|
||||
}
|
||||
|
||||
void PeerConnectionFactory::StopAecDump() {
|
||||
RTC_DCHECK(signaling_thread_->IsCurrent());
|
||||
channel_manager_->StopAecDump();
|
||||
}
|
||||
|
||||
bool PeerConnectionFactory::StartRtcEventLog(rtc::PlatformFile file) {
|
||||
RTC_DCHECK(signaling_thread_->IsCurrent());
|
||||
return channel_manager_->StartRtcEventLog(file);
|
||||
|
||||
@ -80,6 +80,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
|
||||
AudioSourceInterface* audio_source) override;
|
||||
|
||||
bool StartAecDump(rtc::PlatformFile file) override;
|
||||
void StopAecDump() override;
|
||||
bool StartRtcEventLog(rtc::PlatformFile file) override;
|
||||
void StopRtcEventLog() override;
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ BEGIN_PROXY_MAP(PeerConnectionFactory)
|
||||
PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
|
||||
CreateAudioTrack, const std::string&, AudioSourceInterface*)
|
||||
PROXY_METHOD1(bool, StartAecDump, rtc::PlatformFile)
|
||||
PROXY_METHOD0(void, StopAecDump)
|
||||
PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile)
|
||||
PROXY_METHOD0(void, StopRtcEventLog)
|
||||
|
||||
|
||||
@ -621,6 +621,9 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
|
||||
// http://crbug.com/264611.
|
||||
virtual bool StartAecDump(rtc::PlatformFile file) = 0;
|
||||
|
||||
// Stops logging the AEC dump.
|
||||
virtual void StopAecDump() = 0;
|
||||
|
||||
// Starts RtcEventLog using existing file. Takes ownership of |file| and
|
||||
// passes it on to VoiceEngine, which will take the ownership. If the
|
||||
// operation fails the file will be closed. The logging will stop
|
||||
|
||||
@ -785,6 +785,8 @@ class FakeVoiceEngine : public FakeBaseEngine {
|
||||
|
||||
bool StartAecDump(rtc::PlatformFile file) { return false; }
|
||||
|
||||
void StopAecDump() {}
|
||||
|
||||
bool StartRtcEventLog(rtc::PlatformFile file) { return false; }
|
||||
|
||||
void StopRtcEventLog() {}
|
||||
|
||||
@ -122,6 +122,9 @@ class MediaEngineInterface {
|
||||
// Starts AEC dump using existing file.
|
||||
virtual bool StartAecDump(rtc::PlatformFile file) = 0;
|
||||
|
||||
// Stops recording AEC dump.
|
||||
virtual void StopAecDump() = 0;
|
||||
|
||||
// Starts RtcEventLog using existing file.
|
||||
virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0;
|
||||
|
||||
@ -225,6 +228,10 @@ class CompositeMediaEngine : public MediaEngineInterface {
|
||||
return voice_.StartAecDump(file);
|
||||
}
|
||||
|
||||
virtual void StopAecDump() {
|
||||
voice_.StopAecDump();
|
||||
}
|
||||
|
||||
virtual bool StartRtcEventLog(rtc::PlatformFile file) {
|
||||
return voice_.StartRtcEventLog(file);
|
||||
}
|
||||
|
||||
@ -108,6 +108,9 @@ class WebRtcVoiceEngine
|
||||
// Starts AEC dump using existing file.
|
||||
bool StartAecDump(rtc::PlatformFile file);
|
||||
|
||||
// Stops AEC dump.
|
||||
void StopAecDump();
|
||||
|
||||
// Starts recording an RtcEventLog using an existing file until 10 minutes
|
||||
// pass or the StopRtcEventLog function is called.
|
||||
bool StartRtcEventLog(rtc::PlatformFile file);
|
||||
@ -139,7 +142,6 @@ class WebRtcVoiceEngine
|
||||
bool is_input, const std::string& dev_name, int dev_id, int* rtc_id);
|
||||
|
||||
void StartAecDump(const std::string& filename);
|
||||
void StopAecDump();
|
||||
int CreateVoEChannel();
|
||||
|
||||
static const int kDefaultLogSeverity = rtc::LS_WARNING;
|
||||
|
||||
@ -630,6 +630,11 @@ bool ChannelManager::StartAecDump(rtc::PlatformFile file) {
|
||||
Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file));
|
||||
}
|
||||
|
||||
void ChannelManager::StopAecDump() {
|
||||
worker_thread_->Invoke<void>(
|
||||
Bind(&MediaEngineInterface::StopAecDump, media_engine_.get()));
|
||||
}
|
||||
|
||||
bool ChannelManager::StartRtcEventLog(rtc::PlatformFile file) {
|
||||
return worker_thread_->Invoke<bool>(
|
||||
Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file));
|
||||
|
||||
@ -170,6 +170,9 @@ class ChannelManager : public rtc::MessageHandler,
|
||||
// Starts AEC dump using existing file.
|
||||
bool StartAecDump(rtc::PlatformFile file);
|
||||
|
||||
// Stops recording AEC dump.
|
||||
void StopAecDump();
|
||||
|
||||
// Starts RtcEventLog using existing file.
|
||||
bool StartRtcEventLog(rtc::PlatformFile file);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user