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

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

Issue 2005313003: Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Test probe_cluster_id in PacketRouterTest. Created 4 years, 6 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 virtual void OnReceivedRtcpReceiverReport( 238 virtual void OnReceivedRtcpReceiverReport(
239 const ReportBlockList& report_blocks, 239 const ReportBlockList& report_blocks,
240 int64_t rtt, 240 int64_t rtt,
241 int64_t now_ms) = 0; 241 int64_t now_ms) = 0;
242 242
243 virtual ~RtcpBandwidthObserver() {} 243 virtual ~RtcpBandwidthObserver() {}
244 }; 244 };
245 245
246 struct PacketInfo { 246 struct PacketInfo {
247 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) 247 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number)
248 : PacketInfo(-1, arrival_time_ms, -1, sequence_number, 0, false) {} 248 : PacketInfo(-1,
249 arrival_time_ms,
250 -1,
251 sequence_number,
252 0,
253 false,
254 kNotAProbe) {}
249 255
250 PacketInfo(int64_t arrival_time_ms, 256 PacketInfo(int64_t arrival_time_ms,
251 int64_t send_time_ms, 257 int64_t send_time_ms,
252 uint16_t sequence_number, 258 uint16_t sequence_number,
253 size_t payload_size, 259 size_t payload_size,
254 bool was_paced) 260 bool was_paced,
261 int probe_cluster_id)
255 : PacketInfo(-1, 262 : PacketInfo(-1,
256 arrival_time_ms, 263 arrival_time_ms,
257 send_time_ms, 264 send_time_ms,
258 sequence_number, 265 sequence_number,
259 payload_size, 266 payload_size,
260 was_paced) {} 267 was_paced,
268 probe_cluster_id) {}
261 269
262 PacketInfo(int64_t creation_time_ms, 270 PacketInfo(int64_t creation_time_ms,
263 int64_t arrival_time_ms, 271 int64_t arrival_time_ms,
264 int64_t send_time_ms, 272 int64_t send_time_ms,
265 uint16_t sequence_number, 273 uint16_t sequence_number,
266 size_t payload_size, 274 size_t payload_size,
267 bool was_paced) 275 bool was_paced,
276 int probe_cluster_id)
268 : creation_time_ms(creation_time_ms), 277 : creation_time_ms(creation_time_ms),
269 arrival_time_ms(arrival_time_ms), 278 arrival_time_ms(arrival_time_ms),
270 send_time_ms(send_time_ms), 279 send_time_ms(send_time_ms),
271 sequence_number(sequence_number), 280 sequence_number(sequence_number),
272 payload_size(payload_size), 281 payload_size(payload_size),
273 was_paced(was_paced) {} 282 was_paced(was_paced),
283 probe_cluster_id(probe_cluster_id) {}
284
285 static constexpr int kNotAProbe = -1;
274 286
275 // Time corresponding to when this object was created. 287 // Time corresponding to when this object was created.
276 int64_t creation_time_ms; 288 int64_t creation_time_ms;
277 // Time corresponding to when the packet was received. Timestamped with the 289 // Time corresponding to when the packet was received. Timestamped with the
278 // receiver's clock. 290 // receiver's clock.
279 int64_t arrival_time_ms; 291 int64_t arrival_time_ms;
280 // Time corresponding to when the packet was sent, timestamped with the 292 // Time corresponding to when the packet was sent, timestamped with the
281 // sender's clock. 293 // sender's clock.
282 int64_t send_time_ms; 294 int64_t send_time_ms;
283 // Packet identifier, incremented with 1 for every packet generated by the 295 // Packet identifier, incremented with 1 for every packet generated by the
284 // sender. 296 // sender.
285 uint16_t sequence_number; 297 uint16_t sequence_number;
286 // Size of the packet excluding RTP headers. 298 // Size of the packet excluding RTP headers.
287 size_t payload_size; 299 size_t payload_size;
288 // True if the packet was paced out by the pacer. 300 // True if the packet was paced out by the pacer.
289 bool was_paced; 301 bool was_paced;
302 // Which probing cluster this packets belongs to.
303 int probe_cluster_id;
290 }; 304 };
291 305
292 class TransportFeedbackObserver { 306 class TransportFeedbackObserver {
293 public: 307 public:
294 TransportFeedbackObserver() {} 308 TransportFeedbackObserver() {}
295 virtual ~TransportFeedbackObserver() {} 309 virtual ~TransportFeedbackObserver() {}
296 310
297 // Note: Transport-wide sequence number as sequence number. Arrival time 311 // Note: Transport-wide sequence number as sequence number. Arrival time
298 // must be set to 0. 312 // must be set to 0.
299 virtual void AddPacket(uint16_t sequence_number, 313 virtual void AddPacket(uint16_t sequence_number,
300 size_t length, 314 size_t length,
301 bool was_paced) = 0; 315 bool was_paced,
316 int probe_cluster_id) = 0;
302 317
303 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; 318 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0;
304 }; 319 };
305 320
306 class RtcpRttStats { 321 class RtcpRttStats {
307 public: 322 public:
308 virtual void OnRttUpdate(int64_t rtt) = 0; 323 virtual void OnRttUpdate(int64_t rtt) = 0;
309 324
310 virtual int64_t LastProcessedRtt() const = 0; 325 virtual int64_t LastProcessedRtt() const = 0;
311 326
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 class TransportSequenceNumberAllocator { 399 class TransportSequenceNumberAllocator {
385 public: 400 public:
386 TransportSequenceNumberAllocator() {} 401 TransportSequenceNumberAllocator() {}
387 virtual ~TransportSequenceNumberAllocator() {} 402 virtual ~TransportSequenceNumberAllocator() {}
388 403
389 virtual uint16_t AllocateSequenceNumber() = 0; 404 virtual uint16_t AllocateSequenceNumber() = 0;
390 }; 405 };
391 406
392 } // namespace webrtc 407 } // namespace webrtc
393 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ 408 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698