diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/libwebrtc/rtc_base/network | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/rtc_base/network')
-rw-r--r-- | third_party/libwebrtc/rtc_base/network/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libwebrtc/rtc_base/network/received_packet.cc | 6 | ||||
-rw-r--r-- | third_party/libwebrtc/rtc_base/network/received_packet.h | 9 |
3 files changed, 12 insertions, 4 deletions
diff --git a/third_party/libwebrtc/rtc_base/network/BUILD.gn b/third_party/libwebrtc/rtc_base/network/BUILD.gn index 7e9cf7ab68..2be484e1e0 100644 --- a/third_party/libwebrtc/rtc_base/network/BUILD.gn +++ b/third_party/libwebrtc/rtc_base/network/BUILD.gn @@ -18,6 +18,7 @@ rtc_library("sent_packet") { } rtc_library("received_packet") { + visibility = [ "*" ] sources = [ "received_packet.cc", "received_packet.h", diff --git a/third_party/libwebrtc/rtc_base/network/received_packet.cc b/third_party/libwebrtc/rtc_base/network/received_packet.cc index 40d6e1142c..95f5e22d3b 100644 --- a/third_party/libwebrtc/rtc_base/network/received_packet.cc +++ b/third_party/libwebrtc/rtc_base/network/received_packet.cc @@ -25,14 +25,12 @@ ReceivedPacket::ReceivedPacket(rtc::ArrayView<const uint8_t> payload, // static ReceivedPacket ReceivedPacket::CreateFromLegacy( - const char* data, + const uint8_t* data, size_t size, int64_t packet_time_us, const rtc::SocketAddress& source_address) { RTC_DCHECK(packet_time_us == -1 || packet_time_us >= 0); - return ReceivedPacket(rtc::reinterpret_array_view<const uint8_t>( - rtc::MakeArrayView(data, size)), - source_address, + return ReceivedPacket(rtc::MakeArrayView(data, size), source_address, (packet_time_us >= 0) ? absl::optional<webrtc::Timestamp>( webrtc::Timestamp::Micros(packet_time_us)) diff --git a/third_party/libwebrtc/rtc_base/network/received_packet.h b/third_party/libwebrtc/rtc_base/network/received_packet.h index e33361ca29..d898ccb2e9 100644 --- a/third_party/libwebrtc/rtc_base/network/received_packet.h +++ b/third_party/libwebrtc/rtc_base/network/received_packet.h @@ -47,6 +47,15 @@ class RTC_EXPORT ReceivedPacket { const char* data, size_t size, int64_t packet_time_us, + const rtc::SocketAddress& addr = rtc::SocketAddress()) { + return CreateFromLegacy(reinterpret_cast<const uint8_t*>(data), size, + packet_time_us, addr); + } + + static ReceivedPacket CreateFromLegacy( + const uint8_t* data, + size_t size, + int64_t packet_time_us, const rtc::SocketAddress& = rtc::SocketAddress()); private: |