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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 int initial_append_size_; | 74 int initial_append_size_; |
75 scoped_refptr<ChunkDemuxer> chunk_demuxer_; | 75 scoped_refptr<ChunkDemuxer> chunk_demuxer_; |
76 }; | 76 }; |
77 | 77 |
78 class PipelineIntegrationTest | 78 class PipelineIntegrationTest |
79 : public testing::Test, | 79 : public testing::Test, |
80 public PipelineIntegrationTestBase { | 80 public PipelineIntegrationTestBase { |
81 public: | 81 public: |
82 void StartPipelineWithMediaSource(MockMediaSource& source) { | 82 void StartPipelineWithMediaSource(MockMediaSource& source) { |
83 pipeline_->Start( | 83 pipeline_->Start( |
84 CreateFilterCollection(&source), source.url(), | 84 CreateFilterCollection(&source), |
85 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), | 85 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), |
86 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), | 86 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), |
87 NetworkEventCB(), QuitOnStatusCB(PIPELINE_OK)); | 87 NetworkEventCB(), QuitOnStatusCB(PIPELINE_OK)); |
88 | 88 |
89 message_loop_.Run(); | 89 message_loop_.Run(); |
90 } | 90 } |
91 | 91 |
92 // Verifies that seeking works properly for ChunkDemuxer when the | 92 // Verifies that seeking works properly for ChunkDemuxer when the |
93 // seek happens while there is a pending read on the ChunkDemuxer | 93 // seek happens while there is a pending read on the ChunkDemuxer |
94 // and no data is available. | 94 // and no data is available. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 // Verify video decoder & renderer can handle aborted demuxer reads. | 201 // Verify video decoder & renderer can handle aborted demuxer reads. |
202 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { | 202 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { |
203 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, | 203 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, |
204 base::TimeDelta::FromMilliseconds(200), | 204 base::TimeDelta::FromMilliseconds(200), |
205 base::TimeDelta::FromMilliseconds(1668), | 205 base::TimeDelta::FromMilliseconds(1668), |
206 0x1C896, 65536)); | 206 0x1C896, 65536)); |
207 } | 207 } |
208 | 208 |
209 } // namespace media | 209 } // namespace media |
OLD | NEW |