/* * Copyright 2016 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.
*/
rtc::scoped_refptr<RTCStatsReport> RTCStatsReport::Copy() const {
rtc::scoped_refptr<RTCStatsReport> copy = Create(timestamp_); for (auto it = stats_.begin(); it != stats_.end(); ++it) {
copy->AddStats(it->second->copy());
} return copy;
}
void RTCStatsReport::AddStats(std::unique_ptr<const RTCStats> stats) { #if RTC_DCHECK_IS_ON auto result = #endif
stats_.insert(std::make_pair(std::string(stats->id()), std::move(stats))); #if RTC_DCHECK_IS_ON
RTC_DCHECK(result.second)
<< "A stats object with ID \"" << result.first->second->id() << "\" is "
<< "already present in this stats report."; #endif
}
const RTCStats* RTCStatsReport::Get(const std::string& id) const {
StatsMap::const_iterator it = stats_.find(id); if (it != stats_.cend()) return it->second.get(); return nullptr;
}
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.