summaryrefslogtreecommitdiff
path: root/camera/device/CameraDevice_1_0.h
diff options
context:
space:
mode:
Diffstat (limited to 'camera/device/CameraDevice_1_0.h')
-rw-r--r--camera/device/CameraDevice_1_0.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/camera/device/CameraDevice_1_0.h b/camera/device/CameraDevice_1_0.h
index 2c980f0..ee9be9d 100644
--- a/camera/device/CameraDevice_1_0.h
+++ b/camera/device/CameraDevice_1_0.h
@@ -20,12 +20,12 @@
#include <unordered_map>
#include "utils/Mutex.h"
#include "utils/SortedVector.h"
+#include <binder/MemoryBase.h>
+#include <binder/MemoryHeapBase.h>
#include "CameraModule.h"
#include "HandleImporter.h"
#include <android/hardware/camera/device/1.0/ICameraDevice.h>
-#include <android/hidl/allocator/1.0/IAllocator.h>
-#include <android/hidl/memory/1.0/IMemory.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
@@ -47,9 +47,7 @@ using ::android::hardware::camera::device::V1_0::ICameraDevice;
using ::android::hardware::camera::device::V1_0::ICameraDeviceCallback;
using ::android::hardware::camera::device::V1_0::ICameraDevicePreviewCallback;
using ::android::hardware::camera::device::V1_0::MemoryId;
-using ::android::hidl::allocator::V1_0::IAllocator;
using ::android::hidl::base::V1_0::IBase;
-using ::android::hidl::memory::V1_0::IMemory;
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
@@ -115,23 +113,17 @@ private:
class CameraHeapMemory : public RefBase {
public:
CameraHeapMemory(int fd, size_t buf_size, uint_t num_buffers = 1);
- explicit CameraHeapMemory(
- sp<IAllocator> ashmemAllocator, size_t buf_size, uint_t num_buffers = 1);
+ explicit CameraHeapMemory(size_t buf_size, uint_t num_buffers = 1);
void commonInitialization();
virtual ~CameraHeapMemory();
size_t mBufSize;
uint_t mNumBufs;
-
- // Shared memory related members
- hidl_memory mHidlHeap;
- native_handle_t* mHidlHandle; // contains one shared memory FD
- void* mHidlHeapMemData;
- sp<IMemory> mHidlHeapMemory; // munmap happens in ~IMemory()
-
+ // TODO: b/35887419: use hidl_memory instead and get rid of libbinder
+ sp<MemoryHeapBase> mHeap;
+ sp<MemoryBase>* mBuffers;
CameraMemory handle;
};
- sp<IAllocator> mAshmemAllocator;
const sp<CameraModule> mModule;
const std::string mCameraId;