[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:

committed by
WebRTC LUCI CQ

parent
d5ddad4cdb
commit
7c3219265e
@ -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()),
|
||||
|
@ -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_;
|
||||
|
Reference in New Issue
Block a user