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

Unified Diff: media/filters/file_data_source_unittest.cc

Issue 20326: Fixes a bug in the media pipeline that resulted in the video dimensions never... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/file_data_source_unittest.cc
===================================================================
--- media/filters/file_data_source_unittest.cc (revision 9872)
+++ media/filters/file_data_source_unittest.cc (working copy)
@@ -28,9 +28,18 @@
using media::MockDemuxer;
using media::MockAudioDecoder;
using media::MockAudioRenderer;
+using media::MockFilterConfig;
using media::MockFilterHost;
using media::PipelineImpl;
+namespace {
+
+// Returns a path to the test file which contains the string "0123456789"
+// without the quotes or any trailing space or null termination. The file lives
+// under the media/test/data directory. Under Windows, strings for the
+// FilePath class are unicode, and the pipeline wants char strings. Convert
+// the string to UTF8 under Windows. For Mac and Linux, file paths are already
+// chars so just return the string from the FilePath.
std::string TestFileURL() {
FilePath data_dir;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_dir));
@@ -45,14 +54,18 @@
#endif
}
+} // namespace
+
// Use the "real" pipeline to open the file.
TEST(FileDataSourceTest, OpenFile) {
PipelineImpl pipeline;
+ MockFilterConfig config;
+ config.set_no_video();
scoped_refptr<FilterFactoryCollection> c = new FilterFactoryCollection();
c->AddFactory(FileDataSource::CreateFactory());
- c->AddFactory(MockDemuxer::CreateFactory());
- c->AddFactory(MockAudioDecoder::CreateFactory());
- c->AddFactory(MockAudioRenderer::CreateFactory());
+ c->AddFactory(MockDemuxer::CreateFactory(&config));
+ c->AddFactory(MockAudioDecoder::CreateFactory(&config));
+ c->AddFactory(MockAudioRenderer::CreateFactory(&config));
InitializationHelper h;
h.Start(&pipeline, c, TestFileURL());
h.Wait();
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698