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

Unified Diff: services/media/framework_mojo/mojo_allocator.h

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, 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_mojo/mojo_allocator.h
diff --git a/services/media/framework_mojo/mojo_allocator.h b/services/media/framework_mojo/mojo_allocator.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a0fda4946464bfb8f27a8aaf5e0edda7f3740a0
--- /dev/null
+++ b/services/media/framework_mojo/mojo_allocator.h
@@ -0,0 +1,30 @@
+// 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_MOJO_MOJO_ALLOCATOR_H_
+#define SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_ALLOCATOR_H_
+
+#include "mojo/services/media/common/cpp/shared_media_buffer_allocator.h"
+#include "services/media/framework/payload_allocator.h"
+
+namespace mojo {
+namespace media {
+
+// Just like SharedMediaBufferAllocator but implements PayloadAllocator.
+class MojoAllocator :
+ public SharedMediaBufferAllocator,
+ public PayloadAllocator {
+ public:
+ ~MojoAllocator() override;
+
+ // PayloadAllocator implementation.
+ void* AllocatePayloadBuffer(size_t size) override;
+
+ void ReleasePayloadBuffer(size_t size, void* buffer) override;
+};
+
+} // namespace media
+} // namespace mojo
+
+#endif // SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_ALLOCATOR_H_
« no previous file with comments | « services/media/framework_mojo/audio_track_producer.cc ('k') | services/media/framework_mojo/mojo_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698