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 "media/base/decoder_buffer.h" | 8 #include "media/base/decoder_buffer.h" |
9 #include "media/base/decryptor_client.h" | 9 #include "media/base/decryptor_client.h" |
10 #include "media/base/test_data_util.h" | 10 #include "media/base/test_data_util.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 DCHECK_GT(initial_append_size_, 0); | 39 DCHECK_GT(initial_append_size_, 0); |
40 DCHECK_LE(initial_append_size_, file_data_->GetDataSize()); | 40 DCHECK_LE(initial_append_size_, file_data_->GetDataSize()); |
41 } | 41 } |
42 | 42 |
43 virtual ~MockMediaSource() {} | 43 virtual ~MockMediaSource() {} |
44 | 44 |
45 void set_decryptor_client(DecryptorClient* decryptor_client) { | 45 void set_decryptor_client(DecryptorClient* decryptor_client) { |
46 decryptor_client_ = decryptor_client; | 46 decryptor_client_ = decryptor_client; |
47 } | 47 } |
48 | 48 |
49 const std::string& url() const { return url_; } | |
50 | |
51 void Seek(int new_position, int seek_append_size) { | 49 void Seek(int new_position, int seek_append_size) { |
52 chunk_demuxer_->StartWaitingForSeek(); | 50 chunk_demuxer_->StartWaitingForSeek(); |
53 | 51 |
54 chunk_demuxer_->Abort(kSourceId); | 52 chunk_demuxer_->Abort(kSourceId); |
55 | 53 |
56 DCHECK_GE(new_position, 0); | 54 DCHECK_GE(new_position, 0); |
57 DCHECK_LT(new_position, file_data_->GetDataSize()); | 55 DCHECK_LT(new_position, file_data_->GetDataSize()); |
58 current_position_ = new_position; | 56 current_position_ = new_position; |
59 | 57 |
60 AppendData(seek_append_size); | 58 AppendData(seek_append_size); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 359 |
362 // Verify video decoder & renderer can handle aborted demuxer reads. | 360 // Verify video decoder & renderer can handle aborted demuxer reads. |
363 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { | 361 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { |
364 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, | 362 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, |
365 base::TimeDelta::FromMilliseconds(200), | 363 base::TimeDelta::FromMilliseconds(200), |
366 base::TimeDelta::FromMilliseconds(1668), | 364 base::TimeDelta::FromMilliseconds(1668), |
367 0x1C896, 65536, false, true)); | 365 0x1C896, 65536, false, true)); |
368 } | 366 } |
369 | 367 |
370 } // namespace media | 368 } // namespace media |
OLD | NEW |