| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 int initial_append_size) | 212 int initial_append_size) |
| 213 : file_path_(GetTestDataFilePath(filename)), | 213 : file_path_(GetTestDataFilePath(filename)), |
| 214 current_position_(0), | 214 current_position_(0), |
| 215 initial_append_size_(initial_append_size), | 215 initial_append_size_(initial_append_size), |
| 216 mimetype_(mimetype), | 216 mimetype_(mimetype), |
| 217 chunk_demuxer_(new ChunkDemuxer( | 217 chunk_demuxer_(new ChunkDemuxer( |
| 218 base::Bind(&MockMediaSource::DemuxerOpened, | 218 base::Bind(&MockMediaSource::DemuxerOpened, |
| 219 base::Unretained(this)), | 219 base::Unretained(this)), |
| 220 base::Bind(&MockMediaSource::DemuxerNeedKey, | 220 base::Bind(&MockMediaSource::DemuxerNeedKey, |
| 221 base::Unretained(this)), | 221 base::Unretained(this)), |
| 222 base::Bind(&MockMediaSource::OnTextTrack, | 222 true, // enable inband text tracks |
| 223 base::Unretained(this)), | |
| 224 LogCB())), | 223 LogCB())), |
| 225 owned_chunk_demuxer_(chunk_demuxer_) { | 224 owned_chunk_demuxer_(chunk_demuxer_) { |
| 226 | 225 |
| 227 file_data_ = ReadTestDataFile(filename); | 226 file_data_ = ReadTestDataFile(filename); |
| 228 | 227 |
| 229 if (initial_append_size_ == kAppendWholeFile) | 228 if (initial_append_size_ == kAppendWholeFile) |
| 230 initial_append_size_ = file_data_->data_size(); | 229 initial_append_size_ = file_data_->data_size(); |
| 231 | 230 |
| 232 DCHECK_GT(initial_append_size_, 0); | 231 DCHECK_GT(initial_append_size_, 0); |
| 233 DCHECK_LE(initial_append_size_, file_data_->data_size()); | 232 DCHECK_LE(initial_append_size_, file_data_->data_size()); |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) { | 1059 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) { |
| 1061 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber()); | 1060 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber()); |
| 1062 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8a.webm"), | 1061 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8a.webm"), |
| 1063 PIPELINE_OK)); | 1062 PIPELINE_OK)); |
| 1064 Play(); | 1063 Play(); |
| 1065 ASSERT_TRUE(WaitUntilOnEnded()); | 1064 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1066 EXPECT_EQ(last_video_frame_format_, VideoFrame::YV12A); | 1065 EXPECT_EQ(last_video_frame_format_, VideoFrame::YV12A); |
| 1067 } | 1066 } |
| 1068 | 1067 |
| 1069 // Verify that VP8 video with inband text track can be played back. | 1068 // Verify that VP8 video with inband text track can be played back. |
| 1070 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) { | 1069 TEST_F(PipelineIntegrationTest, |
| 1070 BasicPlayback_VP8_WebVTT_WebM) { |
| 1071 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), | 1071 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), |
| 1072 PIPELINE_OK)); | 1072 PIPELINE_OK)); |
| 1073 Play(); | 1073 Play(); |
| 1074 ASSERT_TRUE(WaitUntilOnEnded()); | 1074 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 } // namespace media | 1077 } // namespace media |
| OLD | NEW |