Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/flexfec_receiver_impl.h

Issue 2392663006: Add a FlexfecReceiver class. (Closed)
Patch Set: holmer's comments 1. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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/sequenced_task_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 AddAndProcessReceivedPacket(const uint8_t* packet, size_t packet_length);
34 FecPacketCounter GetPacketCounter() const;
35
36 private:
37 bool AddReceivedPacket(const uint8_t* packet, size_t packet_length);
38 bool ProcessReceivedPackets();
39
40 // Config.
41 const uint32_t flexfec_ssrc_;
42 const uint32_t protected_media_ssrc_;
43
44 // Erasure code interfacing and callback.
45 std::unique_ptr<ForwardErrorCorrection> erasure_code_;
46 ForwardErrorCorrection::ReceivedPacketList received_packets_;
47 ForwardErrorCorrection::RecoveredPacketList recovered_packets_;
48 RecoveredPacketReceiver* const callback_;
49
50 // Logging and stats.
51 Clock* const clock_;
52 int64_t last_recovered_packet_ms_;
53 FecPacketCounter packet_counter_;
54
55 rtc::SequencedTaskChecker sequence_checker_;
56 };
57
58 } // namespace webrtc
59
60 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_RECEIVER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/flexfec_receiver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698