OLD | NEW |
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_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 11 #ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
12 #define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 12 #define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "webrtc/base/basictypes.h" | 17 #include "webrtc/base/basictypes.h" |
18 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
19 #include "webrtc/call/flexfec_receive_stream.h" | 19 #include "webrtc/call/flexfec_receive_stream.h" |
20 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" | 20 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" |
| 21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
21 | 22 |
22 namespace webrtc { | 23 namespace webrtc { |
23 | 24 |
24 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { | 25 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { |
25 public: | 26 public: |
26 FlexfecReceiveStreamImpl(const Config& config, | 27 FlexfecReceiveStreamImpl(const Config& config, |
27 RecoveredPacketReceiver* recovered_packet_callback); | 28 RecoveredPacketReceiver* recovered_packet_receiver); |
28 ~FlexfecReceiveStreamImpl() override; | 29 ~FlexfecReceiveStreamImpl() override; |
29 | 30 |
30 bool AddAndProcessReceivedPacket(const uint8_t* packet, size_t length); | 31 const Config& GetConfig() const { return config_; } |
| 32 |
| 33 bool AddAndProcessReceivedPacket(RtpPacketReceived packet); |
31 | 34 |
32 // Implements FlexfecReceiveStream. | 35 // Implements FlexfecReceiveStream. |
33 void Start() override; | 36 void Start() override; |
34 void Stop() override; | 37 void Stop() override; |
35 Stats GetStats() const override; | 38 Stats GetStats() const override; |
36 | 39 |
37 private: | 40 private: |
38 rtc::CriticalSection crit_; | 41 rtc::CriticalSection crit_; |
39 bool started_ GUARDED_BY(crit_); | 42 bool started_ GUARDED_BY(crit_); |
40 | 43 |
41 const Config config_; | 44 const Config config_; |
42 const std::unique_ptr<FlexfecReceiver> receiver_; | 45 const std::unique_ptr<FlexfecReceiver> receiver_; |
43 }; | 46 }; |
44 | 47 |
45 } // namespace webrtc | 48 } // namespace webrtc |
46 | 49 |
47 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 50 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
OLD | NEW |