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 "media/filters/pipeline_integration_test_base.h" | 5 #include "media/filters/pipeline_integration_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 int initial_append_size) | 391 int initial_append_size) |
392 : file_path_(GetTestDataFilePath(filename)), | 392 : file_path_(GetTestDataFilePath(filename)), |
393 current_position_(0), | 393 current_position_(0), |
394 initial_append_size_(initial_append_size), | 394 initial_append_size_(initial_append_size), |
395 mimetype_(mimetype), | 395 mimetype_(mimetype), |
396 chunk_demuxer_(new ChunkDemuxer( | 396 chunk_demuxer_(new ChunkDemuxer( |
397 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), | 397 base::Bind(&MockMediaSource::DemuxerOpened, base::Unretained(this)), |
398 base::Bind(&MockMediaSource::DemuxerNeedKey, | 398 base::Bind(&MockMediaSource::DemuxerNeedKey, |
399 base::Unretained(this)), | 399 base::Unretained(this)), |
400 LogCB(), | 400 LogCB(), |
| 401 scoped_refptr<MediaLog>(new MediaLog()), |
401 true)), | 402 true)), |
402 owned_chunk_demuxer_(chunk_demuxer_) { | 403 owned_chunk_demuxer_(chunk_demuxer_) { |
403 | 404 |
404 file_data_ = ReadTestDataFile(filename); | 405 file_data_ = ReadTestDataFile(filename); |
405 | 406 |
406 if (initial_append_size_ == kAppendWholeFile) | 407 if (initial_append_size_ == kAppendWholeFile) |
407 initial_append_size_ = file_data_->data_size(); | 408 initial_append_size_ = file_data_->data_size(); |
408 | 409 |
409 DCHECK_GT(initial_append_size_, 0); | 410 DCHECK_GT(initial_append_size_, 0); |
410 DCHECK_LE(initial_append_size_, file_data_->data_size()); | 411 DCHECK_LE(initial_append_size_, file_data_->data_size()); |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1611 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
1611 ASSERT_TRUE( | 1612 ASSERT_TRUE( |
1612 Start(GetTestDataFilePath("nonzero-start-time.webm"), PIPELINE_OK)); | 1613 Start(GetTestDataFilePath("nonzero-start-time.webm"), PIPELINE_OK)); |
1613 Play(); | 1614 Play(); |
1614 ASSERT_TRUE(WaitUntilOnEnded()); | 1615 ASSERT_TRUE(WaitUntilOnEnded()); |
1615 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1616 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
1616 demuxer_->GetStartTime()); | 1617 demuxer_->GetStartTime()); |
1617 } | 1618 } |
1618 | 1619 |
1619 } // namespace media | 1620 } // namespace media |
OLD | NEW |