/* * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
bool FeedbackParams::HasDuplicateEntries() const { for (std::vector<FeedbackParam>::const_iterator iter = params_.begin();
iter != params_.end(); ++iter) { for (std::vector<FeedbackParam>::const_iterator found = iter + 1;
found != params_.end(); ++found) { if (*found == *iter) { returntrue;
}
}
} returnfalse;
}
Codec::Codec(Type type, int id, const std::string& name, int clockrate)
: Codec(type, id, name, clockrate, 0) {}
Codec::Codec(Type type, int id, const std::string& name, int clockrate,
size_t channels)
: type(type),
id(id),
name(name),
clockrate(clockrate),
bitrate(0),
channels(channels) {}
// If a decoder supports any H264 profile, it is implicitly assumed to also // support constrained base line even though it's not explicitly listed. void AddH264ConstrainedBaselineProfileToSupportedFormats(
std::vector<webrtc::SdpVideoFormat>* supported_formats) {
std::vector<webrtc::SdpVideoFormat> cbr_supported_formats;
// For any H264 supported profile, add the corresponding constrained baseline // profile. for (auto it = supported_formats->cbegin(); it != supported_formats->cend();
++it) { if (it->name == cricket::kH264CodecName) { const std::optional<webrtc::H264ProfileLevelId> profile_level_id =
webrtc::ParseSdpForH264ProfileLevelId(it->parameters); if (profile_level_id &&
profile_level_id->profile !=
webrtc::H264Profile::kProfileConstrainedBaseline) {
webrtc::SdpVideoFormat cbp_format = *it;
webrtc::H264ProfileLevelId cbp_profile = *profile_level_id;
cbp_profile.profile = webrtc::H264Profile::kProfileConstrainedBaseline;
cbp_format.parameters[cricket::kH264FmtpProfileLevelId] =
*webrtc::H264ProfileLevelIdToString(cbp_profile);
cbr_supported_formats.push_back(cbp_format);
}
}
}
size_t original_size = supported_formats->size(); // ...if it's not already in the list.
std::copy_if(cbr_supported_formats.begin(), cbr_supported_formats.end(),
std::back_inserter(*supported_formats),
[supported_formats](const webrtc::SdpVideoFormat& format) { return !format.IsCodecInList(*supported_formats);
});
if (supported_formats->size() > original_size) {
RTC_LOG(LS_WARNING) << "Explicitly added H264 constrained baseline to list " "of supported formats.";
}
}
Codec CreateVideoCodec(int id, const std::string& name) {
Codec c(Codec::Type::kVideo, id, name, kVideoCodecClockrate); if (absl::EqualsIgnoreCase(kH264CodecName, name)) { // This default is set for all H.264 codecs created because // that was the default before packetization mode support was added. // TODO(hta): Move this to the places that create VideoCodecs from // SDP or from knowledge of implementation capabilities.
c.SetParam(kH264FmtpPacketizationMode, "1");
} return c;
}
Codec CreateVideoCodec(const webrtc::SdpVideoFormat& c) { return Codec(c);
}
} // namespace cricket
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.