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

Side by Side Diff: services/media/framework/engine.cc

Issue 1692443002: Motown: Framework parts for mojo transport (producer/consumer/mediapipe) and control (audiotrack). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added comments to AudioTrackController::SetRate regarding the proper way to implement it. Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/media/framework/engine.h" 5 #include "services/media/framework/engine.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 namespace media { 8 namespace media {
9 9
10 Engine::Engine() {} 10 Engine::Engine() {}
(...skipping 21 matching lines...) Expand all
32 [] (const InputRef& input, 32 [] (const InputRef& input,
33 const OutputRef& output, 33 const OutputRef& output,
34 const Stage::UpstreamCallback& callback) { 34 const Stage::UpstreamCallback& callback) {
35 DCHECK(input.actual().prepared()); 35 DCHECK(input.actual().prepared());
36 input.stage_->UnprepareInput(input.index_); 36 input.stage_->UnprepareInput(input.index_);
37 output.stage_->UnprepareOutput(output.index_, callback); 37 output.stage_->UnprepareOutput(output.index_, callback);
38 }); 38 });
39 } 39 }
40 40
41 void Engine::FlushOutput(const OutputRef& output) { 41 void Engine::FlushOutput(const OutputRef& output) {
42 if (!output.connected()) {
43 return;
44 }
42 VisitDownstream( 45 VisitDownstream(
43 output, 46 output,
44 [] (const OutputRef& output, 47 [] (const OutputRef& output,
45 const InputRef& input, 48 const InputRef& input,
46 const Stage::DownstreamCallback& callback) { 49 const Stage::DownstreamCallback& callback) {
47 DCHECK(input.actual().prepared()); 50 DCHECK(input.actual().prepared());
48 output.stage_->FlushOutput(output.index_); 51 output.stage_->FlushOutput(output.index_);
49 input.stage_->FlushInput(input.index_, callback); 52 input.stage_->FlushInput(input.index_, callback);
50 }); 53 });
51 } 54 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 191
189 Stage* stage = demand_backlog_.top(); 192 Stage* stage = demand_backlog_.top();
190 demand_backlog_.pop(); 193 demand_backlog_.pop();
191 DCHECK(stage->in_demand_backlog_); 194 DCHECK(stage->in_demand_backlog_);
192 stage->in_demand_backlog_ = false; 195 stage->in_demand_backlog_ = false;
193 return stage; 196 return stage;
194 } 197 }
195 198
196 } // namespace media 199 } // namespace media
197 } // namespace mojo 200 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/framework/conversion_pipeline_builder.cc ('k') | services/media/framework/graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698