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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/acm_send_test.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 clock_.AdvanceTimeMilliseconds(kBlockSizeMs); 72 clock_.AdvanceTimeMilliseconds(kBlockSizeMs);
73 CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_)); 73 CHECK(audio_source_->Read(input_block_size_samples_, input_frame_.data_));
74 if (input_frame_.num_channels_ > 1) { 74 if (input_frame_.num_channels_ > 1) {
75 InputAudioFile::DuplicateInterleaved(input_frame_.data_, 75 InputAudioFile::DuplicateInterleaved(input_frame_.data_,
76 input_block_size_samples_, 76 input_block_size_samples_,
77 input_frame_.num_channels_, 77 input_frame_.num_channels_,
78 input_frame_.data_); 78 input_frame_.data_);
79 } 79 }
80 int32_t encoded_bytes = acm_->Add10MsAudio(input_frame_); 80 int32_t encoded_bytes = acm_->Add10MsAudio(input_frame_);
81 EXPECT_GE(encoded_bytes, 0); 81 EXPECT_GE(encoded_bytes, 0);
82 input_frame_.timestamp_ += input_block_size_samples_; 82 input_frame_.timestamp_ += static_cast<uint32_t>(input_block_size_samples_);
83 if (encoded_bytes > 0) { 83 if (encoded_bytes > 0) {
84 // Encoded packet received. 84 // Encoded packet received.
85 return CreatePacket(); 85 return CreatePacket();
86 } 86 }
87 } 87 }
88 // Test ended. 88 // Test ended.
89 return NULL; 89 return NULL;
90 } 90 }
91 91
92 // This method receives the callback from ACM when a new packet is produced. 92 // This method receives the callback from ACM when a new packet is produced.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 last_payload_vec_.size()); 132 last_payload_vec_.size());
133 Packet* packet = 133 Packet* packet =
134 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds()); 134 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds());
135 assert(packet); 135 assert(packet);
136 assert(packet->valid_header()); 136 assert(packet->valid_header());
137 return packet; 137 return packet;
138 } 138 }
139 139
140 } // namespace test 140 } // namespace test
141 } // namespace webrtc 141 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/acm_receiver.cc ('k') | webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698