OLD | NEW |
---|---|
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 int64_t send_time_ms; | 304 int64_t send_time_ms; |
305 // Packet identifier, incremented with 1 for every packet generated by the | 305 // Packet identifier, incremented with 1 for every packet generated by the |
306 // sender. | 306 // sender. |
307 uint16_t sequence_number; | 307 uint16_t sequence_number; |
308 // Size of the packet excluding RTP headers. | 308 // Size of the packet excluding RTP headers. |
309 size_t payload_size; | 309 size_t payload_size; |
310 // Pacing information about this packet. | 310 // Pacing information about this packet. |
311 PacedPacketInfo pacing_info; | 311 PacedPacketInfo pacing_info; |
312 }; | 312 }; |
313 | 313 |
314 // Records when a packet was sent, according to its transport sequence number. | |
315 struct SentTransportPacketRecord { | |
minyue-webrtc
2017/03/15 10:54:13
I don't see the need of this struct, because first
elad.alon_webrtc.org
2017/03/16 18:37:35
This was necessary when the design was to keep the
| |
316 uint16_t sequence_number; | |
317 int64_t sent_time_ms; | |
318 }; | |
319 | |
320 // TODO(elad.alon): The only implementers of this interface are | |
minyue-webrtc
2017/03/15 10:54:13
I think this comment should be placed above Transp
elad.alon_webrtc.org
2017/03/16 18:37:35
1. I've reworded to begin with the action, then pr
minyue-webrtc
2017/03/17 09:20:31
Not a big deal. And it will be more weird to talk
elad.alon_webrtc.org
2017/03/17 10:10:32
I think I see the source of the misunderstanding.
| |
321 // CongestionController and TransportFeedbackProxy. | |
322 // CongestionController uses it to expose only a small subset of its | |
323 // capabilities. | |
324 // TransportFeedbackProxy is a temporary solution which exists to allow passing | |
325 // the CongestionController down at a later stage. | |
326 // Ideally, we'd get rid of this altogether, exposing CC. This will be done | |
327 // after the order-of-creation issues have been resolved, and | |
328 // TransportFeedbackProxy therefore removed. Then, we'll remove | |
329 // TransportFeedbackAdapterObserver, reuse the name | |
330 // TransportFeedbackObserver for TransportFeedbackAdapterObserver, and only | |
331 // have one observer. | |
314 class TransportFeedbackObserver { | 332 class TransportFeedbackObserver { |
315 public: | 333 public: |
316 TransportFeedbackObserver() {} | 334 TransportFeedbackObserver() {} |
317 virtual ~TransportFeedbackObserver() {} | 335 virtual ~TransportFeedbackObserver() {} |
318 | 336 |
319 // Note: Transport-wide sequence number as sequence number. | 337 // Note: Transport-wide sequence number as sequence number. |
320 virtual void AddPacket(uint16_t sequence_number, | 338 virtual void AddPacket(uint32_t ssrc, |
339 uint16_t sequence_number, | |
321 size_t length, | 340 size_t length, |
322 const PacedPacketInfo& pacing_info) = 0; | 341 const PacedPacketInfo& pacing_info) = 0; |
323 | 342 |
324 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; | 343 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; |
325 | 344 |
326 virtual std::vector<PacketFeedback> GetTransportFeedbackVector() const = 0; | 345 virtual std::vector<PacketFeedback> GetTransportFeedbackVector() const = 0; |
327 }; | 346 }; |
328 | 347 |
348 // See TODO above TransportFeedbackObserver for explanation of the difference | |
349 // between these two. | |
350 class TransportFeedbackAdapterObserver { | |
351 public: | |
352 virtual ~TransportFeedbackAdapterObserver() = default; | |
353 | |
354 virtual void OnPacketAdded(uint32_t ssrc, uint16_t seq_num) = 0; | |
355 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; | |
356 }; | |
357 | |
329 class RtcpRttStats { | 358 class RtcpRttStats { |
330 public: | 359 public: |
331 virtual void OnRttUpdate(int64_t rtt) = 0; | 360 virtual void OnRttUpdate(int64_t rtt) = 0; |
332 | 361 |
333 virtual int64_t LastProcessedRtt() const = 0; | 362 virtual int64_t LastProcessedRtt() const = 0; |
334 | 363 |
335 virtual ~RtcpRttStats() {} | 364 virtual ~RtcpRttStats() {} |
336 }; | 365 }; |
337 | 366 |
338 // Null object version of RtpFeedback. | 367 // Null object version of RtpFeedback. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 class TransportSequenceNumberAllocator { | 436 class TransportSequenceNumberAllocator { |
408 public: | 437 public: |
409 TransportSequenceNumberAllocator() {} | 438 TransportSequenceNumberAllocator() {} |
410 virtual ~TransportSequenceNumberAllocator() {} | 439 virtual ~TransportSequenceNumberAllocator() {} |
411 | 440 |
412 virtual uint16_t AllocateSequenceNumber() = 0; | 441 virtual uint16_t AllocateSequenceNumber() = 0; |
413 }; | 442 }; |
414 | 443 |
415 } // namespace webrtc | 444 } // namespace webrtc |
416 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 445 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
OLD | NEW |