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

Unified Diff: services/media/framework/models/active_source.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
« no previous file with comments | « services/media/framework/models/active_sink.h ('k') | services/media/framework/models/lpcm_frame_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/framework/models/active_source.h
diff --git a/services/media/framework/models/active_source.h b/services/media/framework/models/active_source.h
index a1b7b82494a64d79531f066f565eb21b3f9b049f..e2862797141f730a1caadba56fe5a87cc1359091 100644
--- a/services/media/framework/models/active_source.h
+++ b/services/media/framework/models/active_source.h
@@ -5,37 +5,34 @@
#ifndef MOJO_MEDIA_MODELS_ACTIVE_SOURCE_H_
#define MOJO_MEDIA_MODELS_ACTIVE_SOURCE_H_
-#include <memory>
-
-#include "services/media/framework/allocator.h"
#include "services/media/framework/models/demand.h"
+#include "services/media/framework/models/part.h"
#include "services/media/framework/packet.h"
+#include "services/media/framework/payload_allocator.h"
namespace mojo {
namespace media {
// Source that produces packets asynchronously.
-class ActiveSource {
+class ActiveSource : public Part {
public:
using SupplyCallback = std::function<void(PacketPtr packet)>;
- virtual ~ActiveSource() {}
+ ~ActiveSource() override {}
// Whether the source can accept an allocator.
virtual bool can_accept_allocator() const = 0;
// Sets the allocator for the source.
- virtual void set_allocator(Allocator* allocator) = 0;
+ virtual void set_allocator(PayloadAllocator* allocator) = 0;
// Sets the callback that supplies a packet asynchronously.
- virtual void SetSupplyCallback(SupplyCallback supply_callback) = 0;
+ virtual void SetSupplyCallback(const SupplyCallback& supply_callback) = 0;
// Sets the demand signalled from downstream.
virtual void SetDownstreamDemand(Demand demand) = 0;
};
-typedef std::shared_ptr<ActiveSource> ActiveSourcePtr;
-
} // namespace media
} // namespace mojo
« no previous file with comments | « services/media/framework/models/active_sink.h ('k') | services/media/framework/models/lpcm_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698