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

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

Issue 2427733002: Revert of Add path for recovered packets from internal::Call to RtpStreamReceiver. (Closed)
Patch Set: 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
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/video_receive_stream.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/modules/rtp_rtcp/include/fec_receiver.h" 17 #include "webrtc/modules/rtp_rtcp/include/fec_receiver.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 // Callback interface for packets recovered by FlexFEC. The implementation 21 // Callback interface for packets recovered by FlexFEC.
22 // should be able to demultiplex the recovered RTP packets based on SSRC.
23 class RecoveredPacketReceiver { 22 class RecoveredPacketReceiver {
24 public: 23 public:
25 virtual bool OnRecoveredPacket(const uint8_t* packet, size_t length) = 0; 24 virtual bool OnRecoveredPacket(const uint8_t* packet, size_t length) = 0;
26 25
27 protected: 26 protected:
28 virtual ~RecoveredPacketReceiver() = default; 27 virtual ~RecoveredPacketReceiver() = default;
29 }; 28 };
30 29
31 class FlexfecReceiver { 30 class FlexfecReceiver {
32 public: 31 public:
33 static std::unique_ptr<FlexfecReceiver> Create( 32 static std::unique_ptr<FlexfecReceiver> Create(
34 uint32_t flexfec_ssrc, 33 uint32_t flexfec_ssrc,
35 uint32_t protected_media_ssrc, 34 uint32_t protected_media_ssrc,
36 RecoveredPacketReceiver* callback); 35 RecoveredPacketReceiver* callback);
37 virtual ~FlexfecReceiver(); 36 virtual ~FlexfecReceiver();
38 37
39 // Inserts a received packet (can be either media or FlexFEC) into the 38 // Inserts a received packet (can be either media or FlexFEC) into the
40 // internal buffer, and sends the received packets to the erasure code. 39 // internal buffer, and sends the received packets to the erasure code.
41 // All newly recovered packets are sent back through the callback. 40 // All newly recovered packets are sent back through the callback.
42 virtual bool AddAndProcessReceivedPacket(const uint8_t* packet, 41 virtual bool AddAndProcessReceivedPacket(const uint8_t* packet,
43 size_t packet_length) = 0; 42 size_t packet_length) = 0;
44 43
45 // Returns a counter describing the added and recovered packets. 44 // Returns a counter describing the added and recovered packets.
46 virtual FecPacketCounter GetPacketCounter() const = 0; 45 virtual FecPacketCounter GetPacketCounter() const = 0;
47 }; 46 };
48 47
49 } // namespace webrtc 48 } // namespace webrtc
50 49
51 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_ 50 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698