| 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_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 const std::string& mimetype, | 468 const std::string& mimetype, |
| 469 int initial_append_size) | 469 int initial_append_size) |
| 470 : current_position_(0), | 470 : current_position_(0), |
| 471 initial_append_size_(initial_append_size), | 471 initial_append_size_(initial_append_size), |
| 472 mimetype_(mimetype), | 472 mimetype_(mimetype), |
| 473 chunk_demuxer_(new ChunkDemuxer( | 473 chunk_demuxer_(new ChunkDemuxer( |
| 474 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), | 474 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), |
| 475 base::Bind(&MockMediaSource::OnEncryptedMediaInitData, | 475 base::Bind(&MockMediaSource::OnEncryptedMediaInitData, |
| 476 base::Unretained(this)), | 476 base::Unretained(this)), |
| 477 LogCB(), | 477 LogCB(), |
| 478 ChunkDemuxer::GetMediaTimeCB(), |
| 478 scoped_refptr<MediaLog>(new MediaLog()), | 479 scoped_refptr<MediaLog>(new MediaLog()), |
| 479 true)), | 480 true)), |
| 480 owned_chunk_demuxer_(chunk_demuxer_) { | 481 owned_chunk_demuxer_(chunk_demuxer_) { |
| 481 file_data_ = ReadTestDataFile(filename); | 482 file_data_ = ReadTestDataFile(filename); |
| 482 | 483 |
| 483 if (initial_append_size_ == kAppendWholeFile) | 484 if (initial_append_size_ == kAppendWholeFile) |
| 484 initial_append_size_ = file_data_->data_size(); | 485 initial_append_size_ = file_data_->data_size(); |
| 485 | 486 |
| 486 DCHECK_GT(initial_append_size_, 0); | 487 DCHECK_GT(initial_append_size_, 0); |
| 487 DCHECK_LE(initial_append_size_, file_data_->data_size()); | 488 DCHECK_LE(initial_append_size_, file_data_->data_size()); |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 | 1738 |
| 1738 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1739 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1739 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1740 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1740 Play(); | 1741 Play(); |
| 1741 ASSERT_TRUE(WaitUntilOnEnded()); | 1742 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1742 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1743 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1743 demuxer_->GetStartTime()); | 1744 demuxer_->GetStartTime()); |
| 1744 } | 1745 } |
| 1745 | 1746 |
| 1746 } // namespace media | 1747 } // namespace media |
| OLD | NEW |