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

Side by Side Diff: media/test/pipeline_integration_test_base.cc

Issue 2738503005: Created battor.tough_energy_cases (without dcurtis's change)
Patch Set: Reupload Created 3 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
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | testing/buildbot/chromium.perf.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/pipeline_integration_test_base.h" 5 #include "media/test/pipeline_integration_test_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 last_video_frame_format_(PIXEL_FORMAT_UNKNOWN), 52 last_video_frame_format_(PIXEL_FORMAT_UNKNOWN),
53 last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED), 53 last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED),
54 current_duration_(kInfiniteDuration) { 54 current_duration_(kInfiniteDuration) {
55 ResetVideoHash(); 55 ResetVideoHash();
56 } 56 }
57 57
58 PipelineIntegrationTestBase::~PipelineIntegrationTestBase() { 58 PipelineIntegrationTestBase::~PipelineIntegrationTestBase() {
59 if (pipeline_->IsRunning()) 59 if (pipeline_->IsRunning())
60 Stop(); 60 Stop();
61 61
62 demuxer_.reset();
63 pipeline_.reset(); 62 pipeline_.reset();
64 base::RunLoop().RunUntilIdle(); 63 base::RunLoop().RunUntilIdle();
65 } 64 }
66 65
67 // TODO(xhwang): Method definitions in this file needs to be reordered. 66 // TODO(xhwang): Method definitions in this file needs to be reordered.
68 67
69 void PipelineIntegrationTestBase::OnSeeked(base::TimeDelta seek_time, 68 void PipelineIntegrationTestBase::OnSeeked(base::TimeDelta seek_time,
70 PipelineStatus status) { 69 PipelineStatus status) {
71 EXPECT_EQ(seek_time, pipeline_->GetMediaTime()); 70 EXPECT_EQ(seek_time, pipeline_->GetMediaTime());
72 pipeline_status_ = status; 71 pipeline_status_ = status;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 base::TimeDelta::FromMilliseconds(10)); 303 base::TimeDelta::FromMilliseconds(10));
305 base::RunLoop().Run(); 304 base::RunLoop().Run();
306 return (pipeline_status_ == PIPELINE_OK); 305 return (pipeline_status_ == PIPELINE_OK);
307 } 306 }
308 307
309 void PipelineIntegrationTestBase::CreateDemuxer( 308 void PipelineIntegrationTestBase::CreateDemuxer(
310 std::unique_ptr<DataSource> data_source) { 309 std::unique_ptr<DataSource> data_source) {
311 data_source_ = std::move(data_source); 310 data_source_ = std::move(data_source);
312 311
313 #if !defined(MEDIA_DISABLE_FFMPEG) 312 #if !defined(MEDIA_DISABLE_FFMPEG)
314 task_scheduler_.reset(new base::test::ScopedTaskScheduler(&message_loop_));
315 demuxer_ = std::unique_ptr<Demuxer>(new FFmpegDemuxer( 313 demuxer_ = std::unique_ptr<Demuxer>(new FFmpegDemuxer(
316 message_loop_.task_runner(), data_source_.get(), 314 message_loop_.task_runner(), data_source_.get(),
317 base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB, 315 base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB,
318 base::Unretained(this)), 316 base::Unretained(this)),
319 base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB, 317 base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB,
320 base::Unretained(this)), 318 base::Unretained(this)),
321 new MediaLog())); 319 new MediaLog()));
322 #endif 320 #endif
323 } 321 }
324 322
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 DCHECK(clockless_playback_); 442 DCHECK(clockless_playback_);
445 return clockless_audio_sink_->render_time(); 443 return clockless_audio_sink_->render_time();
446 } 444 }
447 445
448 base::TimeTicks DummyTickClock::NowTicks() { 446 base::TimeTicks DummyTickClock::NowTicks() {
449 now_ += base::TimeDelta::FromSeconds(60); 447 now_ += base::TimeDelta::FromSeconds(60);
450 return now_; 448 return now_;
451 } 449 }
452 450
453 } // namespace media 451 } // namespace media
OLDNEW
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | testing/buildbot/chromium.perf.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698