OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 13 matching lines...) Expand all Loading... |
24 first_packet_time_ms(-1) {} | 24 first_packet_time_ms(-1) {} |
25 | 25 |
26 size_t num_packets; // Number of received packets. | 26 size_t num_packets; // Number of received packets. |
27 size_t num_fec_packets; // Number of received FEC packets. | 27 size_t num_fec_packets; // Number of received FEC packets. |
28 size_t num_recovered_packets; // Number of recovered media packets using FEC. | 28 size_t num_recovered_packets; // Number of recovered media packets using FEC. |
29 int64_t first_packet_time_ms; // Time when first packet is received. | 29 int64_t first_packet_time_ms; // Time when first packet is received. |
30 }; | 30 }; |
31 | 31 |
32 class UlpfecReceiver { | 32 class UlpfecReceiver { |
33 public: | 33 public: |
34 static UlpfecReceiver* Create(RecoveredPacketReceiver* callback); | 34 static UlpfecReceiver* Create(uint32_t ssrc, |
| 35 RecoveredPacketReceiver* callback); |
35 | 36 |
36 virtual ~UlpfecReceiver() {} | 37 virtual ~UlpfecReceiver() {} |
37 | 38 |
38 // Takes a RED packet, strips the RED header, and adds the resulting | 39 // Takes a RED packet, strips the RED header, and adds the resulting |
39 // "virtual" RTP packet(s) into the internal buffer. | 40 // "virtual" RTP packet(s) into the internal buffer. |
40 // | 41 // |
41 // TODO(brandtr): Set |ulpfec_payload_type| during constructor call, | 42 // TODO(brandtr): Set |ulpfec_payload_type| during constructor call, |
42 // rather than as a parameter here. | 43 // rather than as a parameter here. |
43 virtual int32_t AddReceivedRedPacket(const RTPHeader& rtp_header, | 44 virtual int32_t AddReceivedRedPacket(const RTPHeader& rtp_header, |
44 const uint8_t* incoming_rtp_packet, | 45 const uint8_t* incoming_rtp_packet, |
45 size_t packet_length, | 46 size_t packet_length, |
46 uint8_t ulpfec_payload_type) = 0; | 47 uint8_t ulpfec_payload_type) = 0; |
47 | 48 |
48 // Sends the received packets to the FEC and returns all packets | 49 // Sends the received packets to the FEC and returns all packets |
49 // (both original media and recovered) through the callback. | 50 // (both original media and recovered) through the callback. |
50 virtual int32_t ProcessReceivedFec() = 0; | 51 virtual int32_t ProcessReceivedFec() = 0; |
51 | 52 |
52 // Returns a counter describing the added and recovered packets. | 53 // Returns a counter describing the added and recovered packets. |
53 virtual FecPacketCounter GetPacketCounter() const = 0; | 54 virtual FecPacketCounter GetPacketCounter() const = 0; |
54 }; | 55 }; |
55 } // namespace webrtc | 56 } // namespace webrtc |
56 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_ULPFEC_RECEIVER_H_ | 57 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_ULPFEC_RECEIVER_H_ |
OLD | NEW |