OLD | NEW |
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 #include <algorithm> | 5 #include <algorithm> |
6 #include <deque> | 6 #include <deque> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 message_loop_.Run(); | 154 message_loop_.Run(); |
155 } | 155 } |
156 | 156 |
157 EXPECT_TRUE(got_eos_buffer); | 157 EXPECT_TRUE(got_eos_buffer); |
158 } | 158 } |
159 | 159 |
160 private: | 160 private: |
161 void CreateDataSource(const std::string& name) { | 161 void CreateDataSource(const std::string& name) { |
162 CHECK(!data_source_); | 162 CHECK(!data_source_); |
163 | 163 |
164 FilePath file_path; | 164 base::FilePath file_path; |
165 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &file_path)); | 165 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &file_path)); |
166 | 166 |
167 file_path = file_path.Append(FILE_PATH_LITERAL("media")) | 167 file_path = file_path.Append(FILE_PATH_LITERAL("media")) |
168 .Append(FILE_PATH_LITERAL("test")) | 168 .Append(FILE_PATH_LITERAL("test")) |
169 .Append(FILE_PATH_LITERAL("data")) | 169 .Append(FILE_PATH_LITERAL("data")) |
170 .AppendASCII(name); | 170 .AppendASCII(name); |
171 | 171 |
172 data_source_ = new FileDataSource(); | 172 data_source_ = new FileDataSource(); |
173 EXPECT_TRUE(data_source_->Initialize(file_path)); | 173 EXPECT_TRUE(data_source_->Initialize(file_path)); |
174 } | 174 } |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 TEST_F(FFmpegDemuxerTest, MP4_ZeroStszEntry) { | 621 TEST_F(FFmpegDemuxerTest, MP4_ZeroStszEntry) { |
622 #if !defined(USE_PROPRIETARY_CODECS) | 622 #if !defined(USE_PROPRIETARY_CODECS) |
623 return; | 623 return; |
624 #endif | 624 #endif |
625 CreateDemuxer("bear-1280x720-zero-stsz-entry.mp4"); | 625 CreateDemuxer("bear-1280x720-zero-stsz-entry.mp4"); |
626 InitializeDemuxer(); | 626 InitializeDemuxer(); |
627 ReadUntilEndOfStream(); | 627 ReadUntilEndOfStream(); |
628 } | 628 } |
629 | 629 |
630 } // namespace media | 630 } // namespace media |
OLD | NEW |