brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 1 | /* |
| 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 Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
| 12 | #define CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 13 | |
| 14 | #include <memory> |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 15 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 16 | #include "call/flexfec_receive_stream.h" |
| 17 | #include "call/rtp_packet_sink_interface.h" |
Sebastian Jansson | 8026d60 | 2019-03-04 19:39:01 +0100 | [diff] [blame] | 18 | #include "system_wrappers/include/clock.h" |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | |
brandtr | fa5a368 | 2017-01-17 01:33:54 -0800 | [diff] [blame] | 22 | class FlexfecReceiver; |
| 23 | class ProcessThread; |
| 24 | class ReceiveStatistics; |
| 25 | class RecoveredPacketReceiver; |
| 26 | class RtcpRttStats; |
| 27 | class RtpPacketReceived; |
| 28 | class RtpRtcp; |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 29 | class RtpStreamReceiverControllerInterface; |
| 30 | class RtpStreamReceiverInterface; |
brandtr | fa5a368 | 2017-01-17 01:33:54 -0800 | [diff] [blame] | 31 | |
eladalon | c0d481a | 2017-08-02 07:39:07 -0700 | [diff] [blame] | 32 | class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 33 | public: |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 34 | FlexfecReceiveStreamImpl( |
Sebastian Jansson | 8026d60 | 2019-03-04 19:39:01 +0100 | [diff] [blame] | 35 | Clock* clock, |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 36 | RtpStreamReceiverControllerInterface* receiver_controller, |
| 37 | const Config& config, |
| 38 | RecoveredPacketReceiver* recovered_packet_receiver, |
| 39 | RtcpRttStats* rtt_stats, |
| 40 | ProcessThread* process_thread); |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 41 | ~FlexfecReceiveStreamImpl() override; |
| 42 | |
nisse | e4bcd6d | 2017-05-16 04:47:04 -0700 | [diff] [blame] | 43 | // RtpPacketSinkInterface. |
| 44 | void OnRtpPacket(const RtpPacketReceived& packet) override; |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 45 | |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 46 | Stats GetStats() const override; |
eladalon | 42f44f9 | 2017-07-25 06:40:06 -0700 | [diff] [blame] | 47 | const Config& GetConfig() const override; |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 48 | |
| 49 | private: |
brandtr | fa5a368 | 2017-01-17 01:33:54 -0800 | [diff] [blame] | 50 | // Config. |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 51 | const Config config_; |
brandtr | fa5a368 | 2017-01-17 01:33:54 -0800 | [diff] [blame] | 52 | |
| 53 | // Erasure code interfacing. |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 54 | const std::unique_ptr<FlexfecReceiver> receiver_; |
brandtr | fa5a368 | 2017-01-17 01:33:54 -0800 | [diff] [blame] | 55 | |
| 56 | // RTCP reporting. |
| 57 | const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
| 58 | const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
| 59 | ProcessThread* process_thread_; |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 60 | |
| 61 | std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_; |
brandtr | 7250b39 | 2016-12-19 01:13:46 -0800 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | } // namespace webrtc |
| 65 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 66 | #endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |