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

Unified Diff: services/media/framework/payload_allocator.cc

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/payload_allocator.h ('k') | services/media/framework/ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/framework/payload_allocator.cc
diff --git a/services/media/framework/allocator.cc b/services/media/framework/payload_allocator.cc
similarity index 58%
rename from services/media/framework/allocator.cc
rename to services/media/framework/payload_allocator.cc
index e0665995177967a9cbe7598a0eb2589b55cf2500..94938f7ccd31dc4c31b65505f1ea419a66d0eb4c 100644
--- a/services/media/framework/allocator.cc
+++ b/services/media/framework/payload_allocator.cc
@@ -5,29 +5,29 @@
#include <cstdlib>
#include "base/logging.h"
-#include "services/media/framework/allocator.h"
+#include "services/media/framework/payload_allocator.h"
namespace mojo {
namespace media {
namespace {
-class DefaultAllocator : public Allocator {
+class DefaultAllocator : public PayloadAllocator {
public:
constexpr DefaultAllocator() {}
- // Allocator implementation.
- void* AllocatePayloadBuffer(uint64_t size) override;
+ // PayloadAllocator implementation.
+ void* AllocatePayloadBuffer(size_t size) override;
- void ReleasePayloadBuffer(uint64_t size, void* buffer) override;
+ void ReleasePayloadBuffer(size_t size, void* buffer) override;
};
-void* DefaultAllocator::AllocatePayloadBuffer(uint64_t size) {
+void* DefaultAllocator::AllocatePayloadBuffer(size_t size) {
DCHECK(size > 0);
return std::malloc(static_cast<size_t>(size));
}
-void DefaultAllocator::ReleasePayloadBuffer(uint64_t size, void* buffer) {
+void DefaultAllocator::ReleasePayloadBuffer(size_t size, void* buffer) {
DCHECK(size > 0);
DCHECK(buffer);
std::free(buffer);
@@ -38,7 +38,7 @@ static constexpr DefaultAllocator default_allocator;
} // namespace
// static
-Allocator* Allocator::GetDefault() {
+PayloadAllocator* PayloadAllocator::GetDefault() {
return const_cast<DefaultAllocator*>(&default_allocator);
}
« no previous file with comments | « services/media/framework/payload_allocator.h ('k') | services/media/framework/ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698