Bug 1918268 - Vendor libwebrtc from 5b9d4adfc8

Upstream commit: https://webrtc.googlesource.com/src/+/5b9d4adfc88b7df0aea6f2f4d4b884d2eabcd657
    Move rtp_packet_sender.h to api/

    Old copy of the header and some previous usage is kept around
    for compatibility with downstream projects for now.

    Bug: chromium:345101934
    Change-Id: Icbe42fb8450d3a4115799438d209da4eda127bab
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357441
    Commit-Queue: Florent Castelli <orphis@webrtc.org>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#42681}
This commit is contained in:
Michael Froman 2024-09-17 10:44:04 -05:00
parent fef6dcb030
commit e12099c04d
10 changed files with 66 additions and 31 deletions

View File

@ -31827,3 +31827,6 @@ d74d085dc5
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
9b81d2c954
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
5b9d4adfc8

View File

@ -21242,3 +21242,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-09-17T15:26:30.625586.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-09-17T15:42:29.369232.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-09-17T15:43:54.124853.

View File

@ -587,6 +587,11 @@ rtc_source_set("audio_quality_analyzer_api") {
]
}
rtc_library("rtp_packet_sender") {
visibility = [ "*" ]
sources = [ "rtp_packet_sender.h" ]
}
rtc_source_set("stats_observer_interface") {
visibility = [ "*" ]
testonly = true

View File

@ -0,0 +1,39 @@
/*
* Copyright (c) 2019 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.
*/
#ifndef API_RTP_PACKET_SENDER_H_
#define API_RTP_PACKET_SENDER_H_
#include <memory>
#include <vector>
namespace webrtc {
class RtpPacketToSend;
class RtpPacketSender {
public:
virtual ~RtpPacketSender() = default;
// Insert a set of packets into queue, for eventual transmission. Based on the
// type of packets, they will be prioritized and scheduled relative to other
// packets and the current target send rate.
virtual void EnqueuePackets(
std::vector<std::unique_ptr<RtpPacketToSend>> packets) = 0;
// Clear any pending packets with the given SSRC from the queue.
// TODO(crbug.com/1395081): Make pure virtual when downstream code has been
// updated.
virtual void RemovePacketsForSsrc(uint32_t ssrc) {}
};
} // namespace webrtc
#endif // API_RTP_PACKET_SENDER_H_

View File

@ -21,7 +21,8 @@ rtc_library("rtp_rtcp_format") {
"include/rtcp_statistics.h",
"include/rtp_cvo.h",
"include/rtp_header_extension_map.h",
"include/rtp_packet_sender.h",
"include/rtp_packet_sender.h", # Kept for compatibility with downstream
# projects
"include/rtp_rtcp_defines.h",
"source/byte_io.h",
"source/rtcp_packet.h",
@ -114,6 +115,7 @@ rtc_library("rtp_rtcp_format") {
"../../api:function_view",
"../../api:refcountedbase",
"../../api:rtp_headers",
"../../api:rtp_packet_sender", # For compatibility with downstream projects
"../../api:rtp_parameters",
"../../api:scoped_refptr",
"../../api/audio_codecs:audio_codecs_api",
@ -281,6 +283,7 @@ rtc_library("rtp_rtcp") {
"../../api:function_view",
"../../api:rtp_headers",
"../../api:rtp_packet_info",
"../../api:rtp_packet_sender",
"../../api:rtp_parameters",
"../../api:scoped_refptr",
"../../api:sequence_checker",
@ -671,6 +674,7 @@ if (rtc_include_tests) {
"../../api:mock_transformable_video_frame",
"../../api:rtp_headers",
"../../api:rtp_packet_info",
"../../api:rtp_packet_sender",
"../../api:rtp_parameters",
"../../api:scoped_refptr",
"../../api:time_controller",

View File

@ -17,24 +17,7 @@
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
namespace webrtc {
class RtpPacketSender {
public:
virtual ~RtpPacketSender() = default;
// Insert a set of packets into queue, for eventual transmission. Based on the
// type of packets, they will be prioritized and scheduled relative to other
// packets and the current target send rate.
virtual void EnqueuePackets(
std::vector<std::unique_ptr<RtpPacketToSend>> packets) = 0;
// Clear any pending packets with the given SSRC from the queue.
// TODO(crbug.com/1395081): Make pure virtual when downstream code has been
// updated.
virtual void RemovePacketsForSsrc(uint32_t ssrc) {}
};
} // namespace webrtc
// Kept for compatibility with the newer location of the header
#include "api/rtp_packet_sender.h"
#endif // MODULES_RTP_RTCP_INCLUDE_RTP_PACKET_SENDER_H_

View File

@ -15,6 +15,7 @@
#include "absl/strings/string_view.h"
#include "api/rtc_event_log/rtc_event.h"
#include "api/rtp_packet_sender.h"
#include "api/units/frequency.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
@ -23,7 +24,6 @@
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
#include "modules/rtp_rtcp/include/rtp_cvo.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/packet_sequencer.h"
#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"

View File

@ -206,7 +206,7 @@ index 3c78142a25..dbc03c9f8b 100644
} else {
deps += [
diff --git a/api/BUILD.gn b/api/BUILD.gn
index e537068ab5..2710b2476e 100644
index 074c5a398a..d4b3cd64e8 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -44,6 +44,9 @@ rtc_source_set("enable_media") {
@ -298,7 +298,7 @@ index e537068ab5..2710b2476e 100644
rtc_source_set("frame_transformer_interface") {
visibility = [ "*" ]
@@ -580,6 +609,7 @@ rtc_source_set("peer_network_dependencies") {
@@ -585,6 +614,7 @@ rtc_source_set("peer_network_dependencies") {
}
rtc_source_set("peer_connection_quality_test_fixture_api") {
@ -306,7 +306,7 @@ index e537068ab5..2710b2476e 100644
visibility = [ "*" ]
testonly = true
sources = [ "test/peerconnection_quality_test_fixture.h" ]
@@ -626,6 +656,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") {
@@ -631,6 +661,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") {
"//third_party/abseil-cpp/absl/types:optional",
]
}
@ -314,7 +314,7 @@ index e537068ab5..2710b2476e 100644
rtc_source_set("frame_generator_api") {
visibility = [ "*" ]
@@ -749,6 +780,7 @@ rtc_library("create_frame_generator") {
@@ -754,6 +785,7 @@ rtc_library("create_frame_generator") {
]
}
@ -322,7 +322,7 @@ index e537068ab5..2710b2476e 100644
rtc_library("create_peer_connection_quality_test_frame_generator") {
visibility = [ "*" ]
testonly = true
@@ -765,6 +797,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") {
@@ -770,6 +802,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") {
"//third_party/abseil-cpp/absl/types:optional",
]
}
@ -330,7 +330,7 @@ index e537068ab5..2710b2476e 100644
rtc_source_set("libjingle_logging_api") {
visibility = [ "*" ]
@@ -945,6 +978,7 @@ rtc_source_set("refcountedbase") {
@@ -950,6 +983,7 @@ rtc_source_set("refcountedbase") {
]
}
@ -338,7 +338,7 @@ index e537068ab5..2710b2476e 100644
rtc_library("ice_transport_factory") {
visibility = [ "*" ]
sources = [
@@ -970,6 +1004,7 @@ rtc_library("ice_transport_factory") {
@@ -975,6 +1009,7 @@ rtc_library("ice_transport_factory") {
"rtc_event_log:rtc_event_log",
]
}

View File

@ -16,6 +16,7 @@
#include "api/units/time_delta.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_util.h"
#include "pc/media_session.h"
#include "pc/test/mock_peer_connection_observers.h"

View File

@ -10,11 +10,9 @@
#include "media/base/stream_params.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_util.h"
#include "pc/media_session.h"
#include "pc/session_description.h"
#include "test/field_trial.h"
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/peer_scenario/peer_scenario.h"