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

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

Issue 2642783006: Move implmentation specific constants out of rtp_header_extension.h (Closed)
Patch Set: . Created 3 years, 11 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_extension_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
index 098fdc88f0f62fc043b5f497830b954ebd5e215e..def431f1709499993bac608a993aa0c49e33bc1b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -15,6 +15,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
+#include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h"
namespace webrtc {
@@ -281,6 +282,7 @@ bool RtpHeaderParser::Parse(RTPHeader* header,
if (static_cast<size_t>(remain) < (4 + XLen)) {
return false;
}
+ static constexpr uint16_t kRtpOneByteHeaderExtensionId = 0xBEDE;
if (definedByProfile == kRtpOneByteHeaderExtensionId) {
const uint8_t* ptrRTPDataExtensionEnd = ptr + XLen;
ParseOneByteExtensionHeader(header,
@@ -439,9 +441,9 @@ void RtpHeaderParser::ParseOneByteExtensionHeader(
int min_playout_delay = (ptr[0] << 4) | ((ptr[1] >> 4) & 0xf);
int max_playout_delay = ((ptr[1] & 0xf) << 8) | ptr[2];
header->extension.playout_delay.min_ms =
- min_playout_delay * kPlayoutDelayGranularityMs;
+ min_playout_delay * PlayoutDelayLimits::kGranularityMs;
header->extension.playout_delay.max_ms =
- max_playout_delay * kPlayoutDelayGranularityMs;
+ max_playout_delay * PlayoutDelayLimits::kGranularityMs;
break;
}
case kRtpExtensionNone:
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_extension_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698