Adopt absl::string_view in function parameters under audio/
This is part of a large-scale effort to adopt absl::string_view throughout the WebRTC code base. As a first step, function parameters of type 'const std::string&' are being converted to absl::string_view. Bug: webrtc:13579 Change-Id: Ib4618fad3bff2902cd3a4730506aca300949d76c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252982 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Ali Tofigh <alito@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36102}
This commit is contained in:
parent
8290040848
commit
4d278e2caf
@ -104,6 +104,7 @@ rtc_library("audio") {
|
||||
]
|
||||
absl_deps = [
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/strings",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -225,7 +226,10 @@ if (rtc_include_tests) {
|
||||
"../test/pc/e2e:network_quality_metrics_reporter",
|
||||
"//testing/gtest",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/flags:flag" ]
|
||||
absl_deps = [
|
||||
"//third_party/abseil-cpp/absl/flags:flag",
|
||||
"//third_party/abseil-cpp/absl/strings",
|
||||
]
|
||||
if (is_android) {
|
||||
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
||||
}
|
||||
|
||||
@ -453,9 +453,9 @@ void AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
|
||||
channel_receive_->ReceivedRTCPPacket(packet, length);
|
||||
}
|
||||
|
||||
void AudioReceiveStream::SetSyncGroup(const std::string& sync_group) {
|
||||
void AudioReceiveStream::SetSyncGroup(absl::string_view sync_group) {
|
||||
RTC_DCHECK_RUN_ON(&packet_sequence_checker_);
|
||||
config_.sync_group = sync_group;
|
||||
config_.sync_group = std::string(sync_group);
|
||||
}
|
||||
|
||||
void AudioReceiveStream::SetLocalSsrc(uint32_t local_ssrc) {
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/audio/audio_mixer.h"
|
||||
#include "api/neteq/neteq_factory.h"
|
||||
#include "api/rtp_headers.h"
|
||||
@ -121,7 +122,7 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
|
||||
void AssociateSendStream(AudioSendStream* send_stream);
|
||||
void DeliverRtcp(const uint8_t* packet, size_t length);
|
||||
|
||||
void SetSyncGroup(const std::string& sync_group);
|
||||
void SetSyncGroup(absl::string_view sync_group);
|
||||
|
||||
void SetLocalSsrc(uint32_t local_ssrc);
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include "absl/flags/declare.h"
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/test/create_network_emulation_manager.h"
|
||||
#include "api/test/create_peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
@ -71,14 +72,15 @@ CreateTwoNetworkLinks(NetworkEmulationManager* emulation,
|
||||
}
|
||||
|
||||
std::unique_ptr<webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture>
|
||||
CreateTestFixture(const std::string& test_case_name,
|
||||
CreateTestFixture(absl::string_view test_case_name,
|
||||
TimeController& time_controller,
|
||||
std::pair<EmulatedNetworkManagerInterface*,
|
||||
EmulatedNetworkManagerInterface*> network_links,
|
||||
rtc::FunctionView<void(PeerConfigurer*)> alice_configurer,
|
||||
rtc::FunctionView<void(PeerConfigurer*)> bob_configurer) {
|
||||
auto fixture = webrtc_pc_e2e::CreatePeerConnectionE2EQualityTestFixture(
|
||||
test_case_name, time_controller, /*audio_quality_analyzer=*/nullptr,
|
||||
std::string(test_case_name), time_controller,
|
||||
/*audio_quality_analyzer=*/nullptr,
|
||||
/*video_quality_analyzer=*/nullptr);
|
||||
fixture->AddPeer(network_links.first->network_dependencies(),
|
||||
alice_configurer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user