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

Side by Side Diff: webrtc/modules/utility/source/file_player_unittests.cc

Issue 2250643004: Rename NewFilePlayer to its original name, CreateFilePlayer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove7
Patch Set: 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/modules/utility/source/file_player.cc ('k') | webrtc/voice_engine/channel.cc » ('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
(...skipping 16 matching lines...) Expand all
27 27
28 namespace webrtc { 28 namespace webrtc {
29 29
30 class FilePlayerTest : public ::testing::Test { 30 class FilePlayerTest : public ::testing::Test {
31 protected: 31 protected:
32 static const uint32_t kId = 0; 32 static const uint32_t kId = 0;
33 static const FileFormats kFileFormat = kFileFormatWavFile; 33 static const FileFormats kFileFormat = kFileFormatWavFile;
34 static const int kSampleRateHz = 8000; 34 static const int kSampleRateHz = 8000;
35 35
36 FilePlayerTest() 36 FilePlayerTest()
37 : player_(FilePlayer::NewFilePlayer(kId, kFileFormat)), 37 : player_(FilePlayer::CreateFilePlayer(kId, kFileFormat)),
38 output_file_(NULL) {} 38 output_file_(NULL) {}
39 39
40 void SetUp() override { 40 void SetUp() override {
41 if (FLAGS_file_player_output) { 41 if (FLAGS_file_player_output) {
42 std::string output_file = 42 std::string output_file =
43 webrtc::test::OutputPath() + "file_player_unittest_out.pcm"; 43 webrtc::test::OutputPath() + "file_player_unittest_out.pcm";
44 output_file_ = fopen(output_file.c_str(), "wb"); 44 output_file_ = fopen(output_file.c_str(), "wb");
45 ASSERT_TRUE(output_file_ != NULL); 45 ASSERT_TRUE(output_file_ != NULL);
46 } 46 }
47 } 47 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 test::ResourcePath("utility/encapsulated_pcm16b_8khz", "wav"); 106 test::ResourcePath("utility/encapsulated_pcm16b_8khz", "wav");
107 // 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
108 // runtime for the test. 108 // runtime for the test.
109 const int kOutputLengthMs = 10000; 109 const int kOutputLengthMs = 10000;
110 const std::string kRefChecksum = "e41d7e1dac8aeae9f21e8e03cd7ecd71"; 110 const std::string kRefChecksum = "e41d7e1dac8aeae9f21e8e03cd7ecd71";
111 111
112 PlayFileAndCheck(kFileName, kRefChecksum, kOutputLengthMs); 112 PlayFileAndCheck(kFileName, kRefChecksum, kOutputLengthMs);
113 } 113 }
114 114
115 } // namespace webrtc 115 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/utility/source/file_player.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698