Add TrySendPacket() method to RTP modules.
This method will be called when PacedSender is using the new code path that directly owns the packets to be sent. It can be seen as combining a few features of the old code path: * It checks if this is the correct RTP module and then sends, without the need for PacketRouter to poll multiple methods for SSRC etc first. * It partly corresponds to TimeToSendPacket(), but RTX encapsulation now happens pre-pacer and FEC does not need to have a packet history, so most of that method is not used. * It implements most of PrepareAndSendPacket(), such as updating header extensions, reporting stats and of course forwards to Transport. It now also handles the history a bit differently, since media packets will only be stored for potential retransmission post-pacer. Bug: webrtc:10633 Change-Id: Ie97952eeef6e56e462e115d67f7c7929f36c1817 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142165 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28298}
This commit is contained in:
@ -268,6 +268,12 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface {
|
||||
bool retransmission,
|
||||
const PacedPacketInfo& pacing_info) = 0;
|
||||
|
||||
// Try to send the provided packet. Returns true iff packet matches any of
|
||||
// the SSRCs for this module (media/rtx/fec etc) and was forwarded to the
|
||||
// transport.
|
||||
virtual bool TrySendPacket(RtpPacketToSend* packet,
|
||||
const PacedPacketInfo& pacing_info) = 0;
|
||||
|
||||
virtual size_t TimeToSendPadding(size_t bytes,
|
||||
const PacedPacketInfo& pacing_info) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user