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

Side by Side Diff: webrtc/voice_engine/test/cmd_test/voe_cmd_test.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
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 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #ifndef _WIN32 14 #ifndef _WIN32
15 #include <unistd.h> 15 #include <unistd.h>
16 #endif 16 #endif
17 17
18 #include <vector> 18 #include <vector>
19 19
20 #include "gflags/gflags.h" 20 #include "gflags/gflags.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "webrtc/base/format_macros.h"
22 #include "webrtc/base/scoped_ptr.h" 23 #include "webrtc/base/scoped_ptr.h"
23 #include "webrtc/call/rtc_event_log.h" 24 #include "webrtc/call/rtc_event_log.h"
24 #include "webrtc/engine_configurations.h" 25 #include "webrtc/engine_configurations.h"
25 #include "webrtc/modules/audio_processing/include/audio_processing.h" 26 #include "webrtc/modules/audio_processing/include/audio_processing.h"
26 #include "webrtc/test/channel_transport/channel_transport.h" 27 #include "webrtc/test/channel_transport/channel_transport.h"
27 #include "webrtc/test/testsupport/fileutils.h" 28 #include "webrtc/test/testsupport/fileutils.h"
28 #include "webrtc/test/testsupport/trace_to_stderr.h" 29 #include "webrtc/test/testsupport/trace_to_stderr.h"
29 #include "webrtc/voice_engine/include/voe_audio_processing.h" 30 #include "webrtc/voice_engine/include/voe_audio_processing.h"
30 #include "webrtc/voice_engine/include/voe_base.h" 31 #include "webrtc/voice_engine/include/voe_base.h"
31 #include "webrtc/voice_engine/include/voe_codec.h" 32 #include "webrtc/voice_engine/include/voe_codec.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 codec_params->channels = 1; 107 codec_params->channels = 1;
107 } 108 }
108 } 109 }
109 110
110 void PrintCodecs(bool opus_stereo) { 111 void PrintCodecs(bool opus_stereo) {
111 CodecInst codec_params; 112 CodecInst codec_params;
112 for (int i = 0; i < codec->NumOfCodecs(); ++i) { 113 for (int i = 0; i < codec->NumOfCodecs(); ++i) {
113 int res = codec->GetCodec(i, codec_params); 114 int res = codec->GetCodec(i, codec_params);
114 VALIDATE; 115 VALIDATE;
115 SetStereoIfOpus(opus_stereo, &codec_params); 116 SetStereoIfOpus(opus_stereo, &codec_params);
116 printf("%2d. %3d %s/%d/%d \n", i, codec_params.pltype, codec_params.plname, 117 printf("%2d. %3d %s/%d/%" PRIuS " \n", i, codec_params.pltype,
117 codec_params.plfreq, codec_params.channels); 118 codec_params.plname, codec_params.plfreq, codec_params.channels);
118 } 119 }
119 } 120 }
120 121
121 int main(int argc, char** argv) { 122 int main(int argc, char** argv) {
122 google::ParseCommandLineFlags(&argc, &argv, true); 123 google::ParseCommandLineFlags(&argc, &argv, true);
123 124
124 int res = 0; 125 int res = 0;
125 126
126 printf("Test started \n"); 127 printf("Test started \n");
127 128
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 861
861 printf("Delete channels \n"); 862 printf("Delete channels \n");
862 res = base1->DeleteChannel(chan); 863 res = base1->DeleteChannel(chan);
863 VALIDATE; 864 VALIDATE;
864 865
865 for (int i = 0; i < kMaxNumChannels; ++i) { 866 for (int i = 0; i < kMaxNumChannels; ++i) {
866 res = base1->DeleteChannel(channels[i]); 867 res = base1->DeleteChannel(channels[i]);
867 VALIDATE; 868 VALIDATE;
868 } 869 }
869 } 870 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/standard/codec_test.cc ('k') | webrtc/voice_engine/transmit_mixer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698