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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 DCHECK_LT(new_position, file_data_->data_size()); | 290 DCHECK_LT(new_position, file_data_->data_size()); |
291 current_position_ = new_position; | 291 current_position_ = new_position; |
292 | 292 |
293 AppendData(seek_append_size); | 293 AppendData(seek_append_size); |
294 } | 294 } |
295 | 295 |
296 void AppendData(int size) { | 296 void AppendData(int size) { |
297 DCHECK(chunk_demuxer_); | 297 DCHECK(chunk_demuxer_); |
298 DCHECK_LT(current_position_, file_data_->data_size()); | 298 DCHECK_LT(current_position_, file_data_->data_size()); |
299 DCHECK_LE(current_position_ + size, file_data_->data_size()); | 299 DCHECK_LE(current_position_ + size, file_data_->data_size()); |
| 300 |
| 301 // TODO(wolenetz): Test timestamp offset updating once "sequence" append |
| 302 // mode processing is implemented. See http://crbug.com/249422. |
300 chunk_demuxer_->AppendData( | 303 chunk_demuxer_->AppendData( |
301 kSourceId, file_data_->data() + current_position_, size); | 304 kSourceId, file_data_->data() + current_position_, size, NULL); |
302 current_position_ += size; | 305 current_position_ += size; |
303 } | 306 } |
304 | 307 |
305 void AppendAtTime(const base::TimeDelta& timestampOffset, | 308 void AppendAtTime(const base::TimeDelta& timestampOffset, |
306 const uint8* pData, int size) { | 309 const uint8* pData, int size) { |
307 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, timestampOffset)); | 310 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, timestampOffset)); |
308 chunk_demuxer_->AppendData(kSourceId, pData, size); | 311 chunk_demuxer_->AppendData(kSourceId, pData, size, NULL); |
309 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, base::TimeDelta())); | 312 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, base::TimeDelta())); |
310 } | 313 } |
311 | 314 |
312 void EndOfStream() { | 315 void EndOfStream() { |
313 chunk_demuxer_->MarkEndOfStream(PIPELINE_OK); | 316 chunk_demuxer_->MarkEndOfStream(PIPELINE_OK); |
314 } | 317 } |
315 | 318 |
316 void Abort() { | 319 void Abort() { |
317 if (!chunk_demuxer_) | 320 if (!chunk_demuxer_) |
318 return; | 321 return; |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 // Verify that VP8 video with inband text track can be played back. | 1115 // Verify that VP8 video with inband text track can be played back. |
1113 TEST_F(PipelineIntegrationTest, | 1116 TEST_F(PipelineIntegrationTest, |
1114 BasicPlayback_VP8_WebVTT_WebM) { | 1117 BasicPlayback_VP8_WebVTT_WebM) { |
1115 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), | 1118 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), |
1116 PIPELINE_OK)); | 1119 PIPELINE_OK)); |
1117 Play(); | 1120 Play(); |
1118 ASSERT_TRUE(WaitUntilOnEnded()); | 1121 ASSERT_TRUE(WaitUntilOnEnded()); |
1119 } | 1122 } |
1120 | 1123 |
1121 } // namespace media | 1124 } // namespace media |
OLD | NEW |