blob: 888dae9ebd5a3405876d6f1be759d095327e0823 [file] [log] [blame]
brandtr7250b392016-12-19 09:13:461/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 04:47:3111#ifndef CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
12#define CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
brandtr7250b392016-12-19 09:13:4613
14#include <memory>
brandtr7250b392016-12-19 09:13:4615
Mirko Bonadei92ea95e2017-09-15 04:47:3116#include "call/flexfec_receive_stream.h"
17#include "call/rtp_packet_sink_interface.h"
Tomas Gunnarssonf25761d2020-06-03 20:55:3318#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
Sebastian Jansson8026d602019-03-04 18:39:0119#include "system_wrappers/include/clock.h"
brandtr7250b392016-12-19 09:13:4620
21namespace webrtc {
22
brandtrfa5a3682017-01-17 09:33:5423class FlexfecReceiver;
24class ProcessThread;
25class ReceiveStatistics;
26class RecoveredPacketReceiver;
27class RtcpRttStats;
28class RtpPacketReceived;
29class RtpRtcp;
nisse0f15f922017-06-21 08:05:2230class RtpStreamReceiverControllerInterface;
31class RtpStreamReceiverInterface;
brandtrfa5a3682017-01-17 09:33:5432
eladalonc0d481a2017-08-02 14:39:0733class FlexfecReceiveStreamImpl : public FlexfecReceiveStream {
brandtr7250b392016-12-19 09:13:4634 public:
nisse0f15f922017-06-21 08:05:2235 FlexfecReceiveStreamImpl(
Sebastian Jansson8026d602019-03-04 18:39:0136 Clock* clock,
nisse0f15f922017-06-21 08:05:2237 RtpStreamReceiverControllerInterface* receiver_controller,
38 const Config& config,
39 RecoveredPacketReceiver* recovered_packet_receiver,
40 RtcpRttStats* rtt_stats,
41 ProcessThread* process_thread);
brandtr7250b392016-12-19 09:13:4642 ~FlexfecReceiveStreamImpl() override;
43
nissee4bcd6d2017-05-16 11:47:0444 // RtpPacketSinkInterface.
45 void OnRtpPacket(const RtpPacketReceived& packet) override;
brandtr7250b392016-12-19 09:13:4646
brandtr7250b392016-12-19 09:13:4647 Stats GetStats() const override;
eladalon42f44f92017-07-25 13:40:0648 const Config& GetConfig() const override;
brandtr7250b392016-12-19 09:13:4649
50 private:
brandtrfa5a3682017-01-17 09:33:5451 // Config.
brandtr7250b392016-12-19 09:13:4652 const Config config_;
brandtrfa5a3682017-01-17 09:33:5453
54 // Erasure code interfacing.
brandtr7250b392016-12-19 09:13:4655 const std::unique_ptr<FlexfecReceiver> receiver_;
brandtrfa5a3682017-01-17 09:33:5456
57 // RTCP reporting.
58 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
Tomas Gunnarssonf25761d2020-06-03 20:55:3359 const std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
brandtrfa5a3682017-01-17 09:33:5460 ProcessThread* process_thread_;
nisse0f15f922017-06-21 08:05:2261
62 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
brandtr7250b392016-12-19 09:13:4663};
64
65} // namespace webrtc
66
Mirko Bonadei92ea95e2017-09-15 04:47:3167#endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_