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

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

Issue 2886813002: Delete RtpData::OnRecoveredPacket, use RecoveredPacketReceiver instead. (Closed)
Patch Set: Comment nit. Created 3 years, 6 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 | webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h » ('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
11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/base/basictypes.h" 16 #include "webrtc/base/basictypes.h"
17 #include "webrtc/base/sequenced_task_checker.h" 17 #include "webrtc/base/sequenced_task_checker.h"
18 #include "webrtc/call/call.h" 18 #include "webrtc/call/call.h"
19 #include "webrtc/modules/rtp_rtcp/include/ulpfec_receiver.h" 19 #include "webrtc/modules/rtp_rtcp/include/ulpfec_receiver.h"
20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" 20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h"
21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" 21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
22 #include "webrtc/system_wrappers/include/clock.h" 22 #include "webrtc/system_wrappers/include/clock.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 // Callback interface for packets recovered by FlexFEC. The implementation
27 // should be able to demultiplex the recovered RTP packets based on SSRC.
28 class RecoveredPacketReceiver {
29 public:
30 virtual void OnRecoveredPacket(const uint8_t* packet, size_t length) = 0;
31
32 protected:
33 virtual ~RecoveredPacketReceiver() = default;
34 };
35
36 class FlexfecReceiver { 26 class FlexfecReceiver {
37 public: 27 public:
38 FlexfecReceiver(uint32_t ssrc, 28 FlexfecReceiver(uint32_t ssrc,
39 uint32_t protected_media_ssrc, 29 uint32_t protected_media_ssrc,
40 RecoveredPacketReceiver* recovered_packet_receiver); 30 RecoveredPacketReceiver* recovered_packet_receiver);
41 ~FlexfecReceiver(); 31 ~FlexfecReceiver();
42 32
43 // Inserts a received packet (can be either media or FlexFEC) into the 33 // Inserts a received packet (can be either media or FlexFEC) into the
44 // internal buffer, and sends the received packets to the erasure code. 34 // internal buffer, and sends the received packets to the erasure code.
45 // All newly recovered packets are sent back through the callback. 35 // All newly recovered packets are sent back through the callback.
(...skipping 25 matching lines...) Expand all
71 Clock* const clock_; 61 Clock* const clock_;
72 int64_t last_recovered_packet_ms_ GUARDED_BY(sequence_checker_); 62 int64_t last_recovered_packet_ms_ GUARDED_BY(sequence_checker_);
73 FecPacketCounter packet_counter_ GUARDED_BY(sequence_checker_); 63 FecPacketCounter packet_counter_ GUARDED_BY(sequence_checker_);
74 64
75 rtc::SequencedTaskChecker sequence_checker_; 65 rtc::SequencedTaskChecker sequence_checker_;
76 }; 66 };
77 67
78 } // namespace webrtc 68 } // namespace webrtc
79 69
80 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 70 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698