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

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

Issue 2357583002: Remove unnecessary interface TelephoneEventHandler (Closed)
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | no next file » | 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 rtp_header_parser_(RtpHeaderParser::Create()), 802 rtp_header_parser_(RtpHeaderParser::Create()),
803 rtp_payload_registry_( 803 rtp_payload_registry_(
804 new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))), 804 new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))),
805 rtp_receive_statistics_( 805 rtp_receive_statistics_(
806 ReceiveStatistics::Create(Clock::GetRealTimeClock())), 806 ReceiveStatistics::Create(Clock::GetRealTimeClock())),
807 rtp_receiver_( 807 rtp_receiver_(
808 RtpReceiver::CreateAudioReceiver(Clock::GetRealTimeClock(), 808 RtpReceiver::CreateAudioReceiver(Clock::GetRealTimeClock(),
809 this, 809 this,
810 this, 810 this,
811 rtp_payload_registry_.get())), 811 rtp_payload_registry_.get())),
812 telephone_event_handler_(rtp_receiver_->GetTelephoneEventHandler()),
813 _outputAudioLevel(), 812 _outputAudioLevel(),
814 _externalTransport(false), 813 _externalTransport(false),
815 // Avoid conflict with other channels by adding 1024 - 1026, 814 // Avoid conflict with other channels by adding 1024 - 1026,
816 // won't use as much as 1024 channels. 815 // won't use as much as 1024 channels.
817 _inputFilePlayerId(VoEModuleId(instanceId, channelId) + 1024), 816 _inputFilePlayerId(VoEModuleId(instanceId, channelId) + 1024),
818 _outputFilePlayerId(VoEModuleId(instanceId, channelId) + 1025), 817 _outputFilePlayerId(VoEModuleId(instanceId, channelId) + 1025),
819 _outputFileRecorderId(VoEModuleId(instanceId, channelId) + 1026), 818 _outputFileRecorderId(VoEModuleId(instanceId, channelId) + 1026),
820 _outputFileRecording(false), 819 _outputFileRecording(false),
821 _outputExternalMedia(false), 820 _outputExternalMedia(false),
822 _inputExternalMediaCallbackPtr(NULL), 821 _inputExternalMediaCallbackPtr(NULL),
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 return -1; 971 return -1;
973 } 972 }
974 973
975 // --- RTP/RTCP module initialization 974 // --- RTP/RTCP module initialization
976 975
977 // Ensure that RTCP is enabled by default for the created channel. 976 // Ensure that RTCP is enabled by default for the created channel.
978 // Note that, the module will keep generating RTCP until it is explicitly 977 // Note that, the module will keep generating RTCP until it is explicitly
979 // disabled by the user. 978 // disabled by the user.
980 // After StopListen (when no sockets exists), RTCP packets will no longer 979 // After StopListen (when no sockets exists), RTCP packets will no longer
981 // be transmitted since the Transport object will then be invalid. 980 // be transmitted since the Transport object will then be invalid.
982 telephone_event_handler_->SetTelephoneEventForwardToDecoder(true);
983 // RTCP is enabled by default. 981 // RTCP is enabled by default.
984 _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound); 982 _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound);
985 // --- Register all permanent callbacks 983 // --- Register all permanent callbacks
986 const bool fail = (audio_coding_->RegisterTransportCallback(this) == -1) || 984 const bool fail = (audio_coding_->RegisterTransportCallback(this) == -1) ||
987 (audio_coding_->RegisterVADCallback(this) == -1); 985 (audio_coding_->RegisterVADCallback(this) == -1);
988 986
989 if (fail) { 987 if (fail) {
990 _engineStatisticsPtr->SetLastError( 988 _engineStatisticsPtr->SetLastError(
991 VE_CANNOT_INIT_CHANNEL, kTraceError, 989 VE_CANNOT_INIT_CHANNEL, kTraceError,
992 "Channel::Init() callbacks not registered"); 990 "Channel::Init() callbacks not registered");
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 int64_t min_rtt = 0; 3203 int64_t min_rtt = 0;
3206 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3204 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3207 0) { 3205 0) {
3208 return 0; 3206 return 0;
3209 } 3207 }
3210 return rtt; 3208 return rtt;
3211 } 3209 }
3212 3210
3213 } // namespace voe 3211 } // namespace voe
3214 } // namespace webrtc 3212 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698