Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: webrtc/modules/rtp_rtcp/include/flexfec_sender.h

Issue 2867713003: Remove hardcoded kValueSizeBytes values from variable-length header extensions. (Closed)
Patch Set: Patch 1 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // These FEC packets are then obtained by calling GetFecPackets(). 52 // These FEC packets are then obtained by calling GetFecPackets().
53 // Returns true if the media packet was successfully added. 53 // Returns true if the media packet was successfully added.
54 bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet); 54 bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet);
55 55
56 // Returns true if there are generated FEC packets available. 56 // Returns true if there are generated FEC packets available.
57 bool FecAvailable() const; 57 bool FecAvailable() const;
58 58
59 // Returns generated FlexFEC packets. 59 // Returns generated FlexFEC packets.
60 std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets(); 60 std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets();
61 61
62 // Returns the overhead, per packet, for FlexFEC. 62 // Returns the overhead, per packet, for FlexFEC. |extension_sizes| is used
63 size_t MaxPacketOverhead() const; 63 // to calculate the RTP header extension overhead and it should have an entry
64 // for each extension that a packet might use. If only fixed-length extensions
65 // are used, |extension_sizes| should be the same at each call.
66 size_t MaxPacketOverhead(
67 rtc::ArrayView<const RtpExtensionSize> extension_sizes) const;
64 68
65 private: 69 private:
66 // Utility. 70 // Utility.
67 Clock* const clock_; 71 Clock* const clock_;
68 Random random_; 72 Random random_;
69 int64_t last_generated_packet_ms_; 73 int64_t last_generated_packet_ms_;
70 74
71 // Config. 75 // Config.
72 const int payload_type_; 76 const int payload_type_;
73 const uint32_t timestamp_offset_; 77 const uint32_t timestamp_offset_;
74 const uint32_t ssrc_; 78 const uint32_t ssrc_;
75 const uint32_t protected_media_ssrc_; 79 const uint32_t protected_media_ssrc_;
76 // Sequence number of next packet to generate. 80 // Sequence number of next packet to generate.
77 uint16_t seq_num_; 81 uint16_t seq_num_;
78 82
79 // Implementation. 83 // Implementation.
80 UlpfecGenerator ulpfec_generator_; 84 UlpfecGenerator ulpfec_generator_;
81 const RtpHeaderExtensionMap rtp_header_extension_map_; 85 const RtpHeaderExtensionMap rtp_header_extension_map_;
82 }; 86 };
83 87
84 } // namespace webrtc 88 } // namespace webrtc
85 89
86 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ 90 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('j') | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698