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

Side by Side Diff: webrtc/tools/agc/agc_harness.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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 | « webrtc/tools/agc/activity_metric.cc ('k') | webrtc/video/vie_channel.h » ('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
11 // Refer to kUsage below for a description. 11 // Refer to kUsage below for a description.
12 12
13 #include "gflags/gflags.h" 13 #include "gflags/gflags.h"
14 #include "webrtc/base/checks.h" 14 #include "webrtc/base/checks.h"
15 #include "webrtc/base/format_macros.h"
15 #include "webrtc/base/scoped_ptr.h" 16 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/system_wrappers/include/sleep.h" 17 #include "webrtc/system_wrappers/include/sleep.h"
17 #include "webrtc/system_wrappers/include/trace.h" 18 #include "webrtc/system_wrappers/include/trace.h"
18 #include "webrtc/test/channel_transport/channel_transport.h" 19 #include "webrtc/test/channel_transport/channel_transport.h"
19 #include "webrtc/test/testsupport/trace_to_stderr.h" 20 #include "webrtc/test/testsupport/trace_to_stderr.h"
20 #include "webrtc/modules/audio_processing/include/audio_processing.h" 21 #include "webrtc/modules/audio_processing/include/audio_processing.h"
21 #include "webrtc/voice_engine/include/voe_audio_processing.h" 22 #include "webrtc/voice_engine/include/voe_audio_processing.h"
22 #include "webrtc/voice_engine/include/voe_base.h" 23 #include "webrtc/voice_engine/include/voe_base.h"
23 #include "webrtc/voice_engine/include/voe_codec.h" 24 #include "webrtc/voice_engine/include/voe_codec.h"
24 #include "webrtc/voice_engine/include/voe_external_media.h" 25 #include "webrtc/voice_engine/include/voe_external_media.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 RTC_CHECK_EQ(0, hardware_->GetPlayoutDeviceName(i, device_name, guid)); 170 RTC_CHECK_EQ(0, hardware_->GetPlayoutDeviceName(i, device_name, guid));
170 printf("%d: %s\n", i, device_name); 171 printf("%d: %s\n", i, device_name);
171 } 172 }
172 } 173 }
173 174
174 void PrintCodecs() { 175 void PrintCodecs() {
175 CodecInst params = {0}; 176 CodecInst params = {0};
176 printf("Codecs:\n"); 177 printf("Codecs:\n");
177 for (int i = 0; i < codec_->NumOfCodecs(); i++) { 178 for (int i = 0; i < codec_->NumOfCodecs(); i++) {
178 RTC_CHECK_EQ(0, codec_->GetCodec(i, params)); 179 RTC_CHECK_EQ(0, codec_->GetCodec(i, params));
179 printf("%d %s/%d/%d\n", params.pltype, params.plname, params.plfreq, 180 printf("%d %s/%d/%" PRIuS "\n", params.pltype, params.plname,
180 params.channels); 181 params.plfreq, params.channels);
181 } 182 }
182 } 183 }
183 184
184 void StartSending() { RTC_CHECK_EQ(0, base_->StartSend(channel_)); } 185 void StartSending() { RTC_CHECK_EQ(0, base_->StartSend(channel_)); }
185 186
186 void StartPlaying(Pan pan, const std::string& filename) { 187 void StartPlaying(Pan pan, const std::string& filename) {
187 VoEVolumeControl* volume = VoEVolumeControl::GetInterface(voe_); 188 VoEVolumeControl* volume = VoEVolumeControl::GetInterface(voe_);
188 VoEFile* file = VoEFile::GetInterface(voe_); 189 VoEFile* file = VoEFile::GetInterface(voe_);
189 if (pan == PanLeft) { 190 if (pan == PanLeft) {
190 volume->SetOutputVolumePan(channel_, 1, 0); 191 volume->SetOutputVolumePan(channel_, 1, 0);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 webrtc::PrintDevices(); 274 webrtc::PrintDevices();
274 } 275 }
275 if (FLAGS_codecs) { 276 if (FLAGS_codecs) {
276 webrtc::PrintCodecs(); 277 webrtc::PrintCodecs();
277 } 278 }
278 if (!FLAGS_devices && !FLAGS_codecs) { 279 if (!FLAGS_devices && !FLAGS_codecs) {
279 webrtc::RunHarness(); 280 webrtc::RunHarness();
280 } 281 }
281 return 0; 282 return 0;
282 } 283 }
OLDNEW
« no previous file with comments | « webrtc/tools/agc/activity_metric.cc ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698