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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.h

Issue 2708873003: Propagate packet pacing information to SendTimeHistory. (Closed)
Patch Set: TransportFeedbackAdapterTest fix. Created 3 years, 10 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) 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // RTP header extension 117 // RTP header extension
118 int32_t RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id); 118 int32_t RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id);
119 bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) const; 119 bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) const;
120 int32_t DeregisterRtpHeaderExtension(RTPExtensionType type); 120 int32_t DeregisterRtpHeaderExtension(RTPExtensionType type);
121 121
122 bool TimeToSendPacket(uint32_t ssrc, 122 bool TimeToSendPacket(uint32_t ssrc,
123 uint16_t sequence_number, 123 uint16_t sequence_number,
124 int64_t capture_time_ms, 124 int64_t capture_time_ms,
125 bool retransmission, 125 bool retransmission,
126 int probe_cluster_id); 126 const PacedPacketInfo& pacing_info);
127 size_t TimeToSendPadding(size_t bytes, int probe_cluster_id); 127 size_t TimeToSendPadding(size_t bytes, const PacedPacketInfo& pacing_info);
128 128
129 // NACK. 129 // NACK.
130 int SelectiveRetransmissions() const; 130 int SelectiveRetransmissions() const;
131 int SetSelectiveRetransmissions(uint8_t settings); 131 int SetSelectiveRetransmissions(uint8_t settings);
132 void OnReceivedNack(const std::vector<uint16_t>& nack_sequence_numbers, 132 void OnReceivedNack(const std::vector<uint16_t>& nack_sequence_numbers,
133 int64_t avg_rtt); 133 int64_t avg_rtt);
134 134
135 void SetStorePacketsStatus(bool enable, uint16_t number_to_store); 135 void SetStorePacketsStatus(bool enable, uint16_t number_to_store);
136 136
137 bool StorePackets() const; 137 bool StorePackets() const;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 protected: 208 protected:
209 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type); 209 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type);
210 210
211 private: 211 private:
212 // Maps capture time in milliseconds to send-side delay in milliseconds. 212 // Maps capture time in milliseconds to send-side delay in milliseconds.
213 // Send-side delay is the difference between transmission time and capture 213 // Send-side delay is the difference between transmission time and capture
214 // time. 214 // time.
215 typedef std::map<int64_t, int> SendDelayMap; 215 typedef std::map<int64_t, int> SendDelayMap;
216 216
217 size_t SendPadData(size_t bytes, int probe_cluster_id); 217 size_t SendPadData(size_t bytes, const PacedPacketInfo& pacing_info);
218 218
219 bool PrepareAndSendPacket(std::unique_ptr<RtpPacketToSend> packet, 219 bool PrepareAndSendPacket(std::unique_ptr<RtpPacketToSend> packet,
220 bool send_over_rtx, 220 bool send_over_rtx,
221 bool is_retransmit, 221 bool is_retransmit,
222 int probe_cluster_id); 222 const PacedPacketInfo& pacing_info);
223 223
224 // Return the number of bytes sent. Note that both of these functions may 224 // Return the number of bytes sent. Note that both of these functions may
225 // return a larger value that their argument. 225 // return a larger value that their argument.
226 size_t TrySendRedundantPayloads(size_t bytes, int probe_cluster_id); 226 size_t TrySendRedundantPayloads(size_t bytes,
227 const PacedPacketInfo& pacing_info);
227 228
228 std::unique_ptr<RtpPacketToSend> BuildRtxPacket( 229 std::unique_ptr<RtpPacketToSend> BuildRtxPacket(
229 const RtpPacketToSend& packet); 230 const RtpPacketToSend& packet);
230 231
231 bool SendPacketToNetwork(const RtpPacketToSend& packet, 232 bool SendPacketToNetwork(const RtpPacketToSend& packet,
232 const PacketOptions& options); 233 const PacketOptions& options);
233 234
234 void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms); 235 void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms);
235 void UpdateOnSendPacket(int packet_id, 236 void UpdateOnSendPacket(int packet_id,
236 int64_t capture_time_ms, 237 int64_t capture_time_ms,
237 uint32_t ssrc); 238 uint32_t ssrc);
238 239
239 bool UpdateTransportSequenceNumber(RtpPacketToSend* packet, 240 bool UpdateTransportSequenceNumber(RtpPacketToSend* packet,
240 int* packet_id) const; 241 int* packet_id) const;
241 242
242 void UpdateRtpStats(const RtpPacketToSend& packet, 243 void UpdateRtpStats(const RtpPacketToSend& packet,
243 bool is_rtx, 244 bool is_rtx,
244 bool is_retransmit); 245 bool is_retransmit);
245 bool IsFecPacket(const RtpPacketToSend& packet) const; 246 bool IsFecPacket(const RtpPacketToSend& packet) const;
246 247
247 void AddPacketToTransportFeedback(uint16_t packet_id, 248 void AddPacketToTransportFeedback(uint16_t packet_id,
248 const RtpPacketToSend& packet, 249 const RtpPacketToSend& packet,
249 int probe_cluster_id); 250 const PacedPacketInfo& pacing_info);
250 251
251 void UpdateRtpOverhead(const RtpPacketToSend& packet); 252 void UpdateRtpOverhead(const RtpPacketToSend& packet);
252 253
253 Clock* const clock_; 254 Clock* const clock_;
254 const int64_t clock_delta_ms_; 255 const int64_t clock_delta_ms_;
255 Random random_ GUARDED_BY(send_critsect_); 256 Random random_ GUARDED_BY(send_critsect_);
256 257
257 const bool audio_configured_; 258 const bool audio_configured_;
258 const std::unique_ptr<RTPSenderAudio> audio_; 259 const std::unique_ptr<RTPSenderAudio> audio_;
259 const std::unique_ptr<RTPSenderVideo> video_; 260 const std::unique_ptr<RTPSenderVideo> video_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 OverheadObserver* overhead_observer_; 325 OverheadObserver* overhead_observer_;
325 326
326 const bool send_side_bwe_with_overhead_; 327 const bool send_side_bwe_with_overhead_;
327 328
328 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); 329 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
329 }; 330 };
330 331
331 } // namespace webrtc 332 } // namespace webrtc
332 333
333 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 334 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698