OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_SENDER_IMPL_H_ | |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_SENDER_IMPL_H_ | |
13 | |
14 #include <memory> | |
15 #include <vector> | |
16 | |
17 #include "webrtc/base/basictypes.h" | |
18 #include "webrtc/base/random.h" | |
19 #include "webrtc/base/sequenced_task_checker.h" | |
20 #include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" | |
21 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" | |
22 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | |
23 #include "webrtc/system_wrappers/include/clock.h" | |
24 | |
25 namespace webrtc { | |
26 | |
27 class FlexfecSenderImpl : public FlexfecSender { | |
28 public: | |
29 FlexfecSenderImpl(int flexfec_payload_type, | |
30 uint32_t flexfec_ssrc, | |
31 uint32_t protected_media_ssrc, | |
32 std::vector<RtpExtension> rtp_header_extensions, | |
33 Clock* clock); | |
34 ~FlexfecSenderImpl(); | |
35 | |
36 // Implements FlexfecSender. | |
danilchap
2016/10/20 15:12:57
add override keyword to functions below
brandtr
2016/10/24 12:52:08
Done! (Usually, the compiler complains about missi
| |
37 void SetFecParameters(const FecProtectionParams* params); | |
38 int AddRtpPacketAndGenerateFec(RtpPacketToSend* packet); | |
39 bool FecAvailable() const; | |
40 std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets(); | |
41 size_t MaxPacketOverhead() const; | |
42 | |
43 private: | |
44 // Utility. | |
45 Clock* const clock_; | |
46 Random random_; | |
47 int64_t last_generated_packet_ms_; | |
48 rtc::SequencedTaskChecker sequence_checker_; | |
49 | |
50 // Config. | |
51 const int flexfec_payload_type_; | |
52 uint16_t seq_num_; | |
53 const uint32_t timestamp_offset_; | |
54 const uint32_t flexfec_ssrc_; | |
55 const uint32_t protected_media_ssrc_; | |
56 | |
57 // Implementation. | |
58 ProducerFec ulpfec_sender_; | |
59 RtpHeaderExtensionMap rtp_header_extension_map_; | |
60 }; | |
61 | |
62 } // namespace webrtc | |
63 | |
64 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FLEXFEC_SENDER_IMPL_H_ | |
OLD | NEW |