From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/stats/rtc_stats_member.cc | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 third_party/libwebrtc/stats/rtc_stats_member.cc (limited to 'third_party/libwebrtc/stats/rtc_stats_member.cc') diff --git a/third_party/libwebrtc/stats/rtc_stats_member.cc b/third_party/libwebrtc/stats/rtc_stats_member.cc new file mode 100644 index 0000000000..3f91988ed0 --- /dev/null +++ b/third_party/libwebrtc/stats/rtc_stats_member.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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. + */ + +#include "api/stats/rtc_stats_member.h" + +namespace webrtc { + +#define WEBRTC_DEFINE_RTCSTATSMEMBER(T, type, is_seq, is_str) \ + template <> \ + RTCStatsMemberInterface::Type RTCStatsMember::StaticType() { \ + return type; \ + } \ + template <> \ + bool RTCStatsMember::is_sequence() const { \ + return is_seq; \ + } \ + template <> \ + bool RTCStatsMember::is_string() const { \ + return is_str; \ + } \ + template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) RTCStatsMember + +WEBRTC_DEFINE_RTCSTATSMEMBER(bool, kBool, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(int32_t, kInt32, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(uint32_t, kUint32, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(int64_t, kInt64, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(uint64_t, kUint64, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(double, kDouble, false, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::string, kString, false, true); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, kSequenceBool, true, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, kSequenceInt32, true, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, + kSequenceUint32, + true, + false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, kSequenceInt64, true, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, + kSequenceUint64, + true, + false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, kSequenceDouble, true, false); +WEBRTC_DEFINE_RTCSTATSMEMBER(std::vector, + kSequenceString, + true, + false); +WEBRTC_DEFINE_RTCSTATSMEMBER(rtc_stats_internal::MapStringUint64, + kMapStringUint64, + false, + false); +WEBRTC_DEFINE_RTCSTATSMEMBER(rtc_stats_internal::MapStringDouble, + kMapStringDouble, + false, + false); + +} // namespace webrtc -- cgit v1.2.3