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

Side by Side Diff: media/ffmpeg/ffmpeg_common_unittest.cc

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « media/base/yuv_convert_unittest.cc ('k') | media/ffmpeg/ffmpeg_unittest.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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "media/base/media.h" 8 #include "media/base/media.h"
9 #include "media/ffmpeg/ffmpeg_common.h" 9 #include "media/ffmpeg/ffmpeg_common.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 25 matching lines...) Expand all
36 AVStream stream_; 36 AVStream stream_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(FFmpegCommonTest); 38 DISALLOW_COPY_AND_ASSIGN(FFmpegCommonTest);
39 }; 39 };
40 40
41 static bool InitFFmpeg() { 41 static bool InitFFmpeg() {
42 static bool initialized = false; 42 static bool initialized = false;
43 if (initialized) { 43 if (initialized) {
44 return true; 44 return true;
45 } 45 }
46 FilePath path; 46 base::FilePath path;
47 PathService::Get(base::DIR_MODULE, &path); 47 PathService::Get(base::DIR_MODULE, &path);
48 return media::InitializeMediaLibrary(path); 48 return media::InitializeMediaLibrary(path);
49 } 49 }
50 50
51 FFmpegCommonTest::FFmpegCommonTest() { 51 FFmpegCommonTest::FFmpegCommonTest() {
52 CHECK(InitFFmpeg()); 52 CHECK(InitFFmpeg());
53 stream_.time_base = kTimeBase; 53 stream_.time_base = kTimeBase;
54 stream_.index_entries = kIndexEntries; 54 stream_.index_entries = kIndexEntries;
55 stream_.index_entries_allocated_size = sizeof(kIndexEntries); 55 stream_.index_entries_allocated_size = sizeof(kIndexEntries);
56 stream_.nb_index_entries = arraysize(kIndexEntries); 56 stream_.nb_index_entries = arraysize(kIndexEntries);
(...skipping 16 matching lines...) Expand all
73 time_base.den = static_cast<int>(test_data[i][1]); 73 time_base.den = static_cast<int>(test_data[i][1]);
74 74
75 TimeDelta time_delta = ConvertFromTimeBase(time_base, test_data[i][2]); 75 TimeDelta time_delta = ConvertFromTimeBase(time_base, test_data[i][2]);
76 76
77 EXPECT_EQ(time_delta.InMicroseconds(), test_data[i][3]); 77 EXPECT_EQ(time_delta.InMicroseconds(), test_data[i][3]);
78 EXPECT_EQ(ConvertToTimeBase(time_base, time_delta), test_data[i][4]); 78 EXPECT_EQ(ConvertToTimeBase(time_base, time_delta), test_data[i][4]);
79 } 79 }
80 } 80 }
81 81
82 } // namespace media 82 } // namespace media
OLDNEW
« no previous file with comments | « media/base/yuv_convert_unittest.cc ('k') | media/ffmpeg/ffmpeg_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698