Use hidl.allocator for IAllocator.
android.hidl.memory is being split into android.hidl.memory and
android.hidl.allocator since the former is a passthrough hal and the
latter is a binderized service.
Bug: 35327976
Test: hidl_test, lshal, youtube/camera works
Change-Id: I7a2e72dcd3721d2689eb7ef95f5b140ecc1c446f
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index 90d9942..d750406 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -42,11 +42,20 @@
struct DataConverter;
// Treble shared memory
-namespace hidl { namespace memory { namespace V1_0 {
+namespace hidl {
+namespace allocator {
+namespace V1_0 {
struct IAllocator;
+} // V1_0
+} // allocator
+namespace memory {
+namespace V1_0 {
struct IMemory;
-}}};
-typedef hidl::memory::V1_0::IAllocator TAllocator;
+} // V1_0
+} // memory
+} // hidl
+
+typedef hidl::allocator::V1_0::IAllocator TAllocator;
typedef hidl::memory::V1_0::IMemory TMemory;
struct ACodec : public AHierarchicalStateMachine, public CodecBase {
diff --git a/media/libaudiohal/Android.mk b/media/libaudiohal/Android.mk
index 617eb35..286c6b7 100644
--- a/media/libaudiohal/Android.mk
+++ b/media/libaudiohal/Android.mk
@@ -45,6 +45,7 @@
android.hardware.audio.common@2.0 \
android.hardware.audio.common@2.0-util \
android.hardware.audio.effect@2.0 \
+ android.hidl.allocator@1.0 \
android.hidl.memory@1.0 \
libmedia_helper \
libmediautils
diff --git a/media/libaudiohal/EffectBufferHalHidl.cpp b/media/libaudiohal/EffectBufferHalHidl.cpp
index 82b4a75..ce581f2 100644
--- a/media/libaudiohal/EffectBufferHalHidl.cpp
+++ b/media/libaudiohal/EffectBufferHalHidl.cpp
@@ -19,7 +19,7 @@
#define LOG_TAG "EffectBufferHalHidl"
//#define LOG_NDEBUG 0
-#include <android/hidl/memory/1.0/IAllocator.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
#include <hidlmemory/mapping.h>
#include <utils/Log.h>
@@ -28,7 +28,7 @@
using ::android::hardware::Return;
using ::android::hardware::Status;
-using ::android::hidl::memory::V1_0::IAllocator;
+using ::android::hidl::allocator::V1_0::IAllocator;
namespace android {
diff --git a/media/libaudiohal/EffectsFactoryHalHidl.cpp b/media/libaudiohal/EffectsFactoryHalHidl.cpp
index ad12654..0ec9f9e 100644
--- a/media/libaudiohal/EffectsFactoryHalHidl.cpp
+++ b/media/libaudiohal/EffectsFactoryHalHidl.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "EffectsFactoryHalHidl"
//#define LOG_NDEBUG 0
-#include <android/hidl/memory/1.0/IAllocator.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
#include <cutils/native_handle.h>
#include <hidl/ServiceManagement.h>
#include <media/EffectsFactoryApi.h>
@@ -50,7 +50,7 @@
// TODO: Waiting should not be needed (b/34772726).
// Also remove include of IAllocator.h and ServiceManagement.h
android::hardware::details::waitForHwService(
- hidl::memory::V1_0::IAllocator::descriptor, "ashmem");
+ hidl::allocator::V1_0::IAllocator::descriptor, "ashmem");
}
EffectsFactoryHalHidl::~EffectsFactoryHalHidl() {
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 3f56725..78f28ae 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -61,7 +61,7 @@
#include "include/SharedMemoryBuffer.h"
#include "omx/OMXUtils.h"
-#include <android/hidl/memory/1.0/IAllocator.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include "omx/hal/1.0/utils/WOmxNode.h"
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 410dbc9..d044754 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -115,6 +115,7 @@
libRScpp \
libhidlbase \
libhidlmemory \
+ android.hidl.allocator@1.0 \
android.hidl.memory@1.0 \
android.hardware.media.omx@1.0 \
android.hardware.media.omx@1.0-utils \
diff --git a/media/libstagefright/omx/tests/OMXHarness.h b/media/libstagefright/omx/tests/OMXHarness.h
index 022707f..94a37da 100644
--- a/media/libstagefright/omx/tests/OMXHarness.h
+++ b/media/libstagefright/omx/tests/OMXHarness.h
@@ -24,7 +24,7 @@
#include <utils/threads.h>
#include <binder/MemoryDealer.h>
-#include <android/hidl/memory/1.0/IAllocator.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <OMX_Component.h>