}
status_t Camera2Client::registerFrameListener(int32_t minId, int32_t maxId,
- wp<camera2::FrameProcessor::FilteredListener> listener) {
- return mFrameProcessor->registerListener(minId, maxId, listener);
+ wp<camera2::FrameProcessor::FilteredListener> listener, bool sendPartials) {
+ return mFrameProcessor->registerListener(minId, maxId, listener, sendPartials);
}
status_t Camera2Client::removeFrameListener(int32_t minId, int32_t maxId,
int getZslStreamId() const;
status_t registerFrameListener(int32_t minId, int32_t maxId,
- wp<camera2::FrameProcessor::FilteredListener> listener);
+ wp<camera2::FrameProcessor::FilteredListener> listener,
+ bool sendPartials = true);
status_t removeFrameListener(int32_t minId, int32_t maxId,
wp<camera2::FrameProcessor::FilteredListener> listener);
return DONE;
}
+ // We don't want to get partial results for ZSL capture.
client->registerFrameListener(mCaptureId, mCaptureId + 1,
- this);
+ this,
+ /*sendPartials*/false);
// TODO: Actually select the right thing here.
res = processor->pushToReprocess(mCaptureId);
bool isAeConverged = false;
// Get the onFrameAvailable callback when the requestID == mCaptureId
+ // We don't want to get partial results for normal capture, as we need
+ // Get ANDROID_SENSOR_TIMESTAMP from the capture result, but partial
+ // result doesn't have to have this metadata available.
+ // TODO: Update to use the HALv3 shutter notification for remove the
+ // need for this listener and make it faster. see bug 12530628.
client->registerFrameListener(mCaptureId, mCaptureId + 1,
- this);
+ this,
+ /*sendPartials*/false);
{
Mutex::Autolock l(mInputMutex);
}
client->registerFrameListener(Camera2Client::kPreviewRequestIdStart,
Camera2Client::kPreviewRequestIdEnd,
- this);
+ this,
+ /*sendPartials*/false);
return OK;
}
}
client->registerFrameListener(Camera2Client::kPreviewRequestIdStart,
Camera2Client::kPreviewRequestIdEnd,
- this);
+ this,
+ /*sendPartials*/false);
return OK;
}
mFrameProcessor->registerListener(FRAME_PROCESSOR_LISTENER_MIN_ID,
FRAME_PROCESSOR_LISTENER_MAX_ID,
/*listener*/this,
- /*quirkSendPartials*/true);
+ /*sendPartials*/true);
return OK;
}
}
status_t FrameProcessorBase::registerListener(int32_t minId,
- int32_t maxId, wp<FilteredListener> listener, bool quirkSendPartials) {
+ int32_t maxId, wp<FilteredListener> listener, bool sendPartials) {
Mutex::Autolock l(mInputMutex);
ALOGV("%s: Registering listener for frame id range %d - %d",
__FUNCTION__, minId, maxId);
- RangeListener rListener = { minId, maxId, listener, quirkSendPartials };
+ RangeListener rListener = { minId, maxId, listener, sendPartials };
mRangeListeners.push_back(rListener);
return OK;
}
List<RangeListener>::iterator item = mRangeListeners.begin();
while (item != mRangeListeners.end()) {
if (requestId >= item->minId && requestId < item->maxId &&
- (!quirkIsPartial || item->quirkSendPartials)) {
+ (!quirkIsPartial || item->sendPartials)) {
sp<FilteredListener> listener = item->listener.promote();
if (listener == 0) {
item = mRangeListeners.erase(item);
// Register a listener for a range of IDs [minId, maxId). Multiple listeners
// can be listening to the same range.
- // QUIRK: sendPartials controls whether partial results will be sent.
+ // sendPartials controls whether partial results will be sent.
status_t registerListener(int32_t minId, int32_t maxId,
wp<FilteredListener> listener,
- bool quirkSendPartials = true);
+ bool sendPartials = true);
status_t removeListener(int32_t minId, int32_t maxId,
wp<FilteredListener> listener);
int32_t minId;
int32_t maxId;
wp<FilteredListener> listener;
- bool quirkSendPartials;
+ bool sendPartials;
};
List<RangeListener> mRangeListeners;