Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 | 50 |
| 51 // Returns true if there are generated FEC packets available. | 51 // Returns true if there are generated FEC packets available. |
| 52 bool FecAvailable() const; | 52 bool FecAvailable() const; |
| 53 | 53 |
| 54 // Returns generated FlexFEC packets. | 54 // Returns generated FlexFEC packets. |
| 55 std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets(); | 55 std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets(); |
| 56 | 56 |
| 57 // Returns the overhead, per packet, for FlexFEC. | 57 // Returns the overhead, per packet, for FlexFEC. |
| 58 size_t MaxPacketOverhead() const; | 58 size_t MaxPacketOverhead() const; |
| 59 | 59 |
| 60 size_t RtpHeaderLength() const { return rtp_header_length_; } | |
|
danilchap
2016/11/09 16:23:47
might as well include rtp header extension size in
brandtr
2016/11/10 09:32:01
This made things much cleaner. Done.
| |
| 61 | |
| 60 private: | 62 private: |
| 61 // Utility. | 63 // Utility. |
| 62 Clock* const clock_; | 64 Clock* const clock_; |
| 63 Random random_ GUARDED_BY(sequence_checker_); | 65 Random random_ GUARDED_BY(sequence_checker_); |
| 64 int64_t last_generated_packet_ms_ GUARDED_BY(sequence_checker_); | 66 int64_t last_generated_packet_ms_ GUARDED_BY(sequence_checker_); |
| 65 rtc::SequencedTaskChecker sequence_checker_; | 67 rtc::SequencedTaskChecker sequence_checker_; |
| 66 | 68 |
| 67 // Config. | 69 // Config. |
| 68 const int payload_type_; | 70 const int payload_type_; |
| 69 const uint32_t timestamp_offset_; | 71 const uint32_t timestamp_offset_; |
| 70 const uint32_t ssrc_; | 72 const uint32_t ssrc_; |
| 71 const uint32_t protected_media_ssrc_; | 73 const uint32_t protected_media_ssrc_; |
| 72 // Sequence number of next packet to generate. | 74 // Sequence number of next packet to generate. |
| 73 uint16_t seq_num_ GUARDED_BY(sequence_checker_); | 75 uint16_t seq_num_ GUARDED_BY(sequence_checker_); |
| 74 | 76 |
| 75 // Implementation. | 77 // Implementation. |
| 78 size_t rtp_header_length_; | |
| 76 UlpfecGenerator ulpfec_generator_ GUARDED_BY(sequence_checker_); | 79 UlpfecGenerator ulpfec_generator_ GUARDED_BY(sequence_checker_); |
| 77 RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(sequence_checker_); | 80 RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(sequence_checker_); |
| 78 }; | 81 }; |
| 79 | 82 |
| 80 } // namespace webrtc | 83 } // namespace webrtc |
| 81 | 84 |
| 82 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | 85 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ |
| OLD | NEW |