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

Unified Diff: services/media/framework/stages/active_source_stage.h

Issue 1678433002: Motown: Remove LPCM optimizations, fix prepare, add flush, add ActiveMultistreamSink model/stage (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: services/media/framework/stages/active_source_stage.h
diff --git a/services/media/framework/stages/active_source_stage.h b/services/media/framework/stages/active_source_stage.h
index c89ef25c71bae60c2c634c0d65192da7a70350d9..1714be1d62d61e5a5662b3b911bd98256c73ce32 100644
--- a/services/media/framework/stages/active_source_stage.h
+++ b/services/media/framework/stages/active_source_stage.h
@@ -2,8 +2,8 @@
// 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_SOURCE_STAGE_H_
-#define SERVICES_MEDIA_FRAMEWORK_ENGINE_ACTIVE_SOURCE_STAGE_H_
+#ifndef SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_SOURCE_STAGE_H_
+#define SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_SOURCE_STAGE_H_
#include <deque>
@@ -16,32 +16,47 @@ namespace media {
// A stage that hosts an ActiveSource.
class ActiveSourceStage : public Stage {
public:
- ActiveSourceStage(ActiveSourcePtr source);
+ ActiveSourceStage(std::shared_ptr<ActiveSource> source);
~ActiveSourceStage() override;
// Stage implementation.
- uint32_t input_count() const override;
+ size_t input_count() const override;
- StageInput& input(uint32_t index) override;
+ Input& input(size_t index) override;
- uint32_t output_count() const override;
+ size_t output_count() const override;
- StageOutput& output(uint32_t index) override;
+ Output& output(size_t index) override;
- bool Prepare(UpdateCallback update_callback) override;
+ PayloadAllocator* PrepareInput(size_t index) override;
+
+ void PrepareOutput(
+ size_t index,
+ PayloadAllocator* allocator,
+ const UpstreamCallback& callback) override;
+
+ void UnprepareOutput(
+ size_t index,
+ const UpstreamCallback& callback) override;
void Update(Engine* engine) override;
+ void FlushInput(
+ size_t index,
+ const DownstreamCallback& callback) override;
+
+ void FlushOutput(size_t index) override;
+
private:
- StageOutput output_;
- ActiveSourcePtr source_;
+ Output output_;
+ std::shared_ptr<ActiveSource> source_;
+ bool prepared_;
ActiveSource::SupplyCallback supply_function_;
- Stage::UpdateCallback update_callback_;
std::deque<PacketPtr> packets_;
};
} // namespace media
} // namespace mojo
-#endif // SERVICES_MEDIA_FRAMEWORK_ENGINE_ACTIVE_SOURCE_STAGE_H_
+#endif // SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_SOURCE_STAGE_H_
« no previous file with comments | « services/media/framework/stages/active_sink_stage.cc ('k') | services/media/framework/stages/active_source_stage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698