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

Side by Side Diff: webrtc/modules/audio_coding/neteq/packet_buffer.cc

Issue 2718953002: Roll chromium_revision 33a7a547b9..0e44c5e141 (452838:453130) (Closed)
Patch Set: Disabling test for iOS Created 3 years, 9 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 | « DEPS ('k') | webrtc/modules/audio_mixer/default_output_rate_calculator.cc » ('j') | 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) 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 25 matching lines...) Expand all
36 36
37 private: 37 private:
38 const Packet& new_packet_; 38 const Packet& new_packet_;
39 }; 39 };
40 40
41 // Returns true if both payload types are known to the decoder database, and 41 // Returns true if both payload types are known to the decoder database, and
42 // have the same sample rate. 42 // have the same sample rate.
43 bool EqualSampleRates(uint8_t pt1, 43 bool EqualSampleRates(uint8_t pt1,
44 uint8_t pt2, 44 uint8_t pt2,
45 const DecoderDatabase& decoder_database) { 45 const DecoderDatabase& decoder_database) {
46 auto di1 = decoder_database.GetDecoderInfo(pt1); 46 auto* di1 = decoder_database.GetDecoderInfo(pt1);
47 auto di2 = decoder_database.GetDecoderInfo(pt2); 47 auto* di2 = decoder_database.GetDecoderInfo(pt2);
48 return di1 && di2 && di1->SampleRateHz() == di2->SampleRateHz(); 48 return di1 && di2 && di1->SampleRateHz() == di2->SampleRateHz();
49 } 49 }
50 } // namespace 50 } // namespace
51 51
52 PacketBuffer::PacketBuffer(size_t max_number_of_packets, 52 PacketBuffer::PacketBuffer(size_t max_number_of_packets,
53 const TickTimer* tick_timer) 53 const TickTimer* tick_timer)
54 : max_number_of_packets_(max_number_of_packets), tick_timer_(tick_timer) {} 54 : max_number_of_packets_(max_number_of_packets), tick_timer_(tick_timer) {}
55 55
56 // Destructor. All packets in the buffer will be destroyed. 56 // Destructor. All packets in the buffer will be destroyed.
57 PacketBuffer::~PacketBuffer() { 57 PacketBuffer::~PacketBuffer() {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 return num_samples; 267 return num_samples;
268 } 268 }
269 269
270 void PacketBuffer::BufferStat(int* num_packets, int* max_num_packets) const { 270 void PacketBuffer::BufferStat(int* num_packets, int* max_num_packets) const {
271 *num_packets = static_cast<int>(buffer_.size()); 271 *num_packets = static_cast<int>(buffer_.size());
272 *max_num_packets = static_cast<int>(max_number_of_packets_); 272 *max_num_packets = static_cast<int>(max_number_of_packets_);
273 } 273 }
274 274
275 } // namespace webrtc 275 } // namespace webrtc
OLDNEW
« no previous file with comments | « DEPS ('k') | webrtc/modules/audio_mixer/default_output_rate_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698