OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ |
13 | 13 |
14 #include <deque> | 14 #include <deque> |
| 15 #include <memory> |
15 #include <vector> | 16 #include <vector> |
16 | 17 |
17 #include "webrtc/base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/modules/include/module_common_types.h" | 19 #include "webrtc/modules/include/module_common_types.h" |
19 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" |
20 | 21 |
21 namespace webrtc { | 22 namespace webrtc { |
22 namespace rtcp { | 23 namespace rtcp { |
23 | 24 |
24 class PacketStatusChunk; | 25 class PacketStatusChunk; |
(...skipping 26 matching lines...) Expand all Loading... |
51 // Convenience method for getting all deltas as microseconds. The first delta | 52 // Convenience method for getting all deltas as microseconds. The first delta |
52 // is relative the base time. | 53 // is relative the base time. |
53 std::vector<int64_t> GetReceiveDeltasUs() const; | 54 std::vector<int64_t> GetReceiveDeltasUs() const; |
54 | 55 |
55 uint32_t GetPacketSenderSsrc() const; | 56 uint32_t GetPacketSenderSsrc() const; |
56 uint32_t GetMediaSourceSsrc() const; | 57 uint32_t GetMediaSourceSsrc() const; |
57 static const int kDeltaScaleFactor = 250; // Convert to multiples of 0.25ms. | 58 static const int kDeltaScaleFactor = 250; // Convert to multiples of 0.25ms. |
58 static const uint8_t kFeedbackMessageType = 15; // TODO(sprang): IANA reg? | 59 static const uint8_t kFeedbackMessageType = 15; // TODO(sprang): IANA reg? |
59 static const uint8_t kPayloadType = 205; // RTPFB, see RFC4585. | 60 static const uint8_t kPayloadType = 205; // RTPFB, see RFC4585. |
60 | 61 |
61 static rtc::scoped_ptr<TransportFeedback> ParseFrom(const uint8_t* buffer, | 62 static std::unique_ptr<TransportFeedback> ParseFrom(const uint8_t* buffer, |
62 size_t length); | 63 size_t length); |
63 | 64 |
64 protected: | 65 protected: |
65 bool Create(uint8_t* packet, | 66 bool Create(uint8_t* packet, |
66 size_t* position, | 67 size_t* position, |
67 size_t max_length, | 68 size_t max_length, |
68 PacketReadyCallback* callback) const override; | 69 PacketReadyCallback* callback) const override; |
69 | 70 |
70 size_t BlockLength() const override; | 71 size_t BlockLength() const override; |
71 | 72 |
(...skipping 24 matching lines...) Expand all Loading... |
96 uint16_t first_symbol_cardinality_; | 97 uint16_t first_symbol_cardinality_; |
97 bool vec_needs_two_bit_symbols_; | 98 bool vec_needs_two_bit_symbols_; |
98 uint32_t size_bytes_; | 99 uint32_t size_bytes_; |
99 | 100 |
100 RTC_DISALLOW_COPY_AND_ASSIGN(TransportFeedback); | 101 RTC_DISALLOW_COPY_AND_ASSIGN(TransportFeedback); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace rtcp | 104 } // namespace rtcp |
104 } // namespace webrtc | 105 } // namespace webrtc |
105 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ | 106 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ |
OLD | NEW |