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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Discards all packets that are (strictly) older than timestamp_limit. | 109 // Discards all packets that are (strictly) older than timestamp_limit. |
110 virtual int DiscardAllOldPackets(uint32_t timestamp_limit); | 110 virtual int DiscardAllOldPackets(uint32_t timestamp_limit); |
111 | 111 |
112 // Returns the number of packets in the buffer, including duplicates and | 112 // Returns the number of packets in the buffer, including duplicates and |
113 // redundant packets. | 113 // redundant packets. |
114 virtual size_t NumPacketsInBuffer() const; | 114 virtual size_t NumPacketsInBuffer() const; |
115 | 115 |
116 // Returns the number of samples in the buffer, including samples carried in | 116 // Returns the number of samples in the buffer, including samples carried in |
117 // duplicate and redundant packets. | 117 // duplicate and redundant packets. |
118 virtual size_t NumSamplesInBuffer(DecoderDatabase* decoder_database, | 118 virtual size_t NumSamplesInBuffer(size_t last_decoded_length) const; |
119 size_t last_decoded_length) const; | |
120 | 119 |
121 virtual void BufferStat(int* num_packets, int* max_num_packets) const; | 120 virtual void BufferStat(int* num_packets, int* max_num_packets) const; |
122 | 121 |
123 // Static method that properly deletes the first packet, and its payload | 122 // Static method that properly deletes the first packet, and its payload |
124 // array, in |packet_list|. Returns false if |packet_list| already was empty, | 123 // array, in |packet_list|. Returns false if |packet_list| already was empty, |
125 // otherwise true. | 124 // otherwise true. |
126 static bool DeleteFirstPacket(PacketList* packet_list); | 125 static bool DeleteFirstPacket(PacketList* packet_list); |
127 | 126 |
128 // Static method that properly deletes all packets, and their payload arrays, | 127 // Static method that properly deletes all packets, and their payload arrays, |
129 // in |packet_list|. | 128 // in |packet_list|. |
(...skipping 15 matching lines...) Expand all Loading... |
145 | 144 |
146 private: | 145 private: |
147 size_t max_number_of_packets_; | 146 size_t max_number_of_packets_; |
148 PacketList buffer_; | 147 PacketList buffer_; |
149 const TickTimer* tick_timer_; | 148 const TickTimer* tick_timer_; |
150 RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer); | 149 RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer); |
151 }; | 150 }; |
152 | 151 |
153 } // namespace webrtc | 152 } // namespace webrtc |
154 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ | 153 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ |
OLD | NEW |