Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_RECEIVER_IMPL_H_ | |
| 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_RECEIVER_IMPL_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "webrtc/base/basictypes.h" | |
| 17 #include "webrtc/base/thread_checker.h" | |
| 18 #include "webrtc/call.h" | |
| 19 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" | |
| 20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | |
| 21 #include "webrtc/system_wrappers/include/clock.h" | |
| 22 | |
| 23 namespace webrtc { | |
| 24 | |
| 25 class FlexfecReceiverImpl : public FlexfecReceiver { | |
| 26 public: | |
| 27 FlexfecReceiverImpl(uint32_t flexfec_ssrc, | |
| 28 uint32_t protected_media_ssrc, | |
| 29 RecoveredPacketReceiver* callback); | |
| 30 ~FlexfecReceiverImpl(); | |
| 31 | |
| 32 // Implements FlexfecReceiver. | |
| 33 bool AddReceivedPacket(const uint8_t* packet, size_t packet_length); | |
| 34 bool ProcessReceivedPackets(); | |
| 35 FecPacketCounter GetPacketCounter() const; | |
| 36 | |
| 37 private: | |
| 38 // Config. | |
| 39 const uint32_t flexfec_ssrc_; | |
| 40 const uint32_t protected_media_ssrc_; | |
| 41 | |
| 42 // Erasure code interfacing and callback. | |
| 43 std::unique_ptr<ForwardErrorCorrection> erasure_code_; | |
| 44 ForwardErrorCorrection::ReceivedPacketList received_packets_; | |
| 45 ForwardErrorCorrection::RecoveredPacketList recovered_packets_; | |
| 46 RecoveredPacketReceiver* callback_; | |
|
stefan-webrtc
2016/10/05 14:45:59
RecoveredPacketReceiver* const callback_
brandtr
2016/10/06 08:38:57
Done.
| |
| 47 | |
| 48 // Logging and stats. | |
| 49 Clock* const clock_; | |
| 50 int64_t last_recovered_packet_ms_; | |
| 51 FecPacketCounter packet_counter_; | |
| 52 | |
| 53 rtc::ThreadChecker thread_checker_; | |
|
danilchap
2016/10/05 14:32:04
may be use SequentialThreadChecker to support upco
brandtr
2016/10/06 08:38:57
Sounds good! I wasn't aware that the SequencedTask
| |
| 54 }; | |
| 55 | |
| 56 } // namespace webrtc | |
| 57 | |
| 58 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_RECEIVER_IMPL_H_ | |
| OLD | NEW |