Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h

Issue 2822153002: Remove rtcp::TransportFeedback::GetStatusVector/GetReceiveDeltas (Closed)
Patch Set: bit more simplifications Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 14 #include <memory>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/deprecation.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" 18 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h"
18 19
19 namespace webrtc { 20 namespace webrtc {
20 namespace rtcp { 21 namespace rtcp {
21 class CommonHeader; 22 class CommonHeader;
22 23
23 class TransportFeedback : public Rtpfb { 24 class TransportFeedback : public Rtpfb {
24 public: 25 public:
25 class ReceivedPacket { 26 class ReceivedPacket {
26 public: 27 public:
(...skipping 27 matching lines...) Expand all
54 bool AddReceivedPacket(uint16_t sequence_number, int64_t timestamp_us); 55 bool AddReceivedPacket(uint16_t sequence_number, int64_t timestamp_us);
55 const std::vector<ReceivedPacket>& GetReceivedPackets() const; 56 const std::vector<ReceivedPacket>& GetReceivedPackets() const;
56 57
57 enum class StatusSymbol { 58 enum class StatusSymbol {
58 kNotReceived, 59 kNotReceived,
59 kReceivedSmallDelta, 60 kReceivedSmallDelta,
60 kReceivedLargeDelta, 61 kReceivedLargeDelta,
61 }; 62 };
62 63
63 uint16_t GetBaseSequence() const; 64 uint16_t GetBaseSequence() const;
64 std::vector<TransportFeedback::StatusSymbol> GetStatusVector() const; 65 // Returns number of packets (including missing) this feedback describes.
65 std::vector<int16_t> GetReceiveDeltas() const; 66 size_t GetPacketStatusCount() const { return num_seq_no_; }
67 RTC_DEPRECATED std::vector<TransportFeedback::StatusSymbol> GetStatusVector()
philipel 2017/04/19 12:34:59 Why don't we remove GetStatusVector, GetReceiveDel
danilchap 2017/04/19 14:05:35 No good reason. Done
68 const;
69 RTC_DEPRECATED std::vector<int16_t> GetReceiveDeltas() const;
66 70
67 // Get the reference time in microseconds, including any precision loss. 71 // Get the reference time in microseconds, including any precision loss.
68 int64_t GetBaseTimeUs() const; 72 int64_t GetBaseTimeUs() const;
69 // Convenience method for getting all deltas as microseconds. The first delta 73 // Convenience method for getting all deltas as microseconds. The first delta
70 // is relative the base time. 74 // is relative the base time.
71 std::vector<int64_t> GetReceiveDeltasUs() const; 75 RTC_DEPRECATED std::vector<int64_t> GetReceiveDeltasUs() const;
72 76
73 bool Parse(const CommonHeader& packet); 77 bool Parse(const CommonHeader& packet);
74 static std::unique_ptr<TransportFeedback> ParseFrom(const uint8_t* buffer, 78 static std::unique_ptr<TransportFeedback> ParseFrom(const uint8_t* buffer,
75 size_t length); 79 size_t length);
76 // Pre and postcondition for all public methods. Should always return true. 80 // Pre and postcondition for all public methods. Should always return true.
77 // This function is for tests. 81 // This function is for tests.
78 bool IsConsistent() const; 82 bool IsConsistent() const;
79 83
80 protected: 84 protected:
81 bool Create(uint8_t* packet, 85 bool Create(uint8_t* packet,
(...skipping 24 matching lines...) Expand all
106 std::vector<ReceivedPacket> packets_; 110 std::vector<ReceivedPacket> packets_;
107 // All but last encoded packet chunks. 111 // All but last encoded packet chunks.
108 std::vector<uint16_t> encoded_chunks_; 112 std::vector<uint16_t> encoded_chunks_;
109 const std::unique_ptr<LastChunk> last_chunk_; 113 const std::unique_ptr<LastChunk> last_chunk_;
110 size_t size_bytes_; 114 size_t size_bytes_;
111 }; 115 };
112 116
113 } // namespace rtcp 117 } // namespace rtcp
114 } // namespace webrtc 118 } // namespace webrtc
115 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_ 119 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_TRANSPORT_FEEDBACK_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698