#include <log/log.h>
#include <utils/Trace.h>
+#include <media/hardware/HardwareAPI.h> // For VideoNativeHandleMetadata
#include "CameraDevice_1_0.h"
namespace android {
if (mem->mBufSize == sizeof(VideoNativeHandleMetadata)) {
VideoNativeHandleMetadata* md = (VideoNativeHandleMetadata*)
((uint8_t*) mem->mHidlHeapMemData + index * mem->mBufSize);
- if (md->eType == VideoNativeHandleMetadata::kMetadataBufferTypeNativeHandleSource) {
+ if (md->eType == kMetadataBufferTypeNativeHandleSource) {
handle = md->pHandle;
}
}
void *data = ((uint8_t *) camMemory->mHidlHeapMemData) + bufferIndex * camMemory->mBufSize;
if (handle) {
VideoNativeHandleMetadata* md = (VideoNativeHandleMetadata*) data;
- if (md->eType == VideoNativeHandleMetadata::kMetadataBufferTypeNativeHandleSource) {
+ if (md->eType == kMetadataBufferTypeNativeHandleSource) {
// Input handle will be closed by HIDL transport later, so clone it
// HAL implementation is responsible to close/delete the clone
native_handle_t* clone = native_handle_clone(handle);
};
sp<IAllocator> mAshmemAllocator;
-
- // TODO: b/35625849
- // Meta data buffer layout for passing a native_handle to codec
- // matching frameworks/native/include/media/hardware/MetadataBufferType.h and
- // frameworks/native/include/media/hardware/HardwareAPI.h
- struct VideoNativeHandleMetadata {
- static const uint32_t kMetadataBufferTypeNativeHandleSource = 3;
- uint32_t eType; // must be kMetadataBufferTypeNativeHandleSource
- native_handle_t* pHandle;
- };
-
const sp<CameraModule> mModule;
const std::string mCameraId;
// const after ctor