From 6118f75fc34afee47bb0fd9ced18ddfe509521ce Mon Sep 17 00:00:00 2001 From: Daniel Stiner Date: Fri, 19 Mar 2021 20:27:51 -0700 Subject: [PATCH] Implent ping handling for ftl media streams --- src/FtlStream.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/FtlStream.cpp b/src/FtlStream.cpp index 3444138..8f3a7f9 100644 --- a/src/FtlStream.cpp +++ b/src/FtlStream.cpp @@ -587,11 +587,8 @@ void FtlStream::processAudioVideoRtpPacket(const std::vector& rtpPack void FtlStream::handlePing(const std::vector& rtpPacket) { - // These pings are useless - FTL tries to determine 'ping' by having a timestamp - // sent across and compared against the remote's clock. This assumes that there is - // no time difference between the client and server, which is practically never true. - - // We'll just ignore these pings, since they wouldn't give us any useful information anyway. + // FTL client is trying to measure round trip time (RTT), pong back the same packet + mediaTransport->Write(rtpPacket); } void FtlStream::handleSenderReport(const std::vector& rtpPacket)