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

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

Issue 1833323002: Motown: Add ActiveMultistreamSource model in preparation for the ffmpeg demux with async I/O (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat 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 side-by-side diff with in-line comments
Download patch
Index: services/media/framework/stages/active_multistream_source_stage.h
diff --git a/services/media/framework/stages/multistream_source_stage.h b/services/media/framework/stages/active_multistream_source_stage.h
similarity index 61%
copy from services/media/framework/stages/multistream_source_stage.h
copy to services/media/framework/stages/active_multistream_source_stage.h
index d3b2aea94bb5bc9019a0d9ea94881f76c7bec58f..625c4e3f3d07c7147b6ce5f35900934a597ae30f 100644
--- a/services/media/framework/stages/multistream_source_stage.h
+++ b/services/media/framework/stages/active_multistream_source_stage.h
@@ -2,24 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SERVICES_MEDIA_FRAMEWORK_STAGES_MULTISTREAM_SOURCE_STAGE_H_
-#define SERVICES_MEDIA_FRAMEWORK_STAGES_MULTISTREAM_SOURCE_STAGE_H_
+#ifndef SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_MULTISTREAM_SOURCE_STAGE_H_
+#define SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_MULTISTREAM_SOURCE_STAGE_H_
#include <vector>
-#include "services/media/framework/models/multistream_source.h"
+#include "services/media/framework/models/active_multistream_source.h"
#include "services/media/framework/stages/stage.h"
namespace mojo {
namespace media {
-// A stage that hosts a MultistreamSource.
-// TODO(dalesat): May need to grow the list of outputs dynamically.
-class MultistreamSourceStage : public Stage {
+// A stage that hosts an ActiveMultistreamSource.
+class ActiveMultistreamSourceStage : public Stage {
public:
- MultistreamSourceStage(std::shared_ptr<MultistreamSource> source);
+ ActiveMultistreamSourceStage(std::shared_ptr<ActiveMultistreamSource> source);
- ~MultistreamSourceStage() override;
+ ~ActiveMultistreamSourceStage() override;
// Stage implementation.
size_t input_count() const override;
@@ -46,13 +45,14 @@ class MultistreamSourceStage : public Stage {
private:
std::vector<Output> outputs_;
- std::shared_ptr<MultistreamSource> source_;
+ std::shared_ptr<ActiveMultistreamSource> source_;
+ ActiveMultistreamSource::SupplyCallback supply_function_;
PacketPtr cached_packet_;
size_t cached_packet_output_index_;
- size_t ended_streams_;
+ size_t ended_streams_ = 0;
};
} // namespace media
} // namespace mojo
-#endif // SERVICES_MEDIA_FRAMEWORK_STAGES_MULTISTREAM_SOURCE_STAGE_H_
+#endif // SERVICES_MEDIA_FRAMEWORK_STAGES_ACTIVE_MULTISTREAM_SOURCE_STAGE_H_

Powered by Google App Engine
This is Rietveld 408576698