Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.h

Issue 2007743003: Add sender controlled playout delay limits (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup_rtp_hdr_extensions
Patch Set: Removed audio changes and added locking on playout delay oracle Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.h b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
index f501d27a723c62f745b3120d76e7e338734e1da0..ffce903cb0475d45572cee0a8b173c999280bddc 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
@@ -24,6 +24,7 @@
#include "webrtc/common_types.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/bitrate.h"
+#include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
@@ -180,6 +181,9 @@ class RTPSender : public RTPSenderInterface {
uint8_t BuildVideoRotationExtension(uint8_t* data_buffer) const;
uint8_t BuildTransportSequenceNumberExtension(uint8_t* data_buffer,
uint16_t sequence_number) const;
+ uint8_t BuildPlayoutDelayExtension(uint8_t* data_buffer,
+ uint16_t min_playout_delay_ms,
+ uint16_t max_playout_delay_ms) const;
// Verifies that the specified extension is registered, and that it is
// present in rtp packet. If extension is not registered kNotRegistered is
@@ -229,6 +233,9 @@ class RTPSender : public RTPSenderInterface {
bool ProcessNACKBitRate(uint32_t now);
+ // Feedback to decide when to stop sending playout delay.
+ void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks);
+
// RTX.
void SetRtxStatus(int mode);
int RtxStatus() const;
@@ -381,6 +388,12 @@ class RTPSender : public RTPSenderInterface {
size_t rtp_packet_length,
const RTPHeader& rtp_header) const;
+ void UpdatePlayoutDelayLimits(uint8_t* rtp_packet,
+ size_t rtp_packet_length,
+ const RTPHeader& rtp_header,
+ uint16_t min_playout_delay,
+ uint16_t max_playout_delay) const;
+
bool AllocateTransportSequenceNumber(int* packet_id) const;
void UpdateRtpStats(const uint8_t* buffer,
@@ -459,6 +472,11 @@ class RTPSender : public RTPSenderInterface {
size_t nack_byte_count_[NACK_BYTECOUNT_SIZE];
Bitrate nack_bitrate_;
+ // Tracks the current request for playout delay limits from application
+ // and decides whether the current RTP frame should include the playout
+ // delay extension on header.
+ PlayoutDelayOracle playout_delay_oracle_;
+
RTPPacketHistory packet_history_;
// Statistics

Powered by Google App Engine
This is Rietveld 408576698