/* * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "modules/rtp_rtcp/include/flexfec_receiver.h" #include <string.h> #include "api/array_view.h" #include "api/scoped_refptr.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" namespace webrtc { namespace { // Minimum header size (in bytes) of a well-formed non-singular FlexFEC packet. constexpr size_t kMinFlexfecHeaderSize = …; // How often to log the recovered packets to the text log. constexpr TimeDelta kPacketLogInterval = …; } // namespace FlexfecReceiver::FlexfecReceiver( uint32_t ssrc, uint32_t protected_media_ssrc, RecoveredPacketReceiver* recovered_packet_receiver) : … { … } FlexfecReceiver::FlexfecReceiver( Clock* clock, uint32_t ssrc, uint32_t protected_media_ssrc, RecoveredPacketReceiver* recovered_packet_receiver) : … { … } FlexfecReceiver::~FlexfecReceiver() = default; void FlexfecReceiver::OnRtpPacket(const RtpPacketReceived& packet) { … } FecPacketCounter FlexfecReceiver::GetPacketCounter() const { … } // TODO(eladalon): Consider using packet.recovered() to avoid processing // recovered packets here. std::unique_ptr<ForwardErrorCorrection::ReceivedPacket> FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { … } // Note that the implementation of this member function and the implementation // in UlpfecReceiver::ProcessReceivedFec() are slightly different. // This implementation only returns _recovered_ media packets through the // callback, whereas the implementation in UlpfecReceiver returns _all inserted_ // media packets through the callback. The latter behaviour makes sense // for ULPFEC, since the ULPFEC receiver is owned by the RtpVideoStreamReceiver. // Here, however, the received media pipeline is more decoupled from the // FlexFEC decoder, and we therefore do not interfere with the reception // of non-recovered media packets. void FlexfecReceiver::ProcessReceivedPacket( const ForwardErrorCorrection::ReceivedPacket& received_packet) { … } } // namespace webrtc