Chromium Code Reviews

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

Issue 2710093004: Rename webrtc::PacketInfo to webrtc::PacketFeedback (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 226 matching lines...)
237 virtual void OnReceivedEstimatedBitrate(uint32_t bitrate) = 0; 237 virtual void OnReceivedEstimatedBitrate(uint32_t bitrate) = 0;
238 238
239 virtual void OnReceivedRtcpReceiverReport( 239 virtual void OnReceivedRtcpReceiverReport(
240 const ReportBlockList& report_blocks, 240 const ReportBlockList& report_blocks,
241 int64_t rtt, 241 int64_t rtt,
242 int64_t now_ms) = 0; 242 int64_t now_ms) = 0;
243 243
244 virtual ~RtcpBandwidthObserver() {} 244 virtual ~RtcpBandwidthObserver() {}
245 }; 245 };
246 246
247 struct PacketInfo { 247 struct PacketFeedback {
248 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) 248 PacketFeedback(int64_t arrival_time_ms, uint16_t sequence_number)
249 : PacketInfo(-1, 249 : PacketFeedback(-1,
250 arrival_time_ms, 250 arrival_time_ms,
251 -1, 251 -1,
252 sequence_number, 252 sequence_number,
253 0, 253 0,
254 PacedPacketInfo()) {} 254 PacedPacketInfo()) {}
255 255
256 PacketInfo(int64_t arrival_time_ms, 256 PacketFeedback(int64_t arrival_time_ms,
257 int64_t send_time_ms, 257 int64_t send_time_ms,
258 uint16_t sequence_number, 258 uint16_t sequence_number,
259 size_t payload_size, 259 size_t payload_size,
260 const PacedPacketInfo& pacing_info) 260 const PacedPacketInfo& pacing_info)
261 : PacketInfo(-1, 261 : PacketFeedback(-1,
262 arrival_time_ms, 262 arrival_time_ms,
263 send_time_ms, 263 send_time_ms,
264 sequence_number, 264 sequence_number,
265 payload_size, 265 payload_size,
266 pacing_info) {} 266 pacing_info) {}
267 267
268 PacketInfo(int64_t creation_time_ms, 268 PacketFeedback(int64_t creation_time_ms,
269 int64_t arrival_time_ms, 269 int64_t arrival_time_ms,
270 int64_t send_time_ms, 270 int64_t send_time_ms,
271 uint16_t sequence_number, 271 uint16_t sequence_number,
272 size_t payload_size, 272 size_t payload_size,
273 const PacedPacketInfo& pacing_info) 273 const PacedPacketInfo& pacing_info)
274 : creation_time_ms(creation_time_ms), 274 : creation_time_ms(creation_time_ms),
275 arrival_time_ms(arrival_time_ms), 275 arrival_time_ms(arrival_time_ms),
276 send_time_ms(send_time_ms), 276 send_time_ms(send_time_ms),
277 sequence_number(sequence_number), 277 sequence_number(sequence_number),
278 payload_size(payload_size), 278 payload_size(payload_size),
279 pacing_info(pacing_info) {} 279 pacing_info(pacing_info) {}
280 280
281 static constexpr int kNotAProbe = -1; 281 static constexpr int kNotAProbe = -1;
282 282
283 // NOTE! The variable |creation_time_ms| is not used when testing equality. 283 // NOTE! The variable |creation_time_ms| is not used when testing equality.
284 // This is due to |creation_time_ms| only being used by SendTimeHistory 284 // This is due to |creation_time_ms| only being used by SendTimeHistory
285 // for book-keeping, and is of no interest outside that class. 285 // for book-keeping, and is of no interest outside that class.
286 // TODO(philipel): Remove |creation_time_ms| from PacketInfo when cleaning up 286 // TODO(philipel): Remove |creation_time_ms| from PacketFeedback when cleaning
287 // SendTimeHistory. 287 // up SendTimeHistory.
288 bool operator==(const PacketInfo& rhs) const { 288 bool operator==(const PacketFeedback& rhs) const {
289 return arrival_time_ms == rhs.arrival_time_ms && 289 return arrival_time_ms == rhs.arrival_time_ms &&
290 send_time_ms == rhs.send_time_ms && 290 send_time_ms == rhs.send_time_ms &&
291 sequence_number == rhs.sequence_number && 291 sequence_number == rhs.sequence_number &&
292 payload_size == rhs.payload_size && pacing_info == rhs.pacing_info; 292 payload_size == rhs.payload_size && pacing_info == rhs.pacing_info;
293 } 293 }
294 294
295 // Time corresponding to when this object was created. 295 // Time corresponding to when this object was created.
296 int64_t creation_time_ms; 296 int64_t creation_time_ms;
297 // Time corresponding to when the packet was received. Timestamped with the 297 // Time corresponding to when the packet was received. Timestamped with the
298 // receiver's clock. 298 // receiver's clock.
(...skipping 15 matching lines...)
314 TransportFeedbackObserver() {} 314 TransportFeedbackObserver() {}
315 virtual ~TransportFeedbackObserver() {} 315 virtual ~TransportFeedbackObserver() {}
316 316
317 // Note: Transport-wide sequence number as sequence number. 317 // Note: Transport-wide sequence number as sequence number.
318 virtual void AddPacket(uint16_t sequence_number, 318 virtual void AddPacket(uint16_t sequence_number,
319 size_t length, 319 size_t length,
320 const PacedPacketInfo& pacing_info) = 0; 320 const PacedPacketInfo& pacing_info) = 0;
321 321
322 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; 322 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0;
323 323
324 virtual std::vector<PacketInfo> GetTransportFeedbackVector() const = 0; 324 virtual std::vector<PacketFeedback> GetTransportFeedbackVector() const = 0;
325 }; 325 };
326 326
327 class RtcpRttStats { 327 class RtcpRttStats {
328 public: 328 public:
329 virtual void OnRttUpdate(int64_t rtt) = 0; 329 virtual void OnRttUpdate(int64_t rtt) = 0;
330 330
331 virtual int64_t LastProcessedRtt() const = 0; 331 virtual int64_t LastProcessedRtt() const = 0;
332 332
333 virtual ~RtcpRttStats() {} 333 virtual ~RtcpRttStats() {}
334 }; 334 };
(...skipping 70 matching lines...)
405 class TransportSequenceNumberAllocator { 405 class TransportSequenceNumberAllocator {
406 public: 406 public:
407 TransportSequenceNumberAllocator() {} 407 TransportSequenceNumberAllocator() {}
408 virtual ~TransportSequenceNumberAllocator() {} 408 virtual ~TransportSequenceNumberAllocator() {}
409 409
410 virtual uint16_t AllocateSequenceNumber() = 0; 410 virtual uint16_t AllocateSequenceNumber() = 0;
411 }; 411 };
412 412
413 } // namespace webrtc 413 } // namespace webrtc
414 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ 414 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine