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

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

Issue 1272343003: Separating voice activity flag from audio level in RtpHeaderExtension. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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_sender_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 0d083bd92a5289f5c4e940c40a0eea096c01190e..a411e1e6b406b94e5306d8bf27254fc57f65ff4b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -312,6 +312,7 @@ bool RtpHeaderParser::Parse(RTPHeader& header,
// May not be present in packet.
header.extension.hasAudioLevel = false;
+ header.extension.voiceActivity = false;
header.extension.audioLevel = 0;
// May not be present in packet.
@@ -430,7 +431,8 @@ void RtpHeaderParser::ParseOneByteExtensionHeader(
// DEBUG_PRINT("RTP_AUDIO_LEVEL_UNIQUE_ID: ID=%u, len=%u, V=%u,
// level=%u", ID, len, V, level);
- header.extension.audioLevel = ptr[0];
+ header.extension.audioLevel = ptr[0] & 0x7f;
+ header.extension.voiceActivity = (ptr[0] & 0x80) != 0;
header.extension.hasAudioLevel = true;
break;
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698