Delete deprecated version of PeerConnectionFactoryInterface::StartAecDump
Bug: webrtc:6463 Change-Id: Ia60c34f7e1c9f3bb3f18417c7b621ba033e2ab5d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141668 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28395}
This commit is contained in:
3
api/DEPS
3
api/DEPS
@ -122,7 +122,6 @@ specific_include_rules = {
|
|||||||
"+p2p/base/port_allocator.h",
|
"+p2p/base/port_allocator.h",
|
||||||
"+rtc_base/bitrate_allocation_strategy.h",
|
"+rtc_base/bitrate_allocation_strategy.h",
|
||||||
"+rtc_base/network.h",
|
"+rtc_base/network.h",
|
||||||
"+rtc_base/platform_file.h",
|
|
||||||
"+rtc_base/rtc_certificate.h",
|
"+rtc_base/rtc_certificate.h",
|
||||||
"+rtc_base/rtc_certificate_generator.h",
|
"+rtc_base/rtc_certificate_generator.h",
|
||||||
"+rtc_base/socket_address.h",
|
"+rtc_base/socket_address.h",
|
||||||
@ -148,8 +147,6 @@ specific_include_rules = {
|
|||||||
"+rtc_base/logging.h",
|
"+rtc_base/logging.h",
|
||||||
],
|
],
|
||||||
"rtc_event_log_output_file.h": [
|
"rtc_event_log_output_file.h": [
|
||||||
# TODO(bugs.webrtc.org/6463): Delete this dependency.
|
|
||||||
"+rtc_base/platform_file.h",
|
|
||||||
# For private member and constructor.
|
# For private member and constructor.
|
||||||
"+rtc_base/system/file_wrapper.h",
|
"+rtc_base/system/file_wrapper.h",
|
||||||
],
|
],
|
||||||
|
@ -57,7 +57,6 @@ PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
|
|||||||
const std::string&,
|
const std::string&,
|
||||||
AudioSourceInterface*)
|
AudioSourceInterface*)
|
||||||
PROXY_METHOD2(bool, StartAecDump, FILE*, int64_t)
|
PROXY_METHOD2(bool, StartAecDump, FILE*, int64_t)
|
||||||
PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
|
|
||||||
PROXY_METHOD0(void, StopAecDump)
|
PROXY_METHOD0(void, StopAecDump)
|
||||||
END_PROXY_MAP()
|
END_PROXY_MAP()
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@
|
|||||||
// TODO(nisse): The interface for bitrate allocation strategy belongs in api/.
|
// TODO(nisse): The interface for bitrate allocation strategy belongs in api/.
|
||||||
#include "rtc_base/bitrate_allocation_strategy.h"
|
#include "rtc_base/bitrate_allocation_strategy.h"
|
||||||
#include "rtc_base/network.h"
|
#include "rtc_base/network.h"
|
||||||
#include "rtc_base/platform_file.h"
|
|
||||||
#include "rtc_base/rtc_certificate.h"
|
#include "rtc_base/rtc_certificate.h"
|
||||||
#include "rtc_base/rtc_certificate_generator.h"
|
#include "rtc_base/rtc_certificate_generator.h"
|
||||||
#include "rtc_base/socket_address.h"
|
#include "rtc_base/socket_address.h"
|
||||||
@ -1412,10 +1411,6 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
|
|||||||
virtual bool StartAecDump(FILE* file, int64_t max_size_bytes) {
|
virtual bool StartAecDump(FILE* file, int64_t max_size_bytes) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// TODO(webrtc:6463): Deprecated; PlatformFile will soon be deleted.
|
|
||||||
virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stops logging the AEC dump.
|
// Stops logging the AEC dump.
|
||||||
virtual void StopAecDump() = 0;
|
virtual void StopAecDump() = 0;
|
||||||
|
@ -214,17 +214,6 @@ bool PeerConnectionFactory::StartAecDump(FILE* file, int64_t max_size_bytes) {
|
|||||||
return channel_manager_->StartAecDump(FileWrapper(file), max_size_bytes);
|
return channel_manager_->StartAecDump(FileWrapper(file), max_size_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file,
|
|
||||||
int64_t max_size_bytes) {
|
|
||||||
RTC_DCHECK(signaling_thread_->IsCurrent());
|
|
||||||
FILE* f = rtc::FdopenPlatformFileForWriting(file);
|
|
||||||
if (!f) {
|
|
||||||
rtc::ClosePlatformFile(file);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return StartAecDump(f, max_size_bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PeerConnectionFactory::StopAecDump() {
|
void PeerConnectionFactory::StopAecDump() {
|
||||||
RTC_DCHECK(signaling_thread_->IsCurrent());
|
RTC_DCHECK(signaling_thread_->IsCurrent());
|
||||||
channel_manager_->StopAecDump();
|
channel_manager_->StopAecDump();
|
||||||
|
@ -70,7 +70,6 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
|
|||||||
AudioSourceInterface* audio_source) override;
|
AudioSourceInterface* audio_source) override;
|
||||||
|
|
||||||
bool StartAecDump(FILE* file, int64_t max_size_bytes) override;
|
bool StartAecDump(FILE* file, int64_t max_size_bytes) override;
|
||||||
bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) override;
|
|
||||||
void StopAecDump() override;
|
void StopAecDump() override;
|
||||||
|
|
||||||
virtual std::unique_ptr<cricket::SctpTransportInternalFactory>
|
virtual std::unique_ptr<cricket::SctpTransportInternalFactory>
|
||||||
|
@ -420,10 +420,16 @@ jlong JNI_PeerConnectionFactory_CreateAudioTrack(
|
|||||||
static jboolean JNI_PeerConnectionFactory_StartAecDump(
|
static jboolean JNI_PeerConnectionFactory_StartAecDump(
|
||||||
JNIEnv* jni,
|
JNIEnv* jni,
|
||||||
jlong native_factory,
|
jlong native_factory,
|
||||||
jint file,
|
jint file_descriptor,
|
||||||
jint filesize_limit_bytes) {
|
jint filesize_limit_bytes) {
|
||||||
|
FILE* f = fdopen(file_descriptor, "wb");
|
||||||
|
if (!f) {
|
||||||
|
close(file_descriptor);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return PeerConnectionFactoryFromJava(native_factory)
|
return PeerConnectionFactoryFromJava(native_factory)
|
||||||
->StartAecDump(file, filesize_limit_bytes);
|
->StartAecDump(f, filesize_limit_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void JNI_PeerConnectionFactory_StopAecDump(JNIEnv* jni,
|
static void JNI_PeerConnectionFactory_StopAecDump(JNIEnv* jni,
|
||||||
|
@ -310,12 +310,12 @@
|
|||||||
RTCLogError(@"Aec dump already started.");
|
RTCLogError(@"Aec dump already started.");
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
int fd = open(filePath.UTF8String, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
FILE *f = fopen(filePath.UTF8String, "wb");
|
||||||
if (fd < 0) {
|
if (!f) {
|
||||||
RTCLogError(@"Error opening file: %@. Error: %d", filePath, errno);
|
RTCLogError(@"Error opening file: %@. Error: %s", filePath, strerror(errno));
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
_hasStartedAecDump = _nativeFactory->StartAecDump(fd, maxSizeInBytes);
|
_hasStartedAecDump = _nativeFactory->StartAecDump(f, maxSizeInBytes);
|
||||||
return _hasStartedAecDump;
|
return _hasStartedAecDump;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user