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