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

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: Addressed comments 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..c8c36fd2ee031f611545365b2715a894c5c06a95 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
@@ -220,6 +224,7 @@ class RTPSender : public RTPSenderInterface {
int SetSelectiveRetransmissions(uint8_t settings);
void OnReceivedNACK(const std::list<uint16_t>& nack_sequence_numbers,
int64_t avg_rtt);
+ void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks);
danilchap 2016/05/25 19:08:48 probably better move this declaration out of group
Irfan 2016/05/26 05:51:47 done. the original grouping here was for rtcp feed
void SetStorePacketsStatus(bool enable, uint16_t number_to_store);
@@ -381,6 +386,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 +470,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_;
danilchap 2016/05/25 19:08:49 GUARDED_BY(send_critsect_) ? (since it could be ac
Irfan 2016/05/26 05:51:47 I moved the protection into the class - keeps it e
+
RTPPacketHistory packet_history_;
// Statistics

Powered by Google App Engine
This is Rietveld 408576698