blob: d4fdc7431a759a771a02b050e672de3e17ac47a7 [file] [log] [blame]
brandtr7250b392016-12-19 01:13:46 -08001/*
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 06:47:31 +020011#ifndef CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
12#define CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
brandtr7250b392016-12-19 01:13:46 -080013
14#include <memory>
brandtr7250b392016-12-19 01:13:46 -080015
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#include "call/flexfec_receive_stream.h"
17#include "call/rtp_packet_sink_interface.h"
Sebastian Jansson8026d602019-03-04 19:39:01 +010018#include "system_wrappers/include/clock.h"
brandtr7250b392016-12-19 01:13:46 -080019
20namespace webrtc {
21
brandtrfa5a3682017-01-17 01:33:54 -080022class FlexfecReceiver;
23class ProcessThread;
24class ReceiveStatistics;
25class RecoveredPacketReceiver;
26class RtcpRttStats;
27class RtpPacketReceived;
28class RtpRtcp;
nisse0f15f922017-06-21 01:05:22 -070029class RtpStreamReceiverControllerInterface;
30class RtpStreamReceiverInterface;
brandtrfa5a3682017-01-17 01:33:54 -080031
eladalonc0d481a2017-08-02 07:39:07 -070032class FlexfecReceiveStreamImpl : public FlexfecReceiveStream {
brandtr7250b392016-12-19 01:13:46 -080033 public:
nisse0f15f922017-06-21 01:05:22 -070034 FlexfecReceiveStreamImpl(
Sebastian Jansson8026d602019-03-04 19:39:01 +010035 Clock* clock,
nisse0f15f922017-06-21 01:05:22 -070036 RtpStreamReceiverControllerInterface* receiver_controller,
37 const Config& config,
38 RecoveredPacketReceiver* recovered_packet_receiver,
39 RtcpRttStats* rtt_stats,
40 ProcessThread* process_thread);
brandtr7250b392016-12-19 01:13:46 -080041 ~FlexfecReceiveStreamImpl() override;
42
nissee4bcd6d2017-05-16 04:47:04 -070043 // RtpPacketSinkInterface.
44 void OnRtpPacket(const RtpPacketReceived& packet) override;
brandtr7250b392016-12-19 01:13:46 -080045
brandtr7250b392016-12-19 01:13:46 -080046 Stats GetStats() const override;
eladalon42f44f92017-07-25 06:40:06 -070047 const Config& GetConfig() const override;
brandtr7250b392016-12-19 01:13:46 -080048
49 private:
brandtrfa5a3682017-01-17 01:33:54 -080050 // Config.
brandtr7250b392016-12-19 01:13:46 -080051 const Config config_;
brandtrfa5a3682017-01-17 01:33:54 -080052
53 // Erasure code interfacing.
brandtr7250b392016-12-19 01:13:46 -080054 const std::unique_ptr<FlexfecReceiver> receiver_;
brandtrfa5a3682017-01-17 01:33:54 -080055
56 // RTCP reporting.
57 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
58 const std::unique_ptr<RtpRtcp> rtp_rtcp_;
59 ProcessThread* process_thread_;
nisse0f15f922017-06-21 01:05:22 -070060
61 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
brandtr7250b392016-12-19 01:13:46 -080062};
63
64} // namespace webrtc
65
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020066#endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_