/* * Copyright 2017 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.
*/
RtpCapabilities ToRtpCapabilities( const std::vector<cricket::Codec>& cricket_codecs, const cricket::RtpHeaderExtensions& cricket_extensions) {
RtpCapabilities capabilities; bool have_red = false; bool have_ulpfec = false; bool have_flexfec = false; bool have_rtx = false; for (const cricket::Codec& cricket_codec : cricket_codecs) { if (cricket_codec.name == cricket::kRedCodecName) {
have_red = true;
} elseif (cricket_codec.name == cricket::kUlpfecCodecName) {
have_ulpfec = true;
} elseif (cricket_codec.name == cricket::kFlexfecCodecName) {
have_flexfec = true;
} elseif (cricket_codec.name == cricket::kRtxCodecName) { if (have_rtx) { // There should only be one RTX codec entry continue;
}
have_rtx = true;
} auto codec_capability = ToRtpCodecCapability(cricket_codec); if (cricket_codec.name == cricket::kRtxCodecName) { // RTX codec should not have any parameter
codec_capability.parameters.clear();
}
capabilities.codecs.push_back(codec_capability);
} for (const RtpExtension& cricket_extension : cricket_extensions) {
capabilities.header_extensions.emplace_back(cricket_extension.uri,
cricket_extension.id);
} if (have_red) {
capabilities.fec.push_back(FecMechanism::RED);
} if (have_red && have_ulpfec) {
capabilities.fec.push_back(FecMechanism::RED_AND_ULPFEC);
} if (have_flexfec) {
capabilities.fec.push_back(FecMechanism::FLEXFEC);
} return capabilities;
}
} // namespace webrtc
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.1Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-05)
¤
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.