summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/rtc_base/network
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/rtc_base/network')
-rw-r--r--third_party/libwebrtc/rtc_base/network/BUILD.gn1
-rw-r--r--third_party/libwebrtc/rtc_base/network/received_packet.cc6
-rw-r--r--third_party/libwebrtc/rtc_base/network/received_packet.h9
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: