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

Side by Side Diff: webrtc/modules/audio_coding/main/test/TestVADDTX.cc

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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
(...skipping 26 matching lines...) Expand all
37 ResetStatistics(); 37 ResetStatistics();
38 } 38 }
39 39
40 int32_t ActivityMonitor::InFrameType(FrameType frame_type) { 40 int32_t ActivityMonitor::InFrameType(FrameType frame_type) {
41 counter_[frame_type]++; 41 counter_[frame_type]++;
42 return 0; 42 return 0;
43 } 43 }
44 44
45 void ActivityMonitor::PrintStatistics() { 45 void ActivityMonitor::PrintStatistics() {
46 printf("\n"); 46 printf("\n");
47 printf("kFrameEmpty %u\n", counter_[kFrameEmpty]); 47 printf("kEmptyFrame %u\n", counter_[kEmptyFrame]);
48 printf("kAudioFrameSpeech %u\n", counter_[kAudioFrameSpeech]); 48 printf("kAudioFrameSpeech %u\n", counter_[kAudioFrameSpeech]);
49 printf("kAudioFrameCN %u\n", counter_[kAudioFrameCN]); 49 printf("kAudioFrameCN %u\n", counter_[kAudioFrameCN]);
50 printf("kVideoFrameKey %u\n", counter_[kVideoFrameKey]); 50 printf("kVideoFrameKey %u\n", counter_[kVideoFrameKey]);
51 printf("kVideoFrameDelta %u\n", counter_[kVideoFrameDelta]); 51 printf("kVideoFrameDelta %u\n", counter_[kVideoFrameDelta]);
52 printf("\n\n"); 52 printf("\n\n");
53 } 53 }
54 54
55 void ActivityMonitor::ResetStatistics() { 55 void ActivityMonitor::ResetStatistics() {
56 memset(counter_, 0, sizeof(counter_)); 56 memset(counter_, 0, sizeof(counter_));
57 } 57 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Register Opus as send codec 241 // Register Opus as send codec
242 std::string out_filename = webrtc::test::OutputPath() + 242 std::string out_filename = webrtc::test::OutputPath() +
243 "testOpusDtx_outFile_mono.pcm"; 243 "testOpusDtx_outFile_mono.pcm";
244 RegisterCodec(kOpus); 244 RegisterCodec(kOpus);
245 EXPECT_EQ(0, acm_send_->DisableOpusDtx()); 245 EXPECT_EQ(0, acm_send_->DisableOpusDtx());
246 246
247 Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), 247 Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
248 32000, 1, out_filename, false, expects); 248 32000, 1, out_filename, false, expects);
249 249
250 EXPECT_EQ(0, acm_send_->EnableOpusDtx()); 250 EXPECT_EQ(0, acm_send_->EnableOpusDtx());
251 expects[kFrameEmpty] = 1; 251 expects[kEmptyFrame] = 1;
252 Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), 252 Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
253 32000, 1, out_filename, true, expects); 253 32000, 1, out_filename, true, expects);
254 254
255 // Register stereo Opus as send codec 255 // Register stereo Opus as send codec
256 out_filename = webrtc::test::OutputPath() + "testOpusDtx_outFile_stereo.pcm"; 256 out_filename = webrtc::test::OutputPath() + "testOpusDtx_outFile_stereo.pcm";
257 RegisterCodec(kOpusStereo); 257 RegisterCodec(kOpusStereo);
258 EXPECT_EQ(0, acm_send_->DisableOpusDtx()); 258 EXPECT_EQ(0, acm_send_->DisableOpusDtx());
259 expects[kFrameEmpty] = 0; 259 expects[kEmptyFrame] = 0;
260 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 260 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"),
261 32000, 2, out_filename, false, expects); 261 32000, 2, out_filename, false, expects);
262 262
263 EXPECT_EQ(0, acm_send_->EnableOpusDtx()); 263 EXPECT_EQ(0, acm_send_->EnableOpusDtx());
264 264
265 expects[kFrameEmpty] = 1; 265 expects[kEmptyFrame] = 1;
266 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 266 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"),
267 32000, 2, out_filename, true, expects); 267 32000, 2, out_filename, true, expects);
268 #endif 268 #endif
269 } 269 }
270 270
271 } // namespace webrtc 271 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TestVADDTX.h ('k') | webrtc/modules/audio_coding/main/test/utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698