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:
parent
9b81d2c954
commit
5b9d4adfc8
@ -558,6 +558,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") {
|
rtc_source_set("stats_observer_interface") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
testonly = true
|
testonly = true
|
||||||
|
|||||||
39
api/rtp_packet_sender.h
Normal file
39
api/rtp_packet_sender.h
Normal 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_
|
||||||
@ -21,7 +21,8 @@ rtc_library("rtp_rtcp_format") {
|
|||||||
"include/rtcp_statistics.h",
|
"include/rtcp_statistics.h",
|
||||||
"include/rtp_cvo.h",
|
"include/rtp_cvo.h",
|
||||||
"include/rtp_header_extension_map.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",
|
"include/rtp_rtcp_defines.h",
|
||||||
"source/byte_io.h",
|
"source/byte_io.h",
|
||||||
"source/rtcp_packet.h",
|
"source/rtcp_packet.h",
|
||||||
@ -114,6 +115,7 @@ rtc_library("rtp_rtcp_format") {
|
|||||||
"../../api:function_view",
|
"../../api:function_view",
|
||||||
"../../api:refcountedbase",
|
"../../api:refcountedbase",
|
||||||
"../../api:rtp_headers",
|
"../../api:rtp_headers",
|
||||||
|
"../../api:rtp_packet_sender", # For compatibility with downstream projects
|
||||||
"../../api:rtp_parameters",
|
"../../api:rtp_parameters",
|
||||||
"../../api:scoped_refptr",
|
"../../api:scoped_refptr",
|
||||||
"../../api/audio_codecs:audio_codecs_api",
|
"../../api/audio_codecs:audio_codecs_api",
|
||||||
@ -281,6 +283,7 @@ rtc_library("rtp_rtcp") {
|
|||||||
"../../api:function_view",
|
"../../api:function_view",
|
||||||
"../../api:rtp_headers",
|
"../../api:rtp_headers",
|
||||||
"../../api:rtp_packet_info",
|
"../../api:rtp_packet_info",
|
||||||
|
"../../api:rtp_packet_sender",
|
||||||
"../../api:rtp_parameters",
|
"../../api:rtp_parameters",
|
||||||
"../../api:scoped_refptr",
|
"../../api:scoped_refptr",
|
||||||
"../../api:sequence_checker",
|
"../../api:sequence_checker",
|
||||||
@ -671,6 +674,7 @@ if (rtc_include_tests) {
|
|||||||
"../../api:mock_transformable_video_frame",
|
"../../api:mock_transformable_video_frame",
|
||||||
"../../api:rtp_headers",
|
"../../api:rtp_headers",
|
||||||
"../../api:rtp_packet_info",
|
"../../api:rtp_packet_info",
|
||||||
|
"../../api:rtp_packet_sender",
|
||||||
"../../api:rtp_parameters",
|
"../../api:rtp_parameters",
|
||||||
"../../api:scoped_refptr",
|
"../../api:scoped_refptr",
|
||||||
"../../api:time_controller",
|
"../../api:time_controller",
|
||||||
|
|||||||
@ -17,24 +17,7 @@
|
|||||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
|
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
|
||||||
|
|
||||||
namespace webrtc {
|
// Kept for compatibility with the newer location of the header
|
||||||
|
#include "api/rtp_packet_sender.h"
|
||||||
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 // MODULES_RTP_RTCP_INCLUDE_RTP_PACKET_SENDER_H_
|
#endif // MODULES_RTP_RTCP_INCLUDE_RTP_PACKET_SENDER_H_
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
#include "api/rtc_event_log/rtc_event.h"
|
#include "api/rtc_event_log/rtc_event.h"
|
||||||
|
#include "api/rtp_packet_sender.h"
|
||||||
#include "api/units/frequency.h"
|
#include "api/units/frequency.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "api/units/timestamp.h"
|
#include "api/units/timestamp.h"
|
||||||
@ -23,7 +24,6 @@
|
|||||||
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
|
#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_cvo.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_header_extension_map.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/include/rtp_rtcp_defines.h"
|
||||||
#include "modules/rtp_rtcp/source/packet_sequencer.h"
|
#include "modules/rtp_rtcp/source/packet_sequencer.h"
|
||||||
#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
|
#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.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 "modules/rtp_rtcp/source/rtp_util.h"
|
||||||
#include "pc/media_session.h"
|
#include "pc/media_session.h"
|
||||||
#include "pc/test/mock_peer_connection_observers.h"
|
#include "pc/test/mock_peer_connection_observers.h"
|
||||||
|
|||||||
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
#include "media/base/stream_params.h"
|
#include "media/base/stream_params.h"
|
||||||
#include "modules/rtp_rtcp/source/byte_io.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 "modules/rtp_rtcp/source/rtp_util.h"
|
||||||
#include "pc/media_session.h"
|
|
||||||
#include "pc/session_description.h"
|
#include "pc/session_description.h"
|
||||||
#include "test/field_trial.h"
|
|
||||||
#include "test/gmock.h"
|
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
#include "test/peer_scenario/peer_scenario.h"
|
#include "test/peer_scenario/peer_scenario.h"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user