Loading camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp +15 −14 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <torch_provider_cb.h> #include <torch_provider_cb.h> #include <com_android_internal_camera_flags.h> #include <com_android_internal_camera_flags.h> #include <list> #include <list> #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraResourceCost; using ::aidl::android::hardware::camera::common::CameraResourceCost; Loading Loading @@ -1622,9 +1623,9 @@ TEST_P(CameraAidlTest, processMultiCaptureRequestPreview) { BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); graphicBuffers.push_back(buffer_handle); graphicBuffers.push_back(buffer_handle); outputBuffers[k] = { outputBuffers[k] = { Loading Loading @@ -1838,9 +1839,9 @@ TEST_P(CameraAidlTest, processUltraHighResolutionRequest) { NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); graphicBuffers.push_back(buffer_handle); graphicBuffers.push_back(buffer_handle); outputBuffers[k] = { outputBuffers[k] = { Loading Loading @@ -2004,9 +2005,9 @@ TEST_P(CameraAidlTest, process10BitDynamicRangeRequest) { NativeHandle(), BufferStatus::OK, NativeHandle(), BufferStatus::OK, NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { auto usage = android_convertGralloc1To0Usage( auto usage = ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)); static_cast<uint64_t>(halStream.consumerUsage))); allocateGraphicBuffer(previewStream.width, previewStream.height, usage, allocateGraphicBuffer(previewStream.width, previewStream.height, usage, halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); Loading Loading @@ -2223,9 +2224,9 @@ TEST_P(CameraAidlTest, processCaptureRequestBurstISO) { NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffers[i]); halStreams[0].overrideFormat, &buffers[i]); outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -2323,9 +2324,9 @@ TEST_P(CameraAidlTest, processCaptureRequestInvalidSinglePreview) { bufferId = 0; bufferId = 0; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); } } Loading Loading @@ -2446,9 +2447,9 @@ TEST_P(CameraAidlTest, switchToOffline) { } else { } else { // jpeg buffer (w,h) = (blobLen, 1) // jpeg buffer (w,h) = (blobLen, 1) allocateGraphicBuffer(jpegBufferSize, /*height*/ 1, allocateGraphicBuffer(jpegBufferSize, /*height*/ 1, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffers[i]); halStream.overrideFormat, &buffers[i]); outputBuffer = {halStream.id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStream.id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -2672,9 +2673,9 @@ TEST_P(CameraAidlTest, flushPreviewRequest) { BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading camera/provider/aidl/vts/camera_aidl_test.cpp +9 −8 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ #include <regex> #include <regex> #include <typeinfo> #include <typeinfo> #include "utils/Errors.h" #include "utils/Errors.h" #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::TorchModeStatus; using ::aidl::android::hardware::camera::common::TorchModeStatus; Loading Loading @@ -2263,8 +2264,8 @@ void CameraAidlTest::processCaptureRequestInternal(uint64_t bufferUsage, /* We don't look at halStreamConfig.streams[0].consumerUsage /* We don't look at halStreamConfig.streams[0].consumerUsage * since that is 0 for output streams * since that is 0 for output streams */ */ android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), bufferUsage), static_cast<uint64_t>(halStreams[0].producerUsage), bufferUsage)), halStreams[0].overrideFormat, &handle); halStreams[0].overrideFormat, &handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(handle), Loading Loading @@ -2775,9 +2776,9 @@ void CameraAidlTest::processPreviewStabilizationCaptureRequestInternal( /* We don't look at halStreamConfig.streams[0].consumerUsage /* We don't look at halStreamConfig.streams[0].consumerUsage * since that is 0 for output streams * since that is 0 for output streams */ */ android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), GRALLOC1_CONSUMER_USAGE_HWCOMPOSER), GRALLOC1_CONSUMER_USAGE_HWCOMPOSER)), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -3757,9 +3758,9 @@ void CameraAidlTest::processColorSpaceRequest( NativeHandle(), BufferStatus::OK, NativeHandle(), BufferStatus::OK, NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { auto usage = android_convertGralloc1To0Usage( auto usage = ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)); static_cast<uint64_t>(halStream.consumerUsage))); allocateGraphicBuffer(previewStream.width, previewStream.height, usage, allocateGraphicBuffer(previewStream.width, previewStream.height, usage, halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); Loading Loading @@ -3913,9 +3914,9 @@ void CameraAidlTest::processZoomSettingsOverrideRequests( NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffers[i]); halStreams[0].overrideFormat, &buffers[i]); outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading camera/provider/aidl/vts/device_cb.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <aidlcommonsupport/NativeHandle.h> #include <aidlcommonsupport/NativeHandle.h> #include <grallocusage/GrallocUsageConversion.h> #include <grallocusage/GrallocUsageConversion.h> #include <cinttypes> #include <cinttypes> #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::device::BufferStatus; using ::aidl::android::hardware::camera::device::BufferStatus; using ::aidl::android::hardware::camera::device::ErrorMsg; using ::aidl::android::hardware::camera::device::ErrorMsg; Loading Loading @@ -143,8 +144,8 @@ ScopedAStatus DeviceCb::requestStreamBuffers(const std::vector<BufferRequest>& b CameraAidlTest::allocateGraphicBuffer( CameraAidlTest::allocateGraphicBuffer( w, h, w, h, android_convertGralloc1To0Usage(static_cast<uint64_t>(halStream.producerUsage), ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage(static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &handle); halStream.overrideFormat, &handle); StreamBuffer streamBuffer = StreamBuffer(); StreamBuffer streamBuffer = StreamBuffer(); Loading Loading
camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp +15 −14 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <torch_provider_cb.h> #include <torch_provider_cb.h> #include <com_android_internal_camera_flags.h> #include <com_android_internal_camera_flags.h> #include <list> #include <list> #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraResourceCost; using ::aidl::android::hardware::camera::common::CameraResourceCost; Loading Loading @@ -1622,9 +1623,9 @@ TEST_P(CameraAidlTest, processMultiCaptureRequestPreview) { BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); graphicBuffers.push_back(buffer_handle); graphicBuffers.push_back(buffer_handle); outputBuffers[k] = { outputBuffers[k] = { Loading Loading @@ -1838,9 +1839,9 @@ TEST_P(CameraAidlTest, processUltraHighResolutionRequest) { NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); graphicBuffers.push_back(buffer_handle); graphicBuffers.push_back(buffer_handle); outputBuffers[k] = { outputBuffers[k] = { Loading Loading @@ -2004,9 +2005,9 @@ TEST_P(CameraAidlTest, process10BitDynamicRangeRequest) { NativeHandle(), BufferStatus::OK, NativeHandle(), BufferStatus::OK, NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { auto usage = android_convertGralloc1To0Usage( auto usage = ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)); static_cast<uint64_t>(halStream.consumerUsage))); allocateGraphicBuffer(previewStream.width, previewStream.height, usage, allocateGraphicBuffer(previewStream.width, previewStream.height, usage, halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); Loading Loading @@ -2223,9 +2224,9 @@ TEST_P(CameraAidlTest, processCaptureRequestBurstISO) { NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffers[i]); halStreams[0].overrideFormat, &buffers[i]); outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -2323,9 +2324,9 @@ TEST_P(CameraAidlTest, processCaptureRequestInvalidSinglePreview) { bufferId = 0; bufferId = 0; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); } } Loading Loading @@ -2446,9 +2447,9 @@ TEST_P(CameraAidlTest, switchToOffline) { } else { } else { // jpeg buffer (w,h) = (blobLen, 1) // jpeg buffer (w,h) = (blobLen, 1) allocateGraphicBuffer(jpegBufferSize, /*height*/ 1, allocateGraphicBuffer(jpegBufferSize, /*height*/ 1, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &buffers[i]); halStream.overrideFormat, &buffers[i]); outputBuffer = {halStream.id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStream.id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -2672,9 +2673,9 @@ TEST_P(CameraAidlTest, flushPreviewRequest) { BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading
camera/provider/aidl/vts/camera_aidl_test.cpp +9 −8 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ #include <regex> #include <regex> #include <typeinfo> #include <typeinfo> #include "utils/Errors.h" #include "utils/Errors.h" #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::CameraDeviceStatus; using ::aidl::android::hardware::camera::common::TorchModeStatus; using ::aidl::android::hardware::camera::common::TorchModeStatus; Loading Loading @@ -2263,8 +2264,8 @@ void CameraAidlTest::processCaptureRequestInternal(uint64_t bufferUsage, /* We don't look at halStreamConfig.streams[0].consumerUsage /* We don't look at halStreamConfig.streams[0].consumerUsage * since that is 0 for output streams * since that is 0 for output streams */ */ android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), bufferUsage), static_cast<uint64_t>(halStreams[0].producerUsage), bufferUsage)), halStreams[0].overrideFormat, &handle); halStreams[0].overrideFormat, &handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(handle), Loading Loading @@ -2775,9 +2776,9 @@ void CameraAidlTest::processPreviewStabilizationCaptureRequestInternal( /* We don't look at halStreamConfig.streams[0].consumerUsage /* We don't look at halStreamConfig.streams[0].consumerUsage * since that is 0 for output streams * since that is 0 for output streams */ */ android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), GRALLOC1_CONSUMER_USAGE_HWCOMPOSER), GRALLOC1_CONSUMER_USAGE_HWCOMPOSER)), halStreams[0].overrideFormat, &buffer_handle); halStreams[0].overrideFormat, &buffer_handle); outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), outputBuffer = {halStreams[0].id, bufferId, ::android::makeToAidl(buffer_handle), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading Loading @@ -3757,9 +3758,9 @@ void CameraAidlTest::processColorSpaceRequest( NativeHandle(), BufferStatus::OK, NativeHandle(), BufferStatus::OK, NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { auto usage = android_convertGralloc1To0Usage( auto usage = ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)); static_cast<uint64_t>(halStream.consumerUsage))); allocateGraphicBuffer(previewStream.width, previewStream.height, usage, allocateGraphicBuffer(previewStream.width, previewStream.height, usage, halStream.overrideFormat, &buffer_handle); halStream.overrideFormat, &buffer_handle); Loading Loading @@ -3913,9 +3914,9 @@ void CameraAidlTest::processZoomSettingsOverrideRequests( NativeHandle(), NativeHandle()}; NativeHandle(), NativeHandle()}; } else { } else { allocateGraphicBuffer(previewStream.width, previewStream.height, allocateGraphicBuffer(previewStream.width, previewStream.height, android_convertGralloc1To0Usage( ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage( static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].producerUsage), static_cast<uint64_t>(halStreams[0].consumerUsage)), static_cast<uint64_t>(halStreams[0].consumerUsage))), halStreams[0].overrideFormat, &buffers[i]); halStreams[0].overrideFormat, &buffers[i]); outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), outputBuffer = {halStreams[0].id, bufferId + i, ::android::makeToAidl(buffers[i]), BufferStatus::OK, NativeHandle(), NativeHandle()}; BufferStatus::OK, NativeHandle(), NativeHandle()}; Loading
camera/provider/aidl/vts/device_cb.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <aidlcommonsupport/NativeHandle.h> #include <aidlcommonsupport/NativeHandle.h> #include <grallocusage/GrallocUsageConversion.h> #include <grallocusage/GrallocUsageConversion.h> #include <cinttypes> #include <cinttypes> #include <nativebase/nativebase.h> using ::aidl::android::hardware::camera::device::BufferStatus; using ::aidl::android::hardware::camera::device::BufferStatus; using ::aidl::android::hardware::camera::device::ErrorMsg; using ::aidl::android::hardware::camera::device::ErrorMsg; Loading Loading @@ -143,8 +144,8 @@ ScopedAStatus DeviceCb::requestStreamBuffers(const std::vector<BufferRequest>& b CameraAidlTest::allocateGraphicBuffer( CameraAidlTest::allocateGraphicBuffer( w, h, w, h, android_convertGralloc1To0Usage(static_cast<uint64_t>(halStream.producerUsage), ANDROID_NATIVE_UNSIGNED_CAST(android_convertGralloc1To0Usage(static_cast<uint64_t>(halStream.producerUsage), static_cast<uint64_t>(halStream.consumerUsage)), static_cast<uint64_t>(halStream.consumerUsage))), halStream.overrideFormat, &handle); halStream.overrideFormat, &handle); StreamBuffer streamBuffer = StreamBuffer(); StreamBuffer streamBuffer = StreamBuffer(); Loading