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

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

Issue 2217383002: Use RtpPacketToSend in RtpSenderVideo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase 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
Index: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
index 116aaa6b931eaf86c4ef25ee6a39323ab5233299..4eb690e998fb8dcc0cf58f0751bfd93fa6901d43 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
@@ -23,8 +23,12 @@ class AbsoluteSendTime {
static constexpr uint8_t kValueSizeBytes = 3;
static const char* kName;
static bool IsSupportedFor(MediaType type);
- static bool Parse(const uint8_t* data, uint32_t* time_ms);
+ static bool Parse(const uint8_t* data, uint32_t* raw_value);
static bool Write(uint8_t* data, int64_t time_ms);
+
+ static constexpr uint32_t MsTo24Bits(int64_t time_ms) {
+ return static_cast<uint32_t>(((time_ms << 18) + 500) / 1000) & 0x00FFFFFF;
+ }
};
class AudioLevel {

Powered by Google App Engine
This is Rietveld 408576698