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

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

Issue 1999893004: Splits PipelineImpl into main and media thread components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restores posting stop done_cb Created 4 years, 6 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.cc ('k') | no next file » | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 clockless_playback_(false), 46 clockless_playback_(false),
47 pipeline_(new PipelineImpl(message_loop_.task_runner(), new MediaLog())), 47 pipeline_(new PipelineImpl(message_loop_.task_runner(), new MediaLog())),
48 ended_(false), 48 ended_(false),
49 pipeline_status_(PIPELINE_OK), 49 pipeline_status_(PIPELINE_OK),
50 last_video_frame_format_(PIXEL_FORMAT_UNKNOWN), 50 last_video_frame_format_(PIXEL_FORMAT_UNKNOWN),
51 last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED) { 51 last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED) {
52 base::MD5Init(&md5_context_); 52 base::MD5Init(&md5_context_);
53 } 53 }
54 54
55 PipelineIntegrationTestBase::~PipelineIntegrationTestBase() { 55 PipelineIntegrationTestBase::~PipelineIntegrationTestBase() {
56 if (!pipeline_->IsRunning()) 56 if (pipeline_->IsRunning())
57 return; 57 Stop();
58 58
59 Stop(); 59 pipeline_.reset();
60 message_loop_.RunUntilIdle();
60 } 61 }
61 62
62 // TODO(xhwang): Method definitions in this file needs to be reordered. 63 // TODO(xhwang): Method definitions in this file needs to be reordered.
63 64
64 void PipelineIntegrationTestBase::OnSeeked(base::TimeDelta seek_time, 65 void PipelineIntegrationTestBase::OnSeeked(base::TimeDelta seek_time,
65 PipelineStatus status) { 66 PipelineStatus status) {
66 EXPECT_EQ(seek_time, pipeline_->GetMediaTime()); 67 EXPECT_EQ(seek_time, pipeline_->GetMediaTime());
67 pipeline_status_ = status; 68 pipeline_status_ = status;
68 } 69 }
69 70
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 DCHECK(clockless_playback_); 382 DCHECK(clockless_playback_);
382 return clockless_audio_sink_->render_time(); 383 return clockless_audio_sink_->render_time();
383 } 384 }
384 385
385 base::TimeTicks DummyTickClock::NowTicks() { 386 base::TimeTicks DummyTickClock::NowTicks() {
386 now_ += base::TimeDelta::FromSeconds(60); 387 now_ += base::TimeDelta::FromSeconds(60);
387 return now_; 388 return now_;
388 } 389 }
389 390
390 } // namespace media 391 } // namespace media
OLDNEW
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698