Loading services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp +24 −15 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,8 @@ ZslProcessor3::ZslProcessor3( mZslStreamId(NO_STREAM), mZslStreamId(NO_STREAM), mFrameListHead(0), mFrameListHead(0), mZslQueueHead(0), mZslQueueHead(0), mZslQueueTail(0) { mZslQueueTail(0), mHasFocuser(false) { // Initialize buffer queue and frame list based on pipeline max depth. // Initialize buffer queue and frame list based on pipeline max depth. size_t pipelineMaxDepth = kDefaultMaxPipelineDepth; size_t pipelineMaxDepth = kDefaultMaxPipelineDepth; if (client != 0) { if (client != 0) { Loading @@ -67,6 +68,11 @@ ZslProcessor3::ZslProcessor3( " use default pipeline max depth %zu", __FUNCTION__, " use default pipeline max depth %zu", __FUNCTION__, kDefaultMaxPipelineDepth); kDefaultMaxPipelineDepth); } } entry = device->info().find(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE); if (entry.count > 0 && entry.data.f[0] != 0.) { mHasFocuser = true; } } } } } Loading Loading @@ -489,6 +495,8 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const { continue; continue; } } // Check AF state if device has focuser if (mHasFocuser) { // Make sure the candidate frame has good focus. // Make sure the candidate frame has good focus. entry = frame.find(ANDROID_CONTROL_AF_STATE); entry = frame.find(ANDROID_CONTROL_AF_STATE); if (entry.count == 0) { if (entry.count == 0) { Loading @@ -504,6 +512,7 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const { __FUNCTION__, afState); __FUNCTION__, afState); continue; continue; } } } minTimestamp = frameTimestamp; minTimestamp = frameTimestamp; idx = j; idx = j; Loading services/camera/libcameraservice/api1/client2/ZslProcessor3.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,8 @@ class ZslProcessor3 : CameraMetadata mLatestCapturedRequest; CameraMetadata mLatestCapturedRequest; bool mHasFocuser; virtual bool threadLoop(); virtual bool threadLoop(); status_t clearZslQueueLocked(); status_t clearZslQueueLocked(); Loading Loading
services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp +24 −15 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,8 @@ ZslProcessor3::ZslProcessor3( mZslStreamId(NO_STREAM), mZslStreamId(NO_STREAM), mFrameListHead(0), mFrameListHead(0), mZslQueueHead(0), mZslQueueHead(0), mZslQueueTail(0) { mZslQueueTail(0), mHasFocuser(false) { // Initialize buffer queue and frame list based on pipeline max depth. // Initialize buffer queue and frame list based on pipeline max depth. size_t pipelineMaxDepth = kDefaultMaxPipelineDepth; size_t pipelineMaxDepth = kDefaultMaxPipelineDepth; if (client != 0) { if (client != 0) { Loading @@ -67,6 +68,11 @@ ZslProcessor3::ZslProcessor3( " use default pipeline max depth %zu", __FUNCTION__, " use default pipeline max depth %zu", __FUNCTION__, kDefaultMaxPipelineDepth); kDefaultMaxPipelineDepth); } } entry = device->info().find(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE); if (entry.count > 0 && entry.data.f[0] != 0.) { mHasFocuser = true; } } } } } Loading Loading @@ -489,6 +495,8 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const { continue; continue; } } // Check AF state if device has focuser if (mHasFocuser) { // Make sure the candidate frame has good focus. // Make sure the candidate frame has good focus. entry = frame.find(ANDROID_CONTROL_AF_STATE); entry = frame.find(ANDROID_CONTROL_AF_STATE); if (entry.count == 0) { if (entry.count == 0) { Loading @@ -504,6 +512,7 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const { __FUNCTION__, afState); __FUNCTION__, afState); continue; continue; } } } minTimestamp = frameTimestamp; minTimestamp = frameTimestamp; idx = j; idx = j; Loading
services/camera/libcameraservice/api1/client2/ZslProcessor3.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,8 @@ class ZslProcessor3 : CameraMetadata mLatestCapturedRequest; CameraMetadata mLatestCapturedRequest; bool mHasFocuser; virtual bool threadLoop(); virtual bool threadLoop(); status_t clearZslQueueLocked(); status_t clearZslQueueLocked(); Loading