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

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 2455013003: Clean up abs-send-time for audio. (Closed)
Patch Set: Fix tests. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2376 unsigned char id) { 2376 unsigned char id) {
2377 rtp_header_parser_->DeregisterRtpHeaderExtension(kRtpExtensionAudioLevel); 2377 rtp_header_parser_->DeregisterRtpHeaderExtension(kRtpExtensionAudioLevel);
2378 if (enable && 2378 if (enable &&
2379 !rtp_header_parser_->RegisterRtpHeaderExtension(kRtpExtensionAudioLevel, 2379 !rtp_header_parser_->RegisterRtpHeaderExtension(kRtpExtensionAudioLevel,
2380 id)) { 2380 id)) {
2381 return -1; 2381 return -1;
2382 } 2382 }
2383 return 0; 2383 return 0;
2384 } 2384 }
2385 2385
2386 int Channel::SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id) {
2387 return SetSendRtpHeaderExtension(enable, kRtpExtensionAbsoluteSendTime, id);
2388 }
2389
2390 int Channel::SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id) {
2391 rtp_header_parser_->DeregisterRtpHeaderExtension(
2392 kRtpExtensionAbsoluteSendTime);
2393 if (enable &&
2394 !rtp_header_parser_->RegisterRtpHeaderExtension(
2395 kRtpExtensionAbsoluteSendTime, id)) {
2396 return -1;
2397 }
2398 return 0;
2399 }
2400
2401 void Channel::EnableSendTransportSequenceNumber(int id) { 2386 void Channel::EnableSendTransportSequenceNumber(int id) {
2402 int ret = 2387 int ret =
2403 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id); 2388 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id);
2404 RTC_DCHECK_EQ(0, ret); 2389 RTC_DCHECK_EQ(0, ret);
2405 } 2390 }
2406 2391
2407 void Channel::EnableReceiveTransportSequenceNumber(int id) { 2392 void Channel::EnableReceiveTransportSequenceNumber(int id) {
2408 rtp_header_parser_->DeregisterRtpHeaderExtension( 2393 rtp_header_parser_->DeregisterRtpHeaderExtension(
2409 kRtpExtensionTransportSequenceNumber); 2394 kRtpExtensionTransportSequenceNumber);
2410 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( 2395 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension(
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 int64_t min_rtt = 0; 3250 int64_t min_rtt = 0;
3266 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3251 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3267 0) { 3252 0) {
3268 return 0; 3253 return 0;
3269 } 3254 }
3270 return rtt; 3255 return rtt;
3271 } 3256 }
3272 3257
3273 } // namespace voe 3258 } // namespace voe
3274 } // namespace webrtc 3259 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698