blob: 6bcbc7c9ca496c43e6af0e4904c5b72c02dd0b50 [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"
brandtr7250b392016-12-19 01:13:46 -080018
19namespace webrtc {
20
brandtrfa5a3682017-01-17 01:33:54 -080021class FlexfecReceiver;
22class ProcessThread;
23class ReceiveStatistics;
24class RecoveredPacketReceiver;
25class RtcpRttStats;
26class RtpPacketReceived;
27class RtpRtcp;
nisse0f15f922017-06-21 01:05:22 -070028class RtpStreamReceiverControllerInterface;
29class RtpStreamReceiverInterface;
brandtrfa5a3682017-01-17 01:33:54 -080030
eladalonc0d481a2017-08-02 07:39:07 -070031class FlexfecReceiveStreamImpl : public FlexfecReceiveStream {
brandtr7250b392016-12-19 01:13:46 -080032 public:
nisse0f15f922017-06-21 01:05:22 -070033 FlexfecReceiveStreamImpl(
34 RtpStreamReceiverControllerInterface* receiver_controller,
35 const Config& config,
36 RecoveredPacketReceiver* recovered_packet_receiver,
37 RtcpRttStats* rtt_stats,
38 ProcessThread* process_thread);
brandtr7250b392016-12-19 01:13:46 -080039 ~FlexfecReceiveStreamImpl() override;
40
nissee4bcd6d2017-05-16 04:47:04 -070041 // RtpPacketSinkInterface.
42 void OnRtpPacket(const RtpPacketReceived& packet) override;
brandtr7250b392016-12-19 01:13:46 -080043
brandtr7250b392016-12-19 01:13:46 -080044 Stats GetStats() const override;
eladalon42f44f92017-07-25 06:40:06 -070045 const Config& GetConfig() const override;
brandtr7250b392016-12-19 01:13:46 -080046
47 private:
brandtrfa5a3682017-01-17 01:33:54 -080048 // Config.
brandtr7250b392016-12-19 01:13:46 -080049 const Config config_;
brandtrfa5a3682017-01-17 01:33:54 -080050
51 // Erasure code interfacing.
brandtr7250b392016-12-19 01:13:46 -080052 const std::unique_ptr<FlexfecReceiver> receiver_;
brandtrfa5a3682017-01-17 01:33:54 -080053
54 // RTCP reporting.
55 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
56 const std::unique_ptr<RtpRtcp> rtp_rtcp_;
57 ProcessThread* process_thread_;
nisse0f15f922017-06-21 01:05:22 -070058
59 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
brandtr7250b392016-12-19 01:13:46 -080060};
61
62} // namespace webrtc
63
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020064#endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_