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/test_data_util.h" | 8 #include "media/base/test_data_util.h" |
9 #include "media/filters/chunk_demuxer_client.h" | 9 #include "media/filters/chunk_demuxer_client.h" |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int initial_append_size_; | 78 int initial_append_size_; |
79 scoped_refptr<ChunkDemuxer> chunk_demuxer_; | 79 scoped_refptr<ChunkDemuxer> chunk_demuxer_; |
80 }; | 80 }; |
81 | 81 |
82 class PipelineIntegrationTest | 82 class PipelineIntegrationTest |
83 : public testing::Test, | 83 : public testing::Test, |
84 public PipelineIntegrationTestBase { | 84 public PipelineIntegrationTestBase { |
85 public: | 85 public: |
86 void StartPipelineWithMediaSource(MockMediaSource& source) { | 86 void StartPipelineWithMediaSource(MockMediaSource& source) { |
87 pipeline_->Start( | 87 pipeline_->Start( |
88 CreateFilterCollection(&source), source.url(), | 88 CreateFilterCollection(&source), |
89 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), | 89 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), |
90 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), | 90 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), |
91 NetworkEventCB(), QuitOnStatusCB(PIPELINE_OK)); | 91 NetworkEventCB(), QuitOnStatusCB(PIPELINE_OK)); |
92 | 92 |
93 decoder_->decryptor()->AddKey(kKeyId, arraysize(kKeyId) - 1, | 93 decoder_->decryptor()->AddKey(kKeyId, arraysize(kKeyId) - 1, |
94 kKeyId, arraysize(kKeyId) - 1); | 94 kKeyId, arraysize(kKeyId) - 1); |
95 | 95 |
96 message_loop_.Run(); | 96 message_loop_.Run(); |
97 } | 97 } |
98 | 98 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 // Verify video decoder & renderer can handle aborted demuxer reads. | 207 // Verify video decoder & renderer can handle aborted demuxer reads. |
208 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { | 208 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { |
209 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, | 209 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, |
210 base::TimeDelta::FromMilliseconds(200), | 210 base::TimeDelta::FromMilliseconds(200), |
211 base::TimeDelta::FromMilliseconds(1668), | 211 base::TimeDelta::FromMilliseconds(1668), |
212 0x1C896, 65536)); | 212 0x1C896, 65536)); |
213 } | 213 } |
214 | 214 |
215 } // namespace media | 215 } // namespace media |
OLD | NEW |