/** Initialize device with callback functions */
+ ATRACE_BEGIN("camera3->initialize");
res = device->ops->initialize(device, this);
+ ATRACE_END();
+
if (res != OK) {
SET_ERR_L("Unable to initialize HAL device: %s (%d)",
strerror(-res), res);
mVendorTagOps.get_camera_vendor_section_name = NULL;
+ ATRACE_BEGIN("camera3->get_metadata_vendor_tag_ops");
device->ops->get_metadata_vendor_tag_ops(device, &mVendorTagOps);
+ ATRACE_END();
if (mVendorTagOps.get_camera_vendor_section_name != NULL) {
res = set_camera_metadata_vendor_tag_ops(&mVendorTagOps);
}
const camera_metadata_t *rawRequest;
+ ATRACE_BEGIN("camera3->construct_default_request_settings");
rawRequest = mHal3Device->ops->construct_default_request_settings(
mHal3Device, templateId);
+ ATRACE_END();
if (rawRequest == NULL) {
SET_ERR_L("HAL is unable to construct default settings for template %d",
templateId);
// Do the HAL configuration; will potentially touch stream
// max_buffers, usage, priv fields.
-
+ ATRACE_BEGIN("camera3->configure_streams");
res = mHal3Device->ops->configure_streams(mHal3Device, &config);
+ ATRACE_END();
if (res != OK) {
SET_ERR_L("Unable to configure streams with HAL: %s (%d)",
}
if (request.haveResultMetadata && request.numBuffersLeft == 0) {
+ ATRACE_ASYNC_END("frame capture", frameNumber);
mInFlightMap.removeItemsAt(idx, 1);
}
}
void Camera3Device::notify(const camera3_notify_msg *msg) {
+ ATRACE_CALL();
NotificationListener *listener;
{
Mutex::Autolock l(mOutputLock);
msg->message.error.error_stream);
streamId = stream->getId();
}
+ ALOGV("Camera %d: %s: HAL error, frame %d, stream %d: %d",
+ mId, __FUNCTION__, msg->message.error.frame_number,
+ streamId, msg->message.error.error_code);
if (listener != NULL) {
listener->notifyError(msg->message.error.error_code,
msg->message.error.frame_number, streamId);
frameNumber);
break;
}
-
+ ALOGVV("Camera %d: %s: Shutter fired for frame %d at %lld",
+ mId, __FUNCTION__, frameNumber, timestamp);
// Call listener, if any
if (listener != NULL) {
listener->notifyShutter(frameNumber, timestamp);
}
status_t Camera3Device::RequestThread::waitUntilPaused(nsecs_t timeout) {
+ ATRACE_CALL();
status_t res;
Mutex::Autolock l(mPauseLock);
while (!mPaused) {
}
// Submit request and block until ready for next one
-
+ ATRACE_ASYNC_BEGIN("frame capture", request.frame_number);
+ ATRACE_BEGIN("camera3->process_capture_request");
res = mHal3Device->ops->process_capture_request(mHal3Device, &request);
+ ATRACE_END();
+
if (res != OK) {
SET_ERR("RequestThread: Unable to submit capture request %d to HAL"
" device: %s (%d)", request.frame_number, strerror(-res), res);