diff --git a/webrtc/voice_engine/include/voe_rtp_rtcp.h b/webrtc/voice_engine/include/voe_rtp_rtcp.h index df1fef7e4..30d8add8c 100644 --- a/webrtc/voice_engine/include/voe_rtp_rtcp.h +++ b/webrtc/voice_engine/include/voe_rtp_rtcp.h @@ -220,6 +220,14 @@ public: virtual int GetFECStatus( int channel, bool& enabled, int& redPayloadtype) = 0; + // This function enables Negative Acknowledgment (NACK) using RTCP, + // implemented based on RFC 4585. NACK retransmits RTP packets if lost on + // the network. This creates a lossless transport at the expense of delay. + // If using NACK, NACK should be enabled on both endpoints in a call. + virtual int SetNACKStatus(int channel, + bool enable, + int maxNoPackets) = 0; + // Enables capturing of RTP packets to a binary file on a specific // |channel| and for a given |direction|. The file can later be replayed // using e.g. RTP Tools rtpplay since the binary file format is diff --git a/webrtc/voice_engine/voe_rtp_rtcp_impl.cc b/webrtc/voice_engine/voe_rtp_rtcp_impl.cc index b33aa4e14..102e09e3c 100644 --- a/webrtc/voice_engine/voe_rtp_rtcp_impl.cc +++ b/webrtc/voice_engine/voe_rtp_rtcp_impl.cc @@ -568,6 +568,19 @@ int VoERTP_RTCPImpl::GetFECStatus(int channel, #endif } + +int VoERTP_RTCPImpl::SetNACKStatus(int channel, + bool enable, + int maxNoPackets) +{ + WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), + "SetNACKStatus(channel=%d, enable=%d, maxNoPackets=%d)", + channel, enable, maxNoPackets); + // Dummy for now + return 0; +} + + int VoERTP_RTCPImpl::StartRTPDump(int channel, const char fileNameUTF8[1024], RTPDirections direction) diff --git a/webrtc/voice_engine/voe_rtp_rtcp_impl.h b/webrtc/voice_engine/voe_rtp_rtcp_impl.h index a9e66fd32..0f8d08481 100644 --- a/webrtc/voice_engine/voe_rtp_rtcp_impl.h +++ b/webrtc/voice_engine/voe_rtp_rtcp_impl.h @@ -94,6 +94,11 @@ public: virtual int GetFECStatus(int channel, bool& enabled, int& redPayloadtype); + //NACK + virtual int SetNACKStatus(int channel, + bool enable, + int maxNoPackets); + // Store RTP and RTCP packets and dump to file (compatible with rtpplay) virtual int StartRTPDump(int channel, const char fileNameUTF8[1024],