Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 178153004: Enable round-tripping and updating of WebSourceBufferImpl timestamp offset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initializes |user_specified_timestamp_offset_| to 0.0. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 chunk_demuxer_->AppendData( 300 chunk_demuxer_->AppendData(
301 kSourceId, file_data_->data() + current_position_, size); 301 kSourceId, file_data_->data() + current_position_, size);
302 current_position_ += size; 302 current_position_ += size;
303 } 303 }
304 304
305 void AppendAtTime(const base::TimeDelta& timestampOffset, 305 void AppendAtTime(const base::TimeDelta& timestampOffset,
306 const uint8* pData, int size) { 306 const uint8* pData, int size) {
307 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, timestampOffset)); 307 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId,
308 timestampOffset.InSecondsF()));
308 chunk_demuxer_->AppendData(kSourceId, pData, size); 309 chunk_demuxer_->AppendData(kSourceId, pData, size);
309 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, base::TimeDelta())); 310 CHECK(chunk_demuxer_->SetTimestampOffset(kSourceId, 0));
310 } 311 }
311 312
312 void EndOfStream() { 313 void EndOfStream() {
313 chunk_demuxer_->MarkEndOfStream(PIPELINE_OK); 314 chunk_demuxer_->MarkEndOfStream(PIPELINE_OK);
314 } 315 }
315 316
316 void Abort() { 317 void Abort() {
317 if (!chunk_demuxer_) 318 if (!chunk_demuxer_)
318 return; 319 return;
319 chunk_demuxer_->Shutdown(); 320 chunk_demuxer_->Shutdown();
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Verify that VP8 video with inband text track can be played back. 1113 // Verify that VP8 video with inband text track can be played back.
1113 TEST_F(PipelineIntegrationTest, 1114 TEST_F(PipelineIntegrationTest,
1114 BasicPlayback_VP8_WebVTT_WebM) { 1115 BasicPlayback_VP8_WebVTT_WebM) {
1115 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1116 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1116 PIPELINE_OK)); 1117 PIPELINE_OK));
1117 Play(); 1118 Play();
1118 ASSERT_TRUE(WaitUntilOnEnded()); 1119 ASSERT_TRUE(WaitUntilOnEnded());
1119 } 1120 }
1120 1121
1121 } // namespace media 1122 } // namespace media
OLDNEW
« media/filters/chunk_demuxer.cc ('K') | « media/filters/chunk_demuxer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698