| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual int NextTimestamp(uint32_t* next_timestamp) const; | 73 virtual int NextTimestamp(uint32_t* next_timestamp) const; |
| 74 | 74 |
| 75 // Gets the timestamp for the first packet in the buffer with a timestamp no | 75 // Gets the timestamp for the first packet in the buffer with a timestamp no |
| 76 // lower than the input limit |timestamp|. The result is written to the output | 76 // lower than the input limit |timestamp|. The result is written to the output |
| 77 // variable |next_timestamp|. | 77 // variable |next_timestamp|. |
| 78 // Returns PacketBuffer::kBufferEmpty if the buffer is empty, | 78 // Returns PacketBuffer::kBufferEmpty if the buffer is empty, |
| 79 // PacketBuffer::kOK otherwise. | 79 // PacketBuffer::kOK otherwise. |
| 80 virtual int NextHigherTimestamp(uint32_t timestamp, | 80 virtual int NextHigherTimestamp(uint32_t timestamp, |
| 81 uint32_t* next_timestamp) const; | 81 uint32_t* next_timestamp) const; |
| 82 | 82 |
| 83 // Returns a (constant) pointer the RTP header of the first packet in the | 83 // Returns a (constant) pointer to the first packet in the buffer. Returns |
| 84 // buffer. Returns NULL if the buffer is empty. | 84 // NULL if the buffer is empty. |
| 85 virtual const RTPHeader* NextRtpHeader() const; | 85 virtual const Packet* PeekNextPacket() const; |
| 86 | 86 |
| 87 // Extracts the first packet in the buffer and returns a pointer to it. | 87 // Extracts the first packet in the buffer and returns a pointer to it. |
| 88 // Returns NULL if the buffer is empty. The caller is responsible for deleting | 88 // Returns NULL if the buffer is empty. The caller is responsible for deleting |
| 89 // the packet. | 89 // the packet. |
| 90 // Subsequent packets with the same timestamp as the one extracted will be | 90 // Subsequent packets with the same timestamp as the one extracted will be |
| 91 // discarded and properly deleted. The number of discarded packets will be | 91 // discarded and properly deleted. The number of discarded packets will be |
| 92 // written to the output variable |discard_count|. | 92 // written to the output variable |discard_count|. |
| 93 virtual Packet* GetNextPacket(size_t* discard_count); | 93 virtual Packet* GetNextPacket(size_t* discard_count); |
| 94 | 94 |
| 95 // Discards the first packet in the buffer. The packet is deleted. | 95 // Discards the first packet in the buffer. The packet is deleted. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 size_t max_number_of_packets_; | 149 size_t max_number_of_packets_; |
| 150 PacketList buffer_; | 150 PacketList buffer_; |
| 151 const TickTimer* tick_timer_; | 151 const TickTimer* tick_timer_; |
| 152 RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer); | 152 RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace webrtc | 155 } // namespace webrtc |
| 156 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ | 156 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_PACKET_BUFFER_H_ |
| OLD | NEW |