Adopt absl::string_view in AudioProcessing's interface
This is the first step of migrating AudioProcessing::CreateAndAttachAecDump() from using std::string to absl::string_view. Bug: webrtc:13579 Change-Id: I8fc373e7ac55fd8e96bb0b01d1a30e28883ac9a2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269400 Commit-Queue: Ali Tofigh <alito@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37631}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
2f1a4370d5
commit
1fa87c44cb
@ -23,6 +23,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/array_view.h"
|
||||
#include "api/audio/echo_canceller3_config.h"
|
||||
@ -622,9 +623,18 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
||||
// return value of true indicates that the file has been
|
||||
// sucessfully opened, while a value of false indicates that
|
||||
// opening the file failed.
|
||||
//
|
||||
// TODO(webrtc:13579): Remove std::string version once downstream users have
|
||||
// implemented the absl::string_view version.
|
||||
virtual bool CreateAndAttachAecDump(const std::string& file_name,
|
||||
int64_t max_log_size_bytes,
|
||||
rtc::TaskQueue* worker_queue) = 0;
|
||||
virtual bool CreateAndAttachAecDump(absl::string_view file_name,
|
||||
int64_t max_log_size_bytes,
|
||||
rtc::TaskQueue* worker_queue) {
|
||||
return CreateAndAttachAecDump(std::string(file_name), max_log_size_bytes,
|
||||
worker_queue);
|
||||
}
|
||||
virtual bool CreateAndAttachAecDump(FILE* handle,
|
||||
int64_t max_log_size_bytes,
|
||||
rtc::TaskQueue* worker_queue) = 0;
|
||||
|
||||
Reference in New Issue
Block a user