| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 public: | 47 public: |
| 48 UlpfecGenerator(); | 48 UlpfecGenerator(); |
| 49 ~UlpfecGenerator(); | 49 ~UlpfecGenerator(); |
| 50 | 50 |
| 51 static std::unique_ptr<RedPacket> BuildRedPacket(const uint8_t* data_buffer, | 51 static std::unique_ptr<RedPacket> BuildRedPacket(const uint8_t* data_buffer, |
| 52 size_t payload_length, | 52 size_t payload_length, |
| 53 size_t rtp_header_length, | 53 size_t rtp_header_length, |
| 54 int red_payload_type); | 54 int red_payload_type); |
| 55 | 55 |
| 56 void SetFecParameters(const FecProtectionParams* params); | 56 void SetFecParameters(const FecProtectionParams& params); |
| 57 | 57 |
| 58 // Adds a media packet to the internal buffer. When enough media packets | 58 // Adds a media packet to the internal buffer. When enough media packets |
| 59 // have been added, the FEC packets are generated and stored internally. | 59 // have been added, the FEC packets are generated and stored internally. |
| 60 // These FEC packets are then obtained by calling GetFecPacketsAsRed(). | 60 // These FEC packets are then obtained by calling GetFecPacketsAsRed(). |
| 61 int AddRtpPacketAndGenerateFec(const uint8_t* data_buffer, | 61 int AddRtpPacketAndGenerateFec(const uint8_t* data_buffer, |
| 62 size_t payload_length, | 62 size_t payload_length, |
| 63 size_t rtp_header_length); | 63 size_t rtp_header_length); |
| 64 | 64 |
| 65 // Returns true if there are generated FEC packets available. | 65 // Returns true if there are generated FEC packets available. |
| 66 bool FecAvailable() const; | 66 bool FecAvailable() const; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 std::list<ForwardErrorCorrection::Packet*> generated_fec_packets_; | 106 std::list<ForwardErrorCorrection::Packet*> generated_fec_packets_; |
| 107 int num_protected_frames_; | 107 int num_protected_frames_; |
| 108 int min_num_media_packets_; | 108 int min_num_media_packets_; |
| 109 FecProtectionParams params_; | 109 FecProtectionParams params_; |
| 110 FecProtectionParams new_params_; | 110 FecProtectionParams new_params_; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace webrtc | 113 } // namespace webrtc |
| 114 | 114 |
| 115 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_ULPFEC_GENERATOR_H_ | 115 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_ULPFEC_GENERATOR_H_ |
| OLD | NEW |