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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc

Issue 2007743003: Add sender controlled playout delay limits (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup_rtp_hdr_extensions
Patch Set: Add unit tests, fix test issues, address 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_video.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
index 0bf95b7fe4b14f10d60d4cea44504d5a2083ee0e..812dbf1f55398377798991eb7d7cf0047eef5527 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -198,7 +198,7 @@ size_t RTPSenderVideo::FECPacketOverhead() const {
// from an FEC viewpoint, they are part of the payload to be protected.
// (The base RTP header is already protected by the FEC header.)
return ForwardErrorCorrection::PacketOverhead() + REDForFECHeaderLength +
- (_rtpSender.RTPHeaderLength() - kRtpHeaderSize);
+ (_rtpSender.RtpHeaderMaxLength() - kRtpHeaderSize);
}
return 0;
}
@@ -248,7 +248,7 @@ int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
cvo_mode = _rtpSender.ActivateCVORtpHeaderExtension();
}
- uint16_t rtp_header_length = _rtpSender.RTPHeaderLength();
+ int rtp_header_length = _rtpSender.RtpHeaderCurrentLength();
size_t payload_bytes_to_send = payloadSize;
const uint8_t* data = payloadData;
@@ -265,15 +265,19 @@ int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
while (!last) {
uint8_t dataBuffer[IP_PACKET_SIZE] = {0};
size_t payload_bytes_in_packet = 0;
- if (!packetizer->NextPacket(&dataBuffer[rtp_header_length],
- &payload_bytes_in_packet, &last)) {
+
+ // Note that RTP header size is dynamically computed since there may be
+ // an optional RTP header extension.
+ if (!packetizer->NextPacket(
+ &dataBuffer[_rtpSender.RtpHeaderCurrentLength()],
+ &payload_bytes_in_packet, &last)) {
return -1;
}
// Write RTP header.
- // Set marker bit true if this is the last packet in frame.
_rtpSender.BuildRTPheader(
danilchap 2016/06/02 12:12:34 playout_delay_oracle_ is not protected by crit_ Th
Irfan 2016/06/02 18:15:53 Thanks for pointing this out. With the updated cha
dataBuffer, payloadType, last, captureTimeStamp, capture_time_ms);
+
// According to
// http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/
// ts_126114v120700p.pdf Section 7.4.5:

Powered by Google App Engine
This is Rietveld 408576698