Adopt absl::string_view in modules/audio_coding/
Bug: webrtc:13579 Change-Id: Ifec66fb6ba9724d18539de7245a358c2d13c7939 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268547 Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Ali Tofigh <alito@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37573}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
761072f68e
commit
714e3cbb48
@ -14,6 +14,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_coding/acm2/acm_receiver.h"
|
||||
#include "modules/audio_coding/acm2/acm_remixing.h"
|
||||
@ -112,7 +113,7 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
|
||||
// the value has changed since the last time (and always for the first call).
|
||||
class ChangeLogger {
|
||||
public:
|
||||
explicit ChangeLogger(const std::string& histogram_name)
|
||||
explicit ChangeLogger(absl::string_view histogram_name)
|
||||
: histogram_name_(histogram_name) {}
|
||||
// Logs the new value if it is different from the last logged value, or if
|
||||
// this is the first call.
|
||||
@ -135,7 +136,7 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
|
||||
|
||||
int InitializeReceiverSafe() RTC_EXCLUSIVE_LOCKS_REQUIRED(acm_mutex_);
|
||||
|
||||
bool HaveValidEncoder(const char* caller_name) const
|
||||
bool HaveValidEncoder(absl::string_view caller_name) const
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(acm_mutex_);
|
||||
|
||||
// Preprocessing of input audio, including resampling and down-mixing if
|
||||
@ -589,7 +590,8 @@ int AudioCodingModuleImpl::GetNetworkStatistics(NetworkStatistics* statistics) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioCodingModuleImpl::HaveValidEncoder(const char* caller_name) const {
|
||||
bool AudioCodingModuleImpl::HaveValidEncoder(
|
||||
absl::string_view caller_name) const {
|
||||
if (!encoder_stack_) {
|
||||
RTC_LOG(LS_ERROR) << caller_name << " failed: No send codec is registered.";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user