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

Side by Side Diff: modules/rtp_rtcp/include/flexfec_receiver.h

Issue 3012243002: Change ForwardErrorCorrection class to accept one received packet at a time. (Closed)
Patch Set: Rebased. Created 3 years, 3 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
« no previous file with comments | « no previous file | modules/rtp_rtcp/source/flexfec_receiver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 21 matching lines...) Expand all
32 // Inserts a received packet (can be either media or FlexFEC) into the 32 // Inserts a received packet (can be either media or FlexFEC) into the
33 // internal buffer, and sends the received packets to the erasure code. 33 // internal buffer, and sends the received packets to the erasure code.
34 // All newly recovered packets are sent back through the callback. 34 // All newly recovered packets are sent back through the callback.
35 void OnRtpPacket(const RtpPacketReceived& packet); 35 void OnRtpPacket(const RtpPacketReceived& packet);
36 36
37 // Returns a counter describing the added and recovered packets. 37 // Returns a counter describing the added and recovered packets.
38 FecPacketCounter GetPacketCounter() const; 38 FecPacketCounter GetPacketCounter() const;
39 39
40 // Protected to aid testing. 40 // Protected to aid testing.
41 protected: 41 protected:
42 bool AddReceivedPacket(const RtpPacketReceived& packet); 42 std::unique_ptr<ForwardErrorCorrection::ReceivedPacket> AddReceivedPacket(
43 bool ProcessReceivedPackets(); 43 const RtpPacketReceived& packet);
44 void ProcessReceivedPacket(
45 const ForwardErrorCorrection::ReceivedPacket& received_packet);
44 46
45 private: 47 private:
46 // Config. 48 // Config.
47 const uint32_t ssrc_; 49 const uint32_t ssrc_;
48 const uint32_t protected_media_ssrc_; 50 const uint32_t protected_media_ssrc_;
49 51
50 // Erasure code interfacing and callback. 52 // Erasure code interfacing and callback.
51 std::unique_ptr<ForwardErrorCorrection> erasure_code_ 53 std::unique_ptr<ForwardErrorCorrection> erasure_code_
52 RTC_GUARDED_BY(sequence_checker_); 54 RTC_GUARDED_BY(sequence_checker_);
53 ForwardErrorCorrection::ReceivedPacketList received_packets_
54 RTC_GUARDED_BY(sequence_checker_);
55 ForwardErrorCorrection::RecoveredPacketList recovered_packets_ 55 ForwardErrorCorrection::RecoveredPacketList recovered_packets_
56 RTC_GUARDED_BY(sequence_checker_); 56 RTC_GUARDED_BY(sequence_checker_);
57 RecoveredPacketReceiver* const recovered_packet_receiver_; 57 RecoveredPacketReceiver* const recovered_packet_receiver_;
58 58
59 // Logging and stats. 59 // Logging and stats.
60 Clock* const clock_; 60 Clock* const clock_;
61 int64_t last_recovered_packet_ms_ RTC_GUARDED_BY(sequence_checker_); 61 int64_t last_recovered_packet_ms_ RTC_GUARDED_BY(sequence_checker_);
62 FecPacketCounter packet_counter_ RTC_GUARDED_BY(sequence_checker_); 62 FecPacketCounter packet_counter_ RTC_GUARDED_BY(sequence_checker_);
63 63
64 rtc::SequencedTaskChecker sequence_checker_; 64 rtc::SequencedTaskChecker sequence_checker_;
65 }; 65 };
66 66
67 } // namespace webrtc 67 } // namespace webrtc
68 68
69 #endif // MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 69 #endif // MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
OLDNEW
« no previous file with comments | « no previous file | modules/rtp_rtcp/source/flexfec_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698