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

Side by Side Diff: media/tools/demuxer_bench/demuxer_bench.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/test/ffmpeg_tests/ffmpeg_tests.cc ('k') | media/tools/media_bench/media_bench.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // demuxer_bench is a standalone benchmarking tool for FFmpegDemuxer. It 5 // demuxer_bench is a standalone benchmarking tool for FFmpegDemuxer. It
6 // simulates the reading requirements for playback by reading from the stream 6 // simulates the reading requirements for playback by reading from the stream
7 // that has the earliest timestamp. 7 // that has the earliest timestamp.
8 8
9 #include <iostream> 9 #include <iostream>
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 CommandLine::Init(argc, argv); 163 CommandLine::Init(argc, argv);
164 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 164 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
165 165
166 if (cmd_line->GetArgs().empty()) { 166 if (cmd_line->GetArgs().empty()) {
167 std::cerr << "Usage: " << argv[0] << " [file]" << std::endl; 167 std::cerr << "Usage: " << argv[0] << " [file]" << std::endl;
168 return 1; 168 return 1;
169 } 169 }
170 170
171 MessageLoop message_loop; 171 MessageLoop message_loop;
172 DemuxerHostImpl demuxer_host; 172 DemuxerHostImpl demuxer_host;
173 FilePath file_path(cmd_line->GetArgs()[0]); 173 base::FilePath file_path(cmd_line->GetArgs()[0]);
174 174
175 // Setup. 175 // Setup.
176 scoped_refptr<media::FileDataSource> data_source = 176 scoped_refptr<media::FileDataSource> data_source =
177 new media::FileDataSource(); 177 new media::FileDataSource();
178 CHECK(data_source->Initialize(file_path)); 178 CHECK(data_source->Initialize(file_path));
179 179
180 scoped_refptr<media::FFmpegDemuxer> demuxer = 180 scoped_refptr<media::FFmpegDemuxer> demuxer =
181 new media::FFmpegDemuxer(message_loop.message_loop_proxy(), data_source); 181 new media::FFmpegDemuxer(message_loop.message_loop_proxy(), data_source);
182 182
183 demuxer->Initialize(&demuxer_host, base::Bind( 183 demuxer->Initialize(&demuxer_host, base::Bind(
(...skipping 26 matching lines...) Expand all
210 std::cout << ", " << stream_reader.counts()[i] << " packets" << std::endl; 210 std::cout << ", " << stream_reader.counts()[i] << " packets" << std::endl;
211 } 211 }
212 212
213 // Teardown. 213 // Teardown.
214 demuxer->Stop(base::Bind( 214 demuxer->Stop(base::Bind(
215 &QuitLoopWithStatus, &message_loop, media::PIPELINE_OK)); 215 &QuitLoopWithStatus, &message_loop, media::PIPELINE_OK));
216 message_loop.Run(); 216 message_loop.Run();
217 217
218 return 0; 218 return 0;
219 } 219 }
OLDNEW
« no previous file with comments | « media/test/ffmpeg_tests/ffmpeg_tests.cc ('k') | media/tools/media_bench/media_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698