| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 MockMediaSource(const std::string& filename, | 443 MockMediaSource(const std::string& filename, |
| 444 const std::string& mimetype, | 444 const std::string& mimetype, |
| 445 int initial_append_size) | 445 int initial_append_size) |
| 446 : current_position_(0), | 446 : current_position_(0), |
| 447 initial_append_size_(initial_append_size), | 447 initial_append_size_(initial_append_size), |
| 448 mimetype_(mimetype), | 448 mimetype_(mimetype), |
| 449 chunk_demuxer_(new ChunkDemuxer( | 449 chunk_demuxer_(new ChunkDemuxer( |
| 450 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), | 450 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), |
| 451 base::Bind(&MockMediaSource::OnEncryptedMediaInitData, | 451 base::Bind(&MockMediaSource::OnEncryptedMediaInitData, |
| 452 base::Unretained(this)), | 452 base::Unretained(this)), |
| 453 LogCB(), | |
| 454 scoped_refptr<MediaLog>(new MediaLog()), | 453 scoped_refptr<MediaLog>(new MediaLog()), |
| 455 true)), | 454 true)), |
| 456 owned_chunk_demuxer_(chunk_demuxer_) { | 455 owned_chunk_demuxer_(chunk_demuxer_) { |
| 457 file_data_ = ReadTestDataFile(filename); | 456 file_data_ = ReadTestDataFile(filename); |
| 458 | 457 |
| 459 if (initial_append_size_ == kAppendWholeFile) | 458 if (initial_append_size_ == kAppendWholeFile) |
| 460 initial_append_size_ = file_data_->data_size(); | 459 initial_append_size_ = file_data_->data_size(); |
| 461 | 460 |
| 462 DCHECK_GT(initial_append_size_, 0); | 461 DCHECK_GT(initial_append_size_, 0); |
| 463 DCHECK_LE(initial_append_size_, file_data_->data_size()); | 462 DCHECK_LE(initial_append_size_, file_data_->data_size()); |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 | 1716 |
| 1718 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1717 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1719 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1718 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1720 Play(); | 1719 Play(); |
| 1721 ASSERT_TRUE(WaitUntilOnEnded()); | 1720 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1722 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1721 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1723 demuxer_->GetStartTime()); | 1722 demuxer_->GetStartTime()); |
| 1724 } | 1723 } |
| 1725 | 1724 |
| 1726 } // namespace media | 1725 } // namespace media |
| OLD | NEW |