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 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 class FlexfecSender { | 32 class FlexfecSender { |
33 public: | 33 public: |
34 FlexfecSender(int payload_type, | 34 FlexfecSender(int payload_type, |
35 uint32_t ssrc, | 35 uint32_t ssrc, |
36 uint32_t protected_media_ssrc, | 36 uint32_t protected_media_ssrc, |
37 const std::vector<RtpExtension>& rtp_header_extensions, | 37 const std::vector<RtpExtension>& rtp_header_extensions, |
38 Clock* clock); | 38 Clock* clock); |
39 ~FlexfecSender(); | 39 ~FlexfecSender(); |
40 | 40 |
| 41 uint32_t ssrc() const { return ssrc_; } |
| 42 |
41 // Sets the FEC rate, max frames sent before FEC packets are sent, | 43 // Sets the FEC rate, max frames sent before FEC packets are sent, |
42 // and what type of generator matrices are used. | 44 // and what type of generator matrices are used. |
43 void SetFecParameters(const FecProtectionParams& params); | 45 void SetFecParameters(const FecProtectionParams& params); |
44 | 46 |
45 // Adds a media packet to the internal buffer. When enough media packets | 47 // Adds a media packet to the internal buffer. When enough media packets |
46 // have been added, the FEC packets are generated and stored internally. | 48 // have been added, the FEC packets are generated and stored internally. |
47 // These FEC packets are then obtained by calling GetFecPackets(). | 49 // These FEC packets are then obtained by calling GetFecPackets(). |
48 // Returns true if the media packet was successfully added. | 50 // Returns true if the media packet was successfully added. |
49 bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet); | 51 bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet); |
50 | 52 |
(...skipping 22 matching lines...) Expand all Loading... |
73 uint16_t seq_num_ GUARDED_BY(sequence_checker_); | 75 uint16_t seq_num_ GUARDED_BY(sequence_checker_); |
74 | 76 |
75 // Implementation. | 77 // Implementation. |
76 UlpfecGenerator ulpfec_generator_ GUARDED_BY(sequence_checker_); | 78 UlpfecGenerator ulpfec_generator_ GUARDED_BY(sequence_checker_); |
77 const RtpHeaderExtensionMap rtp_header_extension_map_; | 79 const RtpHeaderExtensionMap rtp_header_extension_map_; |
78 }; | 80 }; |
79 | 81 |
80 } // namespace webrtc | 82 } // namespace webrtc |
81 | 83 |
82 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | 84 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ |
OLD | NEW |