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

Side by Side Diff: webrtc/voice_engine/file_player_unittests.cc

Issue 2240163002: Move FilePlayer and FileRecorder to Voice Engine (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 4 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/voice_engine/file_player_impl.cc ('k') | webrtc/voice_engine/file_recorder.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) 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
11 // Unit tests for FilePlayer. 11 // Unit tests for FilePlayer.
12 12
13 #include "webrtc/modules/utility/include/file_player.h"
14
15 #include <stdio.h> 13 #include <stdio.h>
16 #include <string> 14 #include <string>
17 15
18 #include "gflags/gflags.h" 16 #include "gflags/gflags.h"
19 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
20 #include "webrtc/base/md5digest.h" 18 #include "webrtc/base/md5digest.h"
21 #include "webrtc/base/stringencode.h" 19 #include "webrtc/base/stringencode.h"
22 #include "webrtc/test/testsupport/fileutils.h" 20 #include "webrtc/test/testsupport/fileutils.h"
21 #include "webrtc/voice_engine/file_player.h"
23 22
24 DEFINE_bool(file_player_output, false, "Generate reference files."); 23 DEFINE_bool(file_player_output, false, "Generate reference files.");
25 24
26 namespace webrtc { 25 namespace webrtc {
27 26
28 class FilePlayerTest : public ::testing::Test { 27 class FilePlayerTest : public ::testing::Test {
29 protected: 28 protected:
30 static const uint32_t kId = 0; 29 static const uint32_t kId = 0;
31 static const FileFormats kFileFormat = kFileFormatWavFile; 30 static const FileFormats kFileFormat = kFileFormatWavFile;
32 static const int kSampleRateHz = 8000; 31 static const int kSampleRateHz = 8000;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 test::ResourcePath("utility/encapsulated_pcm16b_8khz", "wav"); 106 test::ResourcePath("utility/encapsulated_pcm16b_8khz", "wav");
108 // The file is longer than this, but keeping the output shorter limits the 107 // The file is longer than this, but keeping the output shorter limits the
109 // runtime for the test. 108 // runtime for the test.
110 const int kOutputLengthMs = 10000; 109 const int kOutputLengthMs = 10000;
111 const std::string kRefChecksum = "e41d7e1dac8aeae9f21e8e03cd7ecd71"; 110 const std::string kRefChecksum = "e41d7e1dac8aeae9f21e8e03cd7ecd71";
112 111
113 PlayFileAndCheck(kFileName, kRefChecksum, kOutputLengthMs); 112 PlayFileAndCheck(kFileName, kRefChecksum, kOutputLengthMs);
114 } 113 }
115 114
116 } // namespace webrtc 115 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/file_player_impl.cc ('k') | webrtc/voice_engine/file_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698