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

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

Issue 2686273002: Rename flexfec AddAndProcessReceivedPacket --> OnRtpPacket. (Closed)
Patch Set: Update flexfec fuzzer. Created 3 years, 10 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
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 25 matching lines...) Expand all
36 class FlexfecReceiver { 36 class FlexfecReceiver {
37 public: 37 public:
38 FlexfecReceiver(uint32_t ssrc, 38 FlexfecReceiver(uint32_t ssrc,
39 uint32_t protected_media_ssrc, 39 uint32_t protected_media_ssrc,
40 RecoveredPacketReceiver* recovered_packet_receiver); 40 RecoveredPacketReceiver* recovered_packet_receiver);
41 ~FlexfecReceiver(); 41 ~FlexfecReceiver();
42 42
43 // Inserts a received packet (can be either media or FlexFEC) into the 43 // Inserts a received packet (can be either media or FlexFEC) into the
44 // internal buffer, and sends the received packets to the erasure code. 44 // internal buffer, and sends the received packets to the erasure code.
45 // All newly recovered packets are sent back through the callback. 45 // All newly recovered packets are sent back through the callback.
46 bool AddAndProcessReceivedPacket(const RtpPacketReceived& packet); 46 void OnRtpPacket(const RtpPacketReceived& packet);
47 47
48 // Returns a counter describing the added and recovered packets. 48 // Returns a counter describing the added and recovered packets.
49 FecPacketCounter GetPacketCounter() const; 49 FecPacketCounter GetPacketCounter() const;
50 50
51 private: 51 // Protected to aid testing.
52 protected:
52 bool AddReceivedPacket(const RtpPacketReceived& packet); 53 bool AddReceivedPacket(const RtpPacketReceived& packet);
53 bool ProcessReceivedPackets(); 54 bool ProcessReceivedPackets();
54 55
56 private:
55 // Config. 57 // Config.
56 const uint32_t ssrc_; 58 const uint32_t ssrc_;
57 const uint32_t protected_media_ssrc_; 59 const uint32_t protected_media_ssrc_;
58 60
59 // Erasure code interfacing and callback. 61 // Erasure code interfacing and callback.
60 std::unique_ptr<ForwardErrorCorrection> erasure_code_ 62 std::unique_ptr<ForwardErrorCorrection> erasure_code_
61 GUARDED_BY(sequence_checker_); 63 GUARDED_BY(sequence_checker_);
62 ForwardErrorCorrection::ReceivedPacketList received_packets_ 64 ForwardErrorCorrection::ReceivedPacketList received_packets_
63 GUARDED_BY(sequence_checker_); 65 GUARDED_BY(sequence_checker_);
64 ForwardErrorCorrection::RecoveredPacketList recovered_packets_ 66 ForwardErrorCorrection::RecoveredPacketList recovered_packets_
65 GUARDED_BY(sequence_checker_); 67 GUARDED_BY(sequence_checker_);
66 RecoveredPacketReceiver* const recovered_packet_receiver_; 68 RecoveredPacketReceiver* const recovered_packet_receiver_;
67 69
68 // Logging and stats. 70 // Logging and stats.
69 Clock* const clock_; 71 Clock* const clock_;
70 int64_t last_recovered_packet_ms_ GUARDED_BY(sequence_checker_); 72 int64_t last_recovered_packet_ms_ GUARDED_BY(sequence_checker_);
71 FecPacketCounter packet_counter_ GUARDED_BY(sequence_checker_); 73 FecPacketCounter packet_counter_ GUARDED_BY(sequence_checker_);
72 74
73 rtc::SequencedTaskChecker sequence_checker_; 75 rtc::SequencedTaskChecker sequence_checker_;
74 }; 76 };
75 77
76 } // namespace webrtc 78 } // namespace webrtc
77 79
78 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 80 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
OLDNEW
« no previous file with comments | « webrtc/call/flexfec_receive_stream_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698