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

Unified Diff: webrtc/modules/video_coding/packet.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: 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/video_coding/packet.cc
diff --git a/webrtc/modules/video_coding/packet.cc b/webrtc/modules/video_coding/packet.cc
index e25de2ed6c6f4fb45361b0642f431b642131a438..92cc6243d00e1fe475049cdb663d32e66e78f915 100644
--- a/webrtc/modules/video_coding/packet.cc
+++ b/webrtc/modules/video_coding/packet.cc
@@ -31,7 +31,7 @@ VCMPacket::VCMPacket()
insertStartCode(false),
width(0),
height(0),
- codecSpecificHeader() {}
+ video_header() {}
VCMPacket::VCMPacket(const uint8_t* ptr,
const size_t size,
@@ -51,8 +51,18 @@ VCMPacket::VCMPacket(const uint8_t* ptr,
insertStartCode(false),
width(rtpHeader.type.Video.width),
height(rtpHeader.type.Video.height),
- codecSpecificHeader(rtpHeader.type.Video) {
+ video_header(rtpHeader.type.Video) {
CopyCodecSpecifics(rtpHeader.type.Video);
+
+ if (markerBit) {
+ video_header.rotation = rtpHeader.type.Video.rotation;
+ }
+ if (isFirstPacket) {
+ video_header.min_playout_delay_ms =
+ rtpHeader.type.Video.min_playout_delay_ms;
+ video_header.max_playout_delay_ms =
+ rtpHeader.type.Video.max_playout_delay_ms;
+ }
}
VCMPacket::VCMPacket(const uint8_t* ptr,
@@ -67,7 +77,6 @@ VCMPacket::VCMPacket(const uint8_t* ptr,
dataPtr(ptr),
sizeBytes(size),
markerBit(mBit),
-
frameType(kVideoFrameDelta),
codec(kVideoCodecUnknown),
isFirstPacket(false),
@@ -75,7 +84,7 @@ VCMPacket::VCMPacket(const uint8_t* ptr,
insertStartCode(false),
width(0),
height(0),
- codecSpecificHeader() {}
+ video_header() {}
void VCMPacket::Reset() {
payloadType = 0;
@@ -92,13 +101,10 @@ void VCMPacket::Reset() {
insertStartCode = false;
width = 0;
height = 0;
- memset(&codecSpecificHeader, 0, sizeof(RTPVideoHeader));
+ memset(&video_header, 0, sizeof(RTPVideoHeader));
}
void VCMPacket::CopyCodecSpecifics(const RTPVideoHeader& videoHeader) {
- if (markerBit) {
- codecSpecificHeader.rotation = videoHeader.rotation;
- }
switch (videoHeader.codec) {
case kRtpVideoVp8:
// Handle all packets within a frame as depending on the previous packet

Powered by Google App Engine
This is Rietveld 408576698