Chromium Code Reviews| Index: services/media/framework/stages/active_sink_stage.h |
| diff --git a/services/media/framework/stages/active_sink_stage.h b/services/media/framework/stages/active_sink_stage.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..273773ab9f55677ccfb38d200fbac7e55b587beb |
| --- /dev/null |
| +++ b/services/media/framework/stages/active_sink_stage.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SERVICES_MEDIA_FRAMEWORK_ENGINE_ACTIVE_SINK_STAGE_H_ |
| +#define SERVICES_MEDIA_FRAMEWORK_ENGINE_ACTIVE_SINK_STAGE_H_ |
| + |
| +#include <deque> |
| + |
| +#include "services/media/framework/models/active_sink.h" |
| +#include "services/media/framework/stages/stage.h" |
| + |
| +namespace mojo { |
| +namespace media { |
| + |
| +// A stage that hosts an ActiveSink. |
| +class ActiveSinkStage : public SinkStage, public SingleInputStage { |
|
johngro
2016/01/26 23:47:29
see comments in stage.h about MI, this applies to
dalesat
2016/01/28 18:49:16
Acknowledged.
|
| + public: |
| + ActiveSinkStage(ActiveSinkPtr source); |
| + |
| + ~ActiveSinkStage() override; |
| + |
| + // Stage implementation. |
| + bool Prepare(UpdateCallback update_callback) override; |
| + |
| + void Prime() override; |
| + |
| + void Update(Engine* engine) override; |
| + |
| + private: |
| + ActiveSinkPtr sink_; |
| + ActiveSink::DemandCallback demand_function_; |
| + Stage::UpdateCallback update_callback_; |
| + Demand sink_demand_; |
| +}; |
| + |
| +} // namespace media |
| +} // namespace mojo |
| + |
| +#endif // SERVICES_MEDIA_FRAMEWORK_ENGINE_ACTIVE_SINK_STAGE_H_ |