Loading camera/device/1.0/ICameraDevicePreviewCallback.hal +1 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.hardware.camera.device@1.0; import android.hardware.camera.common@1.0::types; import android.hardware.graphics.allocator@2.0::types; import android.hardware.graphics.common@1.0::types; /** Loading Loading @@ -89,7 +88,7 @@ interface ICameraDevicePreviewCallback { * * @return Status The status code for this operation. */ setUsage(ProducerUsage usage) generates (Status status); setUsage(ProducerUsageFlags usage) generates (Status status); /** * Set the expected buffering mode for the preview output. Loading camera/device/1.0/default/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ cc_library_shared { "libbinder", ], static_libs: [ "android.hardware.camera.common@1.0-helper" "android.hardware.camera.common@1.0-helper", "libgrallocusage" ], export_include_dirs: ["."] } camera/device/1.0/default/CameraDevice.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <hardware/gralloc1.h> #include <utils/Trace.h> #include <grallocusage/GrallocUsageConversion.h> #include "CameraDevice_1_0.h" namespace android { Loading @@ -29,7 +31,6 @@ namespace device { namespace V1_0 { namespace implementation { using ::android::hardware::graphics::allocator::V2_0::ProducerUsage; using ::android::hardware::graphics::common::V1_0::PixelFormat; HandleImporter& CameraDevice::sHandleImporter = HandleImporter::getInstance(); Loading Loading @@ -252,7 +253,10 @@ int CameraDevice::sSetUsage(struct preview_stream_ops* w, int usage) { } object->cleanUpCirculatingBuffers(); return getStatusT(object->mPreviewCallback->setUsage((ProducerUsage) usage)); ProducerUsageFlags producerUsage; uint64_t consumerUsage; ::android_convertGralloc0To1Usage(usage, &producerUsage, &consumerUsage); return getStatusT(object->mPreviewCallback->setUsage(producerUsage)); } int CameraDevice::sSetSwapInterval(struct preview_stream_ops *w, int interval) { Loading camera/device/1.0/types.hal +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.hardware.camera.device@1.0; import android.hardware.graphics.allocator@2.0::types; typedef bitfield<ProducerUsage> ProducerUsageFlags; enum CameraFacing : uint32_t { /** The facing of the camera is opposite to that of the screen. */ BACK = 0, Loading camera/device/3.2/default/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ cc_library_shared { "libcamera_metadata" ], static_libs: [ "android.hardware.camera.common@1.0-helper" "android.hardware.camera.common@1.0-helper", "libgrallocusage" ], export_include_dirs: ["."] } Loading
camera/device/1.0/ICameraDevicePreviewCallback.hal +1 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.hardware.camera.device@1.0; import android.hardware.camera.common@1.0::types; import android.hardware.graphics.allocator@2.0::types; import android.hardware.graphics.common@1.0::types; /** Loading Loading @@ -89,7 +88,7 @@ interface ICameraDevicePreviewCallback { * * @return Status The status code for this operation. */ setUsage(ProducerUsage usage) generates (Status status); setUsage(ProducerUsageFlags usage) generates (Status status); /** * Set the expected buffering mode for the preview output. Loading
camera/device/1.0/default/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ cc_library_shared { "libbinder", ], static_libs: [ "android.hardware.camera.common@1.0-helper" "android.hardware.camera.common@1.0-helper", "libgrallocusage" ], export_include_dirs: ["."] }
camera/device/1.0/default/CameraDevice.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <hardware/gralloc1.h> #include <utils/Trace.h> #include <grallocusage/GrallocUsageConversion.h> #include "CameraDevice_1_0.h" namespace android { Loading @@ -29,7 +31,6 @@ namespace device { namespace V1_0 { namespace implementation { using ::android::hardware::graphics::allocator::V2_0::ProducerUsage; using ::android::hardware::graphics::common::V1_0::PixelFormat; HandleImporter& CameraDevice::sHandleImporter = HandleImporter::getInstance(); Loading Loading @@ -252,7 +253,10 @@ int CameraDevice::sSetUsage(struct preview_stream_ops* w, int usage) { } object->cleanUpCirculatingBuffers(); return getStatusT(object->mPreviewCallback->setUsage((ProducerUsage) usage)); ProducerUsageFlags producerUsage; uint64_t consumerUsage; ::android_convertGralloc0To1Usage(usage, &producerUsage, &consumerUsage); return getStatusT(object->mPreviewCallback->setUsage(producerUsage)); } int CameraDevice::sSetSwapInterval(struct preview_stream_ops *w, int interval) { Loading
camera/device/1.0/types.hal +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.hardware.camera.device@1.0; import android.hardware.graphics.allocator@2.0::types; typedef bitfield<ProducerUsage> ProducerUsageFlags; enum CameraFacing : uint32_t { /** The facing of the camera is opposite to that of the screen. */ BACK = 0, Loading
camera/device/3.2/default/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ cc_library_shared { "libcamera_metadata" ], static_libs: [ "android.hardware.camera.common@1.0-helper" "android.hardware.camera.common@1.0-helper", "libgrallocusage" ], export_include_dirs: ["."] }