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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 clock_.AdvanceTimeMilliseconds(kBlockSizeMs); 85 clock_.AdvanceTimeMilliseconds(kBlockSizeMs);
86 CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_)); 86 CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_));
87 if (input_frame_.num_channels_ > 1) { 87 if (input_frame_.num_channels_ > 1) {
88 InputAudioFile::DuplicateInterleaved(input_frame_.data_, 88 InputAudioFile::DuplicateInterleaved(input_frame_.data_,
89 input_block_size_samples_, 89 input_block_size_samples_,
90 input_frame_.num_channels_, 90 input_frame_.num_channels_,
91 input_frame_.data_); 91 input_frame_.data_);
92 } 92 }
93 data_to_send_ = false; 93 data_to_send_ = false;
94 CHECK_GE(acm_->Add10MsData(input_frame_), 0); 94 CHECK_GE(acm_->Add10MsData(input_frame_), 0);
95 input_frame_.timestamp_ += input_block_size_samples_; 95 input_frame_.timestamp_ += static_cast<uint32_t>(input_block_size_samples_);
96 if (data_to_send_) { 96 if (data_to_send_) {
97 // Encoded packet received. 97 // Encoded packet received.
98 return CreatePacket(); 98 return CreatePacket();
99 } 99 }
100 } 100 }
101 // Test ended. 101 // Test ended.
102 return NULL; 102 return NULL;
103 } 103 }
104 104
105 // This method receives the callback from ACM when a new packet is produced. 105 // This method receives the callback from ACM when a new packet is produced.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 last_payload_vec_.size()); 147 last_payload_vec_.size());
148 Packet* packet = 148 Packet* packet =
149 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds()); 149 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds());
150 assert(packet); 150 assert(packet);
151 assert(packet->valid_header()); 151 assert(packet->valid_header());
152 return packet; 152 return packet;
153 } 153 }
154 154
155 } // namespace test 155 } // namespace test
156 } // namespace webrtc 156 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698