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 |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |