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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 bool media_has_been_sent; | 188 bool media_has_been_sent; |
189 }; | 189 }; |
190 | 190 |
191 class RtpData { | 191 class RtpData { |
192 public: | 192 public: |
193 virtual ~RtpData() {} | 193 virtual ~RtpData() {} |
194 | 194 |
195 virtual int32_t OnReceivedPayloadData(const uint8_t* payload_data, | 195 virtual int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
196 size_t payload_size, | 196 size_t payload_size, |
197 const WebRtcRTPHeader* rtp_header) = 0; | 197 const WebRtcRTPHeader* rtp_header) = 0; |
| 198 }; |
198 | 199 |
199 virtual bool OnRecoveredPacket(const uint8_t* packet, | 200 // Callback interface for packets recovered by FlexFEC or ULPFEC. In |
200 size_t packet_length) = 0; | 201 // the FlexFEC case, the implementation should be able to demultiplex |
| 202 // the recovered RTP packets based on SSRC. |
| 203 class RecoveredPacketReceiver { |
| 204 public: |
| 205 virtual void OnRecoveredPacket(const uint8_t* packet, size_t length) = 0; |
| 206 |
| 207 protected: |
| 208 virtual ~RecoveredPacketReceiver() = default; |
201 }; | 209 }; |
202 | 210 |
203 class RtpFeedback { | 211 class RtpFeedback { |
204 public: | 212 public: |
205 virtual ~RtpFeedback() {} | 213 virtual ~RtpFeedback() {} |
206 | 214 |
207 // Receiving payload change or SSRC change. (return success!) | 215 // Receiving payload change or SSRC change. (return success!) |
208 /* | 216 /* |
209 * channels - number of channels in codec (1 = mono, 2 = stereo) | 217 * channels - number of channels in codec (1 = mono, 2 = stereo) |
210 */ | 218 */ |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // Null object version of RtpData. | 401 // Null object version of RtpData. |
394 class NullRtpData : public RtpData { | 402 class NullRtpData : public RtpData { |
395 public: | 403 public: |
396 virtual ~NullRtpData() {} | 404 virtual ~NullRtpData() {} |
397 | 405 |
398 int32_t OnReceivedPayloadData(const uint8_t* payload_data, | 406 int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
399 size_t payload_size, | 407 size_t payload_size, |
400 const WebRtcRTPHeader* rtp_header) override { | 408 const WebRtcRTPHeader* rtp_header) override { |
401 return 0; | 409 return 0; |
402 } | 410 } |
403 | |
404 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override { | |
405 return true; | |
406 } | |
407 }; | 411 }; |
408 | 412 |
409 // Statistics about packet loss for a single directional connection. All values | 413 // Statistics about packet loss for a single directional connection. All values |
410 // are totals since the connection initiated. | 414 // are totals since the connection initiated. |
411 struct RtpPacketLossStats { | 415 struct RtpPacketLossStats { |
412 // The number of packets lost in events where no adjacent packets were also | 416 // The number of packets lost in events where no adjacent packets were also |
413 // lost. | 417 // lost. |
414 uint64_t single_packet_loss_count; | 418 uint64_t single_packet_loss_count; |
415 // The number of events in which more than one adjacent packet was lost. | 419 // The number of events in which more than one adjacent packet was lost. |
416 uint64_t multiple_packet_loss_event_count; | 420 uint64_t multiple_packet_loss_event_count; |
(...skipping 28 matching lines...) Expand all Loading... |
445 class TransportSequenceNumberAllocator { | 449 class TransportSequenceNumberAllocator { |
446 public: | 450 public: |
447 TransportSequenceNumberAllocator() {} | 451 TransportSequenceNumberAllocator() {} |
448 virtual ~TransportSequenceNumberAllocator() {} | 452 virtual ~TransportSequenceNumberAllocator() {} |
449 | 453 |
450 virtual uint16_t AllocateSequenceNumber() = 0; | 454 virtual uint16_t AllocateSequenceNumber() = 0; |
451 }; | 455 }; |
452 | 456 |
453 } // namespace webrtc | 457 } // namespace webrtc |
454 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 458 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
OLD | NEW |