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

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

Issue 2272563010: AbsoluteSendTime rtp header extension publish MsTo24Bit conversion (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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_extensions.h ('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_header_extensions.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
index 441c548906b07cc646faa08844dfc0d03f18832b..2d5dbf91b4d242e2b432fc55d390d808f9b821f6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc
@@ -37,18 +37,13 @@ bool AbsoluteSendTime::IsSupportedFor(MediaType type) {
return true;
}
-bool AbsoluteSendTime::Parse(const uint8_t* data, uint32_t* value) {
- *value = ByteReader<uint32_t, 3>::ReadBigEndian(data);
+bool AbsoluteSendTime::Parse(const uint8_t* data, uint32_t* time_24bits) {
+ *time_24bits = ByteReader<uint32_t, 3>::ReadBigEndian(data);
return true;
}
bool AbsoluteSendTime::Write(uint8_t* data, int64_t time_ms) {
- const uint32_t kAbsSendTimeFraction = 18;
- uint32_t time_24_bits =
- static_cast<uint32_t>(((time_ms << kAbsSendTimeFraction) + 500) / 1000) &
- 0x00FFFFFF;
-
- ByteWriter<uint32_t, 3>::WriteBigEndian(data, time_24_bits);
+ ByteWriter<uint32_t, 3>::WriteBigEndian(data, MsTo24Bits(time_ms));
return true;
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698