OLD | NEW |
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 Loading... |
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()), |
812 _outputAudioLevel(), | 813 _outputAudioLevel(), |
813 _externalTransport(false), | 814 _externalTransport(false), |
814 // Avoid conflict with other channels by adding 1024 - 1026, | 815 // Avoid conflict with other channels by adding 1024 - 1026, |
815 // won't use as much as 1024 channels. | 816 // won't use as much as 1024 channels. |
816 _inputFilePlayerId(VoEModuleId(instanceId, channelId) + 1024), | 817 _inputFilePlayerId(VoEModuleId(instanceId, channelId) + 1024), |
817 _outputFilePlayerId(VoEModuleId(instanceId, channelId) + 1025), | 818 _outputFilePlayerId(VoEModuleId(instanceId, channelId) + 1025), |
818 _outputFileRecorderId(VoEModuleId(instanceId, channelId) + 1026), | 819 _outputFileRecorderId(VoEModuleId(instanceId, channelId) + 1026), |
819 _outputFileRecording(false), | 820 _outputFileRecording(false), |
820 _outputExternalMedia(false), | 821 _outputExternalMedia(false), |
821 _inputExternalMediaCallbackPtr(NULL), | 822 _inputExternalMediaCallbackPtr(NULL), |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 return -1; | 972 return -1; |
972 } | 973 } |
973 | 974 |
974 // --- RTP/RTCP module initialization | 975 // --- RTP/RTCP module initialization |
975 | 976 |
976 // Ensure that RTCP is enabled by default for the created channel. | 977 // Ensure that RTCP is enabled by default for the created channel. |
977 // Note that, the module will keep generating RTCP until it is explicitly | 978 // Note that, the module will keep generating RTCP until it is explicitly |
978 // disabled by the user. | 979 // disabled by the user. |
979 // After StopListen (when no sockets exists), RTCP packets will no longer | 980 // After StopListen (when no sockets exists), RTCP packets will no longer |
980 // be transmitted since the Transport object will then be invalid. | 981 // be transmitted since the Transport object will then be invalid. |
| 982 telephone_event_handler_->SetTelephoneEventForwardToDecoder(true); |
981 // RTCP is enabled by default. | 983 // RTCP is enabled by default. |
982 _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound); | 984 _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound); |
983 // --- Register all permanent callbacks | 985 // --- Register all permanent callbacks |
984 const bool fail = (audio_coding_->RegisterTransportCallback(this) == -1) || | 986 const bool fail = (audio_coding_->RegisterTransportCallback(this) == -1) || |
985 (audio_coding_->RegisterVADCallback(this) == -1); | 987 (audio_coding_->RegisterVADCallback(this) == -1); |
986 | 988 |
987 if (fail) { | 989 if (fail) { |
988 _engineStatisticsPtr->SetLastError( | 990 _engineStatisticsPtr->SetLastError( |
989 VE_CANNOT_INIT_CHANNEL, kTraceError, | 991 VE_CANNOT_INIT_CHANNEL, kTraceError, |
990 "Channel::Init() callbacks not registered"); | 992 "Channel::Init() callbacks not registered"); |
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3203 int64_t min_rtt = 0; | 3205 int64_t min_rtt = 0; |
3204 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3206 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3205 0) { | 3207 0) { |
3206 return 0; | 3208 return 0; |
3207 } | 3209 } |
3208 return rtt; | 3210 return rtt; |
3209 } | 3211 } |
3210 | 3212 |
3211 } // namespace voe | 3213 } // namespace voe |
3212 } // namespace webrtc | 3214 } // namespace webrtc |
OLD | NEW |