Let PCF.GetRtpSenderCapabilities return codecs' scalabilityModes.
Also move ScalabilityModeToString to api and add RTC_EXPORT so that Chromium can use it. Bug: chromium:986069 Change-Id: I5dbbb6de9b14ca20f3ae0630552dcd44595ad5ef Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267780 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#37444}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
e1c707c40f
commit
a1a7c638ec
@ -70,6 +70,15 @@ SdpVideoFormat::SdpVideoFormat(const std::string& name,
|
||||
const Parameters& parameters)
|
||||
: name(name), parameters(parameters) {}
|
||||
|
||||
SdpVideoFormat::SdpVideoFormat(
|
||||
const std::string& name,
|
||||
const Parameters& parameters,
|
||||
const absl::InlinedVector<ScalabilityMode, kScalabilityModeCount>&
|
||||
scalability_modes)
|
||||
: name(name),
|
||||
parameters(parameters),
|
||||
scalability_modes(scalability_modes) {}
|
||||
|
||||
SdpVideoFormat::SdpVideoFormat(const SdpVideoFormat&) = default;
|
||||
SdpVideoFormat::SdpVideoFormat(SdpVideoFormat&&) = default;
|
||||
SdpVideoFormat& SdpVideoFormat::operator=(const SdpVideoFormat&) = default;
|
||||
@ -80,9 +89,24 @@ SdpVideoFormat::~SdpVideoFormat() = default;
|
||||
std::string SdpVideoFormat::ToString() const {
|
||||
rtc::StringBuilder builder;
|
||||
builder << "Codec name: " << name << ", parameters: {";
|
||||
for (const auto& kv : parameters)
|
||||
for (const auto& kv : parameters) {
|
||||
builder << " " << kv.first << "=" << kv.second;
|
||||
}
|
||||
|
||||
builder << " }";
|
||||
if (!scalability_modes.empty()) {
|
||||
builder << ", scalability_modes: [";
|
||||
bool first = true;
|
||||
for (const auto scalability_mode : scalability_modes) {
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
builder << ", ";
|
||||
}
|
||||
builder << ScalabilityModeToString(scalability_mode);
|
||||
}
|
||||
builder << "]";
|
||||
}
|
||||
|
||||
return builder.str();
|
||||
}
|
||||
@ -105,7 +129,8 @@ bool SdpVideoFormat::IsCodecInList(
|
||||
}
|
||||
|
||||
bool operator==(const SdpVideoFormat& a, const SdpVideoFormat& b) {
|
||||
return a.name == b.name && a.parameters == b.parameters;
|
||||
return a.name == b.name && a.parameters == b.parameters &&
|
||||
a.scalability_modes == b.scalability_modes;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user