diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc index ebb3290bb..fdfe2a72f 100644 --- a/webrtc/voice_engine/channel.cc +++ b/webrtc/voice_engine/channel.cc @@ -282,22 +282,8 @@ Channel::OnIncomingSSRCChanged(int32_t id, uint32_t ssrc) "Channel::OnIncomingSSRCChanged(id=%d, SSRC=%d)", id, ssrc); - int32_t channel = VoEChannelId(id); - assert(channel == _channelId); - // Update ssrc so that NTP for AV sync can be updated. _rtpRtcpModule->SetRemoteSSRC(ssrc); - - if (_rtpObserver) - { - CriticalSectionScoped cs(&_callbackCritSect); - - if (_rtpObserverPtr) - { - // Send new SSRC to registered observer using callback - _rtpObserverPtr->OnIncomingSSRCChanged(channel, ssrc); - } - } } void Channel::OnIncomingCSRCChanged(int32_t id, @@ -307,19 +293,6 @@ void Channel::OnIncomingCSRCChanged(int32_t id, WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), "Channel::OnIncomingCSRCChanged(id=%d, CSRC=%d, added=%d)", id, CSRC, added); - - int32_t channel = VoEChannelId(id); - assert(channel == _channelId); - - if (_rtpObserver) - { - CriticalSectionScoped cs(&_callbackCritSect); - - if (_rtpObserverPtr) - { - _rtpObserverPtr->OnIncomingCSRCChanged(channel, CSRC, added); - } - } } void Channel::ResetStatistics(uint32_t ssrc) { @@ -525,8 +498,6 @@ Channel::OnReceivedPayloadData(const uint8_t* payloadData, rtpHeader->header.payloadType, rtpHeader->type.Audio.channel); - _lastRemoteTimeStamp = rtpHeader->header.timestamp; - if (!channel_state_.Get().playing) { // Avoid inserting into NetEQ when we are not playing. Count the @@ -876,12 +847,10 @@ Channel::Channel(int32_t channelId, _rxVadObserverPtr(NULL), _oldVadDecision(-1), _sendFrameType(0), - _rtpObserverPtr(NULL), _rtcpObserverPtr(NULL), _externalPlayout(false), _externalMixing(false), _mixFileWithMicrophone(false), - _rtpObserver(false), _rtcpObserver(false), _mute(false), _panLeft(1.0f), @@ -890,7 +859,6 @@ Channel::Channel(int32_t channelId, _playOutbandDtmfEvent(false), _playInbandDtmfEvent(false), _lastLocalTimeStamp(0), - _lastRemoteTimeStamp(0), _lastPayloadType(0), _includeAudioLevelIndication(false), _rtpPacketTimedOut(false), @@ -3062,48 +3030,6 @@ Channel::GetRxNsStatus(bool& enabled, NsModes& mode) #endif // #ifdef WEBRTC_VOICE_ENGINE_NR -int -Channel::RegisterRTPObserver(VoERTPObserver& observer) -{ - WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), - "Channel::RegisterRTPObserver()"); - CriticalSectionScoped cs(&_callbackCritSect); - - if (_rtpObserverPtr) - { - _engineStatisticsPtr->SetLastError( - VE_INVALID_OPERATION, kTraceError, - "RegisterRTPObserver() observer already enabled"); - return -1; - } - - _rtpObserverPtr = &observer; - _rtpObserver = true; - - return 0; -} - -int -Channel::DeRegisterRTPObserver() -{ - WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), - "Channel::DeRegisterRTPObserver()"); - CriticalSectionScoped cs(&_callbackCritSect); - - if (!_rtpObserverPtr) - { - _engineStatisticsPtr->SetLastError( - VE_INVALID_OPERATION, kTraceWarning, - "DeRegisterRTPObserver() observer already disabled"); - return 0; - } - - _rtpObserver = false; - _rtpObserverPtr = NULL; - - return 0; -} - int Channel::RegisterRTCPObserver(VoERTCPObserver& observer) { @@ -3188,37 +3114,6 @@ Channel::GetRemoteSSRC(unsigned int& ssrc) return 0; } -int -Channel::GetRemoteCSRCs(unsigned int arrCSRC[15]) -{ - if (arrCSRC == NULL) - { - _engineStatisticsPtr->SetLastError( - VE_INVALID_ARGUMENT, kTraceError, - "GetRemoteCSRCs() invalid array argument"); - return -1; - } - uint32_t arrOfCSRC[kRtpCsrcSize]; - int32_t CSRCs(0); - CSRCs = rtp_receiver_->CSRCs(arrOfCSRC); - if (CSRCs > 0) - { - memcpy(arrCSRC, arrOfCSRC, CSRCs * sizeof(uint32_t)); - for (int i = 0; i < (int) CSRCs; i++) - { - WEBRTC_TRACE(kTraceStateInfo, kTraceVoice, - VoEId(_instanceId, _channelId), - "GetRemoteCSRCs() => arrCSRC[%d]=%lu", i, arrCSRC[i]); - } - } else - { - WEBRTC_TRACE(kTraceStateInfo, kTraceVoice, - VoEId(_instanceId, _channelId), - "GetRemoteCSRCs() => list is empty!"); - } - return CSRCs; -} - int Channel::SetSendAudioLevelIndicationStatus(bool enable, unsigned char id) { _includeAudioLevelIndication = enable; return SetSendRtpHeaderExtension(enable, kRtpExtensionAudioLevel, id); @@ -3518,29 +3413,6 @@ Channel::GetRTPStatistics( return 0; } -int Channel::GetRemoteRTCPSenderInfo(SenderInfo* sender_info) { - if (sender_info == NULL) { - _engineStatisticsPtr->SetLastError(VE_INVALID_ARGUMENT, kTraceError, - "GetRemoteRTCPSenderInfo() invalid sender_info."); - return -1; - } - - // Get the sender info from the latest received RTCP Sender Report. - RTCPSenderInfo rtcp_sender_info; - if (_rtpRtcpModule->RemoteRTCPStat(&rtcp_sender_info) != 0) { - _engineStatisticsPtr->SetLastError(VE_RTP_RTCP_MODULE_ERROR, kTraceError, - "GetRemoteRTCPSenderInfo() failed to read RTCP SR sender info."); - return -1; - } - - sender_info->NTP_timestamp_high = rtcp_sender_info.NTPseconds; - sender_info->NTP_timestamp_low = rtcp_sender_info.NTPfraction; - sender_info->RTP_timestamp = rtcp_sender_info.RTPtimeStamp; - sender_info->sender_packet_count = rtcp_sender_info.sendPacketCount; - sender_info->sender_octet_count = rtcp_sender_info.sendOctetCount; - return 0; -} - int Channel::GetRemoteRTCPReportBlocks( std::vector* report_blocks) { if (report_blocks == NULL) { diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h index e605986d0..18a3dfb17 100644 --- a/webrtc/voice_engine/channel.h +++ b/webrtc/voice_engine/channel.h @@ -311,14 +311,11 @@ public: #endif // VoERTP_RTCP - int RegisterRTPObserver(VoERTPObserver& observer); - int DeRegisterRTPObserver(); int RegisterRTCPObserver(VoERTCPObserver& observer); int DeRegisterRTCPObserver(); int SetLocalSSRC(unsigned int ssrc); int GetLocalSSRC(unsigned int& ssrc); int GetRemoteSSRC(unsigned int& ssrc); - int GetRemoteCSRCs(unsigned int arrCSRC[15]); int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id); int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id); int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id); @@ -338,7 +335,6 @@ public: int GetRTPStatistics(unsigned int& averageJitterMs, unsigned int& maxJitterMs, unsigned int& discardedPackets); - int GetRemoteRTCPSenderInfo(SenderInfo* sender_info); int GetRemoteRTCPReportBlocks(std::vector* report_blocks); int GetRTPStatistics(CallStatistics& stats); int SetFECStatus(bool enable, int redPayloadtype); @@ -347,7 +343,6 @@ public: int StartRTPDump(const char fileNameUTF8[1024], RTPDirections direction); int StopRTPDump(RTPDirections direction); bool RTPDumpIsActive(RTPDirections direction); - uint32_t LastRemoteTimeStamp() { return _lastRemoteTimeStamp; } // Takes ownership of the ViENetwork. void SetVideoEngineBWETarget(ViENetwork* vie_network, int video_channel); @@ -562,13 +557,11 @@ private: VoERxVadCallback* _rxVadObserverPtr; int32_t _oldVadDecision; int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise - VoERTPObserver* _rtpObserverPtr; VoERTCPObserver* _rtcpObserverPtr; // VoEBase bool _externalPlayout; bool _externalMixing; bool _mixFileWithMicrophone; - bool _rtpObserver; bool _rtcpObserver; // VoEVolumeControl bool _mute; @@ -580,7 +573,6 @@ private: bool _playInbandDtmfEvent; // VoeRTP_RTCP uint32_t _lastLocalTimeStamp; - uint32_t _lastRemoteTimeStamp; int8_t _lastPayloadType; bool _includeAudioLevelIndication; // VoENetwork diff --git a/webrtc/voice_engine/include/voe_rtp_rtcp.h b/webrtc/voice_engine/include/voe_rtp_rtcp.h index 448cfc6ad..f3a631311 100644 --- a/webrtc/voice_engine/include/voe_rtp_rtcp.h +++ b/webrtc/voice_engine/include/voe_rtp_rtcp.h @@ -125,24 +125,6 @@ public: // deleted. virtual int Release() = 0; - // Registers an instance of a VoERTPObserver derived class for a specified - // |channel|. It will allow the user to observe callbacks related to the - // RTP protocol such as changes in the incoming SSRC. - virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer) = 0; - - // Deregisters an instance of a VoERTPObserver derived class for a - // specified |channel|. - virtual int DeRegisterRTPObserver(int channel) = 0; - - // Registers an instance of a VoERTCPObserver derived class for a specified - // |channel|. - virtual int RegisterRTCPObserver( - int channel, VoERTCPObserver& observer) = 0; - - // Deregisters an instance of a VoERTCPObserver derived class for a - // specified |channel|. - virtual int DeRegisterRTCPObserver(int channel) = 0; - // Sets the local RTP synchronization source identifier (SSRC) explicitly. virtual int SetLocalSSRC(int channel, unsigned int ssrc) = 0; @@ -176,9 +158,6 @@ public: bool enable, unsigned char id) = 0; - // Gets the CSRCs of the incoming RTP packets. - virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]) = 0; - // Sets the RTCP status on a specific |channel|. virtual int SetRTCPStatus(int channel, bool enable) = 0; @@ -211,11 +190,6 @@ public: // Gets RTCP statistics for a specific |channel|. virtual int GetRTCPStatistics(int channel, CallStatistics& stats) = 0; - // Gets the sender info part of the last received RTCP Sender Report (SR) - // on a specified |channel|. - virtual int GetRemoteRTCPSenderInfo( - int channel, SenderInfo* sender_info) = 0; - // Gets the report block parts of the last received RTCP Sender Report (SR), // or RTCP Receiver Report (RR) on a specified |channel|. Each vector // element also contains the SSRC of the sender in addition to a report @@ -223,11 +197,6 @@ public: virtual int GetRemoteRTCPReportBlocks( int channel, std::vector* receive_blocks) = 0; - // Sends an RTCP APP packet on a specific |channel|. - virtual int SendApplicationDefinedRTCPPacket( - int channel, unsigned char subType, unsigned int name, - const char* data, unsigned short dataLengthInBytes) = 0; - // Sets the Forward Error Correction (FEC) status on a specific |channel|. virtual int SetFECStatus( int channel, bool enable, int redPayloadtype = -1) = 0; @@ -262,15 +231,6 @@ public: virtual int RTPDumpIsActive( int channel, RTPDirections direction = kRtpIncoming) = 0; - // Gets the timestamp of the last RTP packet received by |channel|. - virtual int GetLastRemoteTimeStamp(int channel, - uint32_t* lastRemoteTimeStamp) = 0; - - // Don't use. To be removed. - virtual int InsertExtraRTPPacket( - int channel, unsigned char payloadType, bool markerBit, - const char* payloadData, unsigned short payloadSize) { return -1; }; - // Sets video engine channel to receive incoming audio packets for // aggregated bandwidth estimation. Takes ownership of the ViENetwork // interface. @@ -279,6 +239,26 @@ public: return 0; } + // Will be removed. Don't use. + virtual int RegisterRTPObserver(int channel, + VoERTPObserver& observer) { return -1; }; + virtual int DeRegisterRTPObserver(int channel) { return -1; }; + virtual int RegisterRTCPObserver( + int channel, VoERTCPObserver& observer) { return -1; }; + virtual int DeRegisterRTCPObserver(int channel) { return -1; }; + virtual int GetRemoteCSRCs(int channel, + unsigned int arrCSRC[15]) { return -1; }; + virtual int InsertExtraRTPPacket( + int channel, unsigned char payloadType, bool markerBit, + const char* payloadData, unsigned short payloadSize) { return -1; }; + virtual int GetRemoteRTCPSenderInfo( + int channel, SenderInfo* sender_info) { return -1; }; + virtual int SendApplicationDefinedRTCPPacket( + int channel, unsigned char subType, unsigned int name, + const char* data, unsigned short dataLengthInBytes) { return -1; }; + virtual int GetLastRemoteTimeStamp(int channel, + uint32_t* lastRemoteTimeStamp) { return -1; }; + protected: VoERTP_RTCP() {} virtual ~VoERTP_RTCP() {} diff --git a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_before_streaming_test.cc b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_before_streaming_test.cc index 24ffc90c8..b0d911245 100644 --- a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_before_streaming_test.cc +++ b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_before_streaming_test.cc @@ -48,9 +48,3 @@ TEST_F(RtpRtcpBeforeStreamingTest, GetLocalSsrcObeysSetLocalSsrc) { EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, result)); EXPECT_EQ(1234u, result); } - -TEST_F(RtpRtcpBeforeStreamingTest, GetLastRemoteTimeStamp) { - uint32_t timestamp; - EXPECT_EQ(0, voe_rtp_rtcp_->GetLastRemoteTimeStamp(channel_, ×tamp)); - EXPECT_EQ(0u, timestamp); -} diff --git a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc index 0505dcdbb..9a732c0e2 100644 --- a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc +++ b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc @@ -153,54 +153,6 @@ TEST_F(RtpRtcpTest, DISABLED_ON_LINUX(SSRCPropagatesCorrectly)) { EXPECT_EQ(local_ssrc, ssrc); } -TEST_F(RtpRtcpTest, RtcpApplicationDefinedPacketsCanBeSentAndReceived) { - RtcpAppHandler rtcp_app_handler; - EXPECT_EQ(0, voe_rtp_rtcp_->RegisterRTCPObserver( - channel_, rtcp_app_handler)); - - // Send data aligned to 32 bytes. - const char* data = "application-dependent data------"; - unsigned short data_length = strlen(data); - unsigned int data_name = 0x41424344; // 'ABCD' in ascii - unsigned char data_subtype = 1; - - EXPECT_EQ(0, voe_rtp_rtcp_->SendApplicationDefinedRTCPPacket( - channel_, data_subtype, data_name, data, data_length)); - - // Ensure the RTP-RTCP process gets scheduled. - Sleep(1000); - - // Ensure we received the data in the callback. - ASSERT_EQ(data_length, rtcp_app_handler.length_in_bytes_); - EXPECT_EQ(0, memcmp(data, rtcp_app_handler.data_, data_length)); - EXPECT_EQ(data_name, rtcp_app_handler.name_); - EXPECT_EQ(data_subtype, rtcp_app_handler.sub_type_); - - EXPECT_EQ(0, voe_rtp_rtcp_->DeRegisterRTCPObserver(channel_)); -} - -TEST_F(RtpRtcpTest, DisabledRtcpObserverDoesNotReceiveData) { - RtcpAppHandler rtcp_app_handler; - EXPECT_EQ(0, voe_rtp_rtcp_->RegisterRTCPObserver( - channel_, rtcp_app_handler)); - - // Put observer in a known state before de-registering. - rtcp_app_handler.Reset(); - - EXPECT_EQ(0, voe_rtp_rtcp_->DeRegisterRTCPObserver(channel_)); - - const char* data = "whatever"; - EXPECT_EQ(0, voe_rtp_rtcp_->SendApplicationDefinedRTCPPacket( - channel_, 1, 0x41424344, data, strlen(data))); - - // Ensure the RTP-RTCP process gets scheduled. - Sleep(1000); - - // Ensure we received no data. - EXPECT_EQ(0u, rtcp_app_handler.name_); - EXPECT_EQ(0u, rtcp_app_handler.sub_type_); -} - // TODO(xians, phoglund): Re-enable when issue 372 is resolved. TEST_F(RtpRtcpTest, DISABLED_CanCreateRtpDumpFilesWithoutError) { // Create two RTP dump files (3 seconds long). You can verify these after @@ -220,27 +172,3 @@ TEST_F(RtpRtcpTest, DISABLED_CanCreateRtpDumpFilesWithoutError) { EXPECT_EQ(0, voe_rtp_rtcp_->StopRTPDump(channel_, webrtc::kRtpOutgoing)); } -TEST_F(RtpRtcpTest, ObserverGetsNotifiedOnSsrcChange) { - TestRtpObserver rtcp_observer; - EXPECT_EQ(0, voe_rtp_rtcp_->RegisterRTPObserver( - channel_, rtcp_observer)); - - unsigned int new_ssrc = 7777; - EXPECT_EQ(0, voe_base_->StopSend(channel_)); - rtcp_observer.SetIncomingSsrc(new_ssrc); - EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, new_ssrc)); - EXPECT_EQ(0, voe_base_->StartSend(channel_)); - - rtcp_observer.WaitForChangedSsrc(); - - // Now try another SSRC. - unsigned int newer_ssrc = 1717; - EXPECT_EQ(0, voe_base_->StopSend(channel_)); - rtcp_observer.SetIncomingSsrc(newer_ssrc); - EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, newer_ssrc)); - EXPECT_EQ(0, voe_base_->StartSend(channel_)); - - rtcp_observer.WaitForChangedSsrc(); - - EXPECT_EQ(0, voe_rtp_rtcp_->DeRegisterRTPObserver(channel_)); -} diff --git a/webrtc/voice_engine/voe_rtp_rtcp_impl.cc b/webrtc/voice_engine/voe_rtp_rtcp_impl.cc index e25a933b8..e69aa2d5c 100644 --- a/webrtc/voice_engine/voe_rtp_rtcp_impl.cc +++ b/webrtc/voice_engine/voe_rtp_rtcp_impl.cc @@ -50,88 +50,6 @@ VoERTP_RTCPImpl::~VoERTP_RTCPImpl() "VoERTP_RTCPImpl::~VoERTP_RTCPImpl() - dtor"); } -int VoERTP_RTCPImpl::RegisterRTPObserver(int channel, VoERTPObserver& observer) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "RegisterRTPObserver(channel=%d observer=0x%x)", - channel, &observer); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "RegisterRTPObserver() failed to locate channel"); - return -1; - } - return channelPtr->RegisterRTPObserver(observer); -} - -int VoERTP_RTCPImpl::DeRegisterRTPObserver(int channel) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "DeRegisterRTPObserver(channel=%d)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "DeRegisterRTPObserver() failed to locate channel"); - return -1; - } - return channelPtr->DeRegisterRTPObserver(); -} - -int VoERTP_RTCPImpl::RegisterRTCPObserver(int channel, VoERTCPObserver& observer) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "RegisterRTCPObserver(channel=%d observer=0x%x)", - channel, &observer); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "RegisterRTPObserver() failed to locate channel"); - return -1; - } - return channelPtr->RegisterRTCPObserver(observer); -} - -int VoERTP_RTCPImpl::DeRegisterRTCPObserver(int channel) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "DeRegisterRTCPObserver(channel=%d)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "DeRegisterRTCPObserver() failed to locate channel"); - return -1; - } - return channelPtr->DeRegisterRTCPObserver(); -} - int VoERTP_RTCPImpl::SetLocalSSRC(int channel, unsigned int ssrc) { WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), @@ -192,26 +110,6 @@ int VoERTP_RTCPImpl::GetRemoteSSRC(int channel, unsigned int& ssrc) return channelPtr->GetRemoteSSRC(ssrc); } -int VoERTP_RTCPImpl::GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetRemoteCSRCs(channel=%d, arrCSRC=?)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "GetRemoteCSRCs() failed to locate channel"); - return -1; - } - return channelPtr->GetRemoteCSRCs(arrCSRC); -} - int VoERTP_RTCPImpl::SetSendAudioLevelIndicationStatus(int channel, bool enable, unsigned char id) @@ -466,36 +364,6 @@ int VoERTP_RTCPImpl::GetRemoteRTCPData( fractionLost); } -int VoERTP_RTCPImpl::SendApplicationDefinedRTCPPacket( - int channel, - unsigned char subType, - unsigned int name, - const char* data, - unsigned short dataLengthInBytes) -{ - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "SendApplicationDefinedRTCPPacket(channel=%d, subType=%u," - "name=%u, data=?, dataLengthInBytes=%u)", - channel, subType, name, dataLengthInBytes); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "SendApplicationDefinedRTCPPacket() failed to locate channel"); - return -1; - } - return channelPtr->SendApplicationDefinedRTCPPacket(subType, - name, - data, - dataLengthInBytes); -} - int VoERTP_RTCPImpl::GetRTPStatistics(int channel, unsigned int& averageJitterMs, unsigned int& maxJitterMs, @@ -541,24 +409,6 @@ int VoERTP_RTCPImpl::GetRTCPStatistics(int channel, CallStatistics& stats) return channelPtr->GetRTPStatistics(stats); } -int VoERTP_RTCPImpl::GetRemoteRTCPSenderInfo(int channel, - SenderInfo* sender_info) { - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetRemoteRTCPSenderInfo(channel=%d)", channel); - if (!_shared->statistics().Initialized()) { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channel_ptr = ch.channel(); - if (channel_ptr == NULL) { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "GetRemoteRTCPSenderInfo() failed to locate channel"); - return -1; - } - return channel_ptr->GetRemoteRTCPSenderInfo(sender_info); -} - int VoERTP_RTCPImpl::GetRemoteRTCPReportBlocks( int channel, std::vector* report_blocks) { WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), @@ -720,27 +570,6 @@ int VoERTP_RTCPImpl::RTPDumpIsActive(int channel, RTPDirections direction) return channelPtr->RTPDumpIsActive(direction); } -int VoERTP_RTCPImpl::GetLastRemoteTimeStamp(int channel, - uint32_t* timestamp) { - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetLastRemoteTimeStamp(channel=%d, timestamp=?)", channel); - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); - return -1; - } - voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); - voe::Channel* channelPtr = ch.channel(); - if (channelPtr == NULL) - { - _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, - "GetLastRemoteTimeStamp() failed to locate channel"); - return -1; - } - *timestamp = channelPtr->LastRemoteTimeStamp(); - return 0; -} - int VoERTP_RTCPImpl::SetVideoEngineBWETarget(int channel, ViENetwork* vie_network, int video_channel) { diff --git a/webrtc/voice_engine/voe_rtp_rtcp_impl.h b/webrtc/voice_engine/voe_rtp_rtcp_impl.h index b89c0dcf5..ddb0170f5 100644 --- a/webrtc/voice_engine/voe_rtp_rtcp_impl.h +++ b/webrtc/voice_engine/voe_rtp_rtcp_impl.h @@ -20,15 +20,6 @@ namespace webrtc { class VoERTP_RTCPImpl : public VoERTP_RTCP { public: - // Registration of observers for RTP and RTCP callbacks - virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer); - - virtual int DeRegisterRTPObserver(int channel); - - virtual int RegisterRTCPObserver(int channel, VoERTCPObserver& observer); - - virtual int DeRegisterRTCPObserver(int channel); - // RTCP virtual int SetRTCPStatus(int channel, bool enable); @@ -48,13 +39,6 @@ public: unsigned int* jitter = NULL, unsigned short* fractionLost = NULL); - virtual int SendApplicationDefinedRTCPPacket( - int channel, - unsigned char subType, - unsigned int name, - const char* data, - unsigned short dataLengthInBytes); - // SSRC virtual int SetLocalSSRC(int channel, unsigned int ssrc); @@ -78,9 +62,6 @@ public: bool enable, unsigned char id); - // CSRC - virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]); - // Statistics virtual int GetRTPStatistics(int channel, unsigned int& averageJitterMs, @@ -89,8 +70,6 @@ public: virtual int GetRTCPStatistics(int channel, CallStatistics& stats); - virtual int GetRemoteRTCPSenderInfo(int channel, SenderInfo* sender_info); - virtual int GetRemoteRTCPReportBlocks( int channel, std::vector* report_blocks); @@ -117,8 +96,6 @@ public: virtual int RTPDumpIsActive(int channel, RTPDirections direction = kRtpIncoming); - virtual int GetLastRemoteTimeStamp(int channel, - uint32_t* lastRemoteTimeStamp); virtual int SetVideoEngineBWETarget(int channel, ViENetwork* vie_network, int video_channel); protected: