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

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

Issue 2061193002: Remove audio/video distinction for probe packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + feedback 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 virtual ~RtcpBandwidthObserver() {} 244 virtual ~RtcpBandwidthObserver() {}
245 }; 245 };
246 246
247 struct PacketInfo { 247 struct PacketInfo {
248 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) 248 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number)
249 : PacketInfo(-1, 249 : PacketInfo(-1,
250 arrival_time_ms, 250 arrival_time_ms,
251 -1, 251 -1,
252 sequence_number, 252 sequence_number,
253 0, 253 0,
254 false,
255 kNotAProbe) {} 254 kNotAProbe) {}
256 255
257 PacketInfo(int64_t arrival_time_ms, 256 PacketInfo(int64_t arrival_time_ms,
258 int64_t send_time_ms, 257 int64_t send_time_ms,
259 uint16_t sequence_number, 258 uint16_t sequence_number,
260 size_t payload_size, 259 size_t payload_size,
261 bool was_paced,
262 int probe_cluster_id) 260 int probe_cluster_id)
263 : PacketInfo(-1, 261 : PacketInfo(-1,
264 arrival_time_ms, 262 arrival_time_ms,
265 send_time_ms, 263 send_time_ms,
266 sequence_number, 264 sequence_number,
267 payload_size, 265 payload_size,
268 was_paced,
269 probe_cluster_id) {} 266 probe_cluster_id) {}
270 267
271 PacketInfo(int64_t creation_time_ms, 268 PacketInfo(int64_t creation_time_ms,
272 int64_t arrival_time_ms, 269 int64_t arrival_time_ms,
273 int64_t send_time_ms, 270 int64_t send_time_ms,
274 uint16_t sequence_number, 271 uint16_t sequence_number,
275 size_t payload_size, 272 size_t payload_size,
276 bool was_paced,
277 int probe_cluster_id) 273 int probe_cluster_id)
278 : creation_time_ms(creation_time_ms), 274 : creation_time_ms(creation_time_ms),
279 arrival_time_ms(arrival_time_ms), 275 arrival_time_ms(arrival_time_ms),
280 send_time_ms(send_time_ms), 276 send_time_ms(send_time_ms),
281 sequence_number(sequence_number), 277 sequence_number(sequence_number),
282 payload_size(payload_size), 278 payload_size(payload_size),
283 was_paced(was_paced),
284 probe_cluster_id(probe_cluster_id) {} 279 probe_cluster_id(probe_cluster_id) {}
285 280
286 static constexpr int kNotAProbe = -1; 281 static constexpr int kNotAProbe = -1;
287 282
288 // Time corresponding to when this object was created. 283 // Time corresponding to when this object was created.
289 int64_t creation_time_ms; 284 int64_t creation_time_ms;
290 // Time corresponding to when the packet was received. Timestamped with the 285 // Time corresponding to when the packet was received. Timestamped with the
291 // receiver's clock. 286 // receiver's clock.
292 int64_t arrival_time_ms; 287 int64_t arrival_time_ms;
293 // Time corresponding to when the packet was sent, timestamped with the 288 // Time corresponding to when the packet was sent, timestamped with the
294 // sender's clock. 289 // sender's clock.
295 int64_t send_time_ms; 290 int64_t send_time_ms;
296 // Packet identifier, incremented with 1 for every packet generated by the 291 // Packet identifier, incremented with 1 for every packet generated by the
297 // sender. 292 // sender.
298 uint16_t sequence_number; 293 uint16_t sequence_number;
299 // Size of the packet excluding RTP headers. 294 // Size of the packet excluding RTP headers.
300 size_t payload_size; 295 size_t payload_size;
301 // True if the packet was paced out by the pacer.
302 bool was_paced;
303 // Which probing cluster this packets belongs to. 296 // Which probing cluster this packets belongs to.
304 int probe_cluster_id; 297 int probe_cluster_id;
305 }; 298 };
306 299
307 class TransportFeedbackObserver { 300 class TransportFeedbackObserver {
308 public: 301 public:
309 TransportFeedbackObserver() {} 302 TransportFeedbackObserver() {}
310 virtual ~TransportFeedbackObserver() {} 303 virtual ~TransportFeedbackObserver() {}
311 304
312 // Note: Transport-wide sequence number as sequence number. Arrival time 305 // Note: Transport-wide sequence number as sequence number. Arrival time
313 // must be set to 0. 306 // must be set to 0.
314 virtual void AddPacket(uint16_t sequence_number, 307 virtual void AddPacket(uint16_t sequence_number,
315 size_t length, 308 size_t length,
316 bool was_paced,
317 int probe_cluster_id) = 0; 309 int probe_cluster_id) = 0;
318 310
319 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; 311 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0;
320 }; 312 };
321 313
322 class RtcpRttStats { 314 class RtcpRttStats {
323 public: 315 public:
324 virtual void OnRttUpdate(int64_t rtt) = 0; 316 virtual void OnRttUpdate(int64_t rtt) = 0;
325 317
326 virtual int64_t LastProcessedRtt() const = 0; 318 virtual int64_t LastProcessedRtt() const = 0;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 class TransportSequenceNumberAllocator { 392 class TransportSequenceNumberAllocator {
401 public: 393 public:
402 TransportSequenceNumberAllocator() {} 394 TransportSequenceNumberAllocator() {}
403 virtual ~TransportSequenceNumberAllocator() {} 395 virtual ~TransportSequenceNumberAllocator() {}
404 396
405 virtual uint16_t AllocateSequenceNumber() = 0; 397 virtual uint16_t AllocateSequenceNumber() = 0;
406 }; 398 };
407 399
408 } // namespace webrtc 400 } // namespace webrtc
409 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ 401 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698