[PCLF] Add ToString function to VideoSubscription

Bug: b/231394729
Change-Id: I1bdebf5eb266d566452b98e2bf52f08b609c427d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264700
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37087}
This commit is contained in:
Artem Titov
2022-06-02 10:38:24 +02:00
committed by WebRTC LUCI CQ
parent d5ddad4cdb
commit 7c3219265e
2 changed files with 19 additions and 0 deletions

View File

@ -105,6 +105,23 @@ PeerConnectionE2EQualityTestFixture::VideoSubscription::GetMaxResolution(
return max_resolution;
}
std::string PeerConnectionE2EQualityTestFixture::VideoSubscription::ToString()
const {
rtc::StringBuilder out;
out << "{ default_resolution_=[";
if (default_resolution_.has_value()) {
out << default_resolution_->ToString();
} else {
out << "undefined";
}
out << "], {";
for (const auto& [peer_name, resolution] : peers_resolution_) {
out << "[" << peer_name << ": " << resolution.ToString() << "], ";
}
out << "} }";
return out.Release();
}
PeerConnectionE2EQualityTestFixture::VideoConfig::VideoConfig(
const VideoResolution& resolution)
: width(resolution.width()),

View File

@ -430,6 +430,8 @@ class PeerConnectionE2EQualityTestFixture {
return subscribed_streams;
}
std::string ToString() const;
private:
absl::optional<VideoResolution> default_resolution_ = absl::nullopt;
std::map<std::string, VideoResolution> peers_resolution_;