| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ssrc_(ssrc), | 42 ssrc_(ssrc), |
| 43 random_(random) {} | 43 random_(random) {} |
| 44 | 44 |
| 45 // Construct the media packets, up to |num_media_packets| packets. | 45 // Construct the media packets, up to |num_media_packets| packets. |
| 46 ForwardErrorCorrection::PacketList ConstructMediaPackets( | 46 ForwardErrorCorrection::PacketList ConstructMediaPackets( |
| 47 int num_media_packets, | 47 int num_media_packets, |
| 48 uint16_t start_seq_num); | 48 uint16_t start_seq_num); |
| 49 ForwardErrorCorrection::PacketList ConstructMediaPackets( | 49 ForwardErrorCorrection::PacketList ConstructMediaPackets( |
| 50 int num_media_packets); | 50 int num_media_packets); |
| 51 | 51 |
| 52 uint16_t GetFecSeqNum(); | 52 uint16_t GetNextSeqNum(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 uint32_t min_packet_size_; | 55 uint32_t min_packet_size_; |
| 56 uint32_t max_packet_size_; | 56 uint32_t max_packet_size_; |
| 57 uint32_t ssrc_; | 57 uint32_t ssrc_; |
| 58 Random* random_; | 58 Random* random_; |
| 59 | 59 |
| 60 ForwardErrorCorrection::PacketList media_packets_; | 60 ForwardErrorCorrection::PacketList media_packets_; |
| 61 uint16_t fec_seq_num_; | 61 uint16_t next_seq_num_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // This class generates media packets with a certain structure of the payload. | 64 // This class generates media packets with a certain structure of the payload. |
| 65 class AugmentedPacketGenerator { | 65 class AugmentedPacketGenerator { |
| 66 public: | 66 public: |
| 67 explicit AugmentedPacketGenerator(uint32_t ssrc); | 67 explicit AugmentedPacketGenerator(uint32_t ssrc); |
| 68 | 68 |
| 69 // Prepare for generating a new set of packets, corresponding to a frame. | 69 // Prepare for generating a new set of packets, corresponding to a frame. |
| 70 void NewFrame(size_t num_packets); | 70 void NewFrame(size_t num_packets); |
| 71 | 71 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 static void SetRedHeader(uint8_t payload_type, | 125 static void SetRedHeader(uint8_t payload_type, |
| 126 size_t header_length, | 126 size_t header_length, |
| 127 AugmentedPacket* red_packet); | 127 AugmentedPacket* red_packet); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace fec | 130 } // namespace fec |
| 131 } // namespace test | 131 } // namespace test |
| 132 } // namespace webrtc | 132 } // namespace webrtc |
| 133 | 133 |
| 134 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_TEST_HELPER_H_ | 134 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_TEST_HELPER_H_ |
| OLD | NEW |