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

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

Issue 2455013003: Clean up abs-send-time for audio. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/test/mock_voe_channel_proxy.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 unsigned char id) { 2354 unsigned char id) {
2355 rtp_header_parser_->DeregisterRtpHeaderExtension(kRtpExtensionAudioLevel); 2355 rtp_header_parser_->DeregisterRtpHeaderExtension(kRtpExtensionAudioLevel);
2356 if (enable && 2356 if (enable &&
2357 !rtp_header_parser_->RegisterRtpHeaderExtension(kRtpExtensionAudioLevel, 2357 !rtp_header_parser_->RegisterRtpHeaderExtension(kRtpExtensionAudioLevel,
2358 id)) { 2358 id)) {
2359 return -1; 2359 return -1;
2360 } 2360 }
2361 return 0; 2361 return 0;
2362 } 2362 }
2363 2363
2364 int Channel::SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id) {
2365 return SetSendRtpHeaderExtension(enable, kRtpExtensionAbsoluteSendTime, id);
2366 }
2367
2368 int Channel::SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id) {
2369 rtp_header_parser_->DeregisterRtpHeaderExtension(
2370 kRtpExtensionAbsoluteSendTime);
2371 if (enable &&
2372 !rtp_header_parser_->RegisterRtpHeaderExtension(
2373 kRtpExtensionAbsoluteSendTime, id)) {
2374 return -1;
2375 }
2376 return 0;
2377 }
2378
2379 void Channel::EnableSendTransportSequenceNumber(int id) { 2364 void Channel::EnableSendTransportSequenceNumber(int id) {
2380 int ret = 2365 int ret =
2381 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id); 2366 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id);
2382 RTC_DCHECK_EQ(0, ret); 2367 RTC_DCHECK_EQ(0, ret);
2383 } 2368 }
2384 2369
2385 void Channel::EnableReceiveTransportSequenceNumber(int id) { 2370 void Channel::EnableReceiveTransportSequenceNumber(int id) {
2386 rtp_header_parser_->DeregisterRtpHeaderExtension( 2371 rtp_header_parser_->DeregisterRtpHeaderExtension(
2387 kRtpExtensionTransportSequenceNumber); 2372 kRtpExtensionTransportSequenceNumber);
2388 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( 2373 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension(
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3243 int64_t min_rtt = 0; 3228 int64_t min_rtt = 0;
3244 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3229 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3245 0) { 3230 0) {
3246 return 0; 3231 return 0;
3247 } 3232 }
3248 return rtt; 3233 return rtt;
3249 } 3234 }
3250 3235
3251 } // namespace voe 3236 } // namespace voe
3252 } // namespace webrtc 3237 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/mock_voe_channel_proxy.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698