Help to land 7969005 on behalf of solenberg. The review and try is done in 7969005.

- Add ability to VoE to send Absolute Sender Time header extension.
- Refactor handling of RTP header extensions in VoE to work the same as in ViE.
- Add API to enable receiving Absolute Sender Time in VoE.

This is part of the work to include audio packets in bandwidth estimation, for
better accuracy in estimates.

BUG=
TBR=solenberg@webrtc.org,henrikg@webrtc.org,stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9509004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5654 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org
2014-03-06 23:49:08 +00:00
parent 79047f99c1
commit ebdb0e3ad0
18 changed files with 490 additions and 300 deletions

View File

@ -398,6 +398,10 @@ bool RTPHeaderParser::Parse(RTPHeader& header,
header.extension.hasAbsoluteSendTime = false;
header.extension.absoluteSendTime = 0;
// May not be present in packet.
header.extension.hasAudioLevel = false;
header.extension.audioLevel = 0;
if (X) {
/* RTP header extension, RFC 3550.
0 1 2 3
@ -496,7 +500,11 @@ void RTPHeaderParser::ParseOneByteExtensionHeader(
break;
}
case kRtpExtensionAudioLevel: {
// --- Only used for debugging ---
if (len != 0) {
WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, -1,
"Incorrect audio level len: %d", len);
return;
}
// 0 1 2 3
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@ -509,6 +517,9 @@ void RTPHeaderParser::ParseOneByteExtensionHeader(
// const uint8_t level = (*ptr & 0x7f);
// DEBUG_PRINT("RTP_AUDIO_LEVEL_UNIQUE_ID: ID=%u, len=%u, V=%u,
// level=%u", ID, len, V, level);
header.extension.audioLevel = *ptr++;
header.extension.hasAudioLevel = true;
break;
}
case kRtpExtensionAbsoluteSendTime: {