增加日志

serial
BlueMatthew 1 year ago
parent 1cc1780056
commit 28325de25a

@ -1059,11 +1059,11 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
bool res = cv::imwrite(fullPath.c_str(), mat, params);
if (!res)
{
ALOGE("Failed to write photo: %s", fullPath.c_str());
XYLOG(XYLOG_SEVERITY_DERROR, "Failed to write photo: %s", fullPath.c_str());
}
else
{
ALOGI("Succeeded to write photo: %s", fullPath.c_str());
XYLOG(XYLOG_SEVERITY_INFO, "Succeeded to write photo: %s", fullPath.c_str());
}
TakePhotoCb(res, mPhotoInfo, fullPath, time(NULL), objs);
}

@ -73,7 +73,7 @@ static void onSessionReady(void* context, ACameraCaptureSession *session)
static void onSessionClosed(void* context, ACameraCaptureSession *session)
{
ALOGW("onSessionClosed %p", session);
XYLOG(XYLOG_SEVERITY_INFO, "onSessionClosed %p", session);
}
void onCaptureFailed(void* context, ACameraCaptureSession* session, ACaptureRequest* request, ACameraCaptureFailure* failure)
@ -150,7 +150,7 @@ NdkCamera::~NdkCamera()
}
int NdkCamera::open(const std::string& cameraId) {
ALOGW("DBG::try open %s", cameraId.c_str());
XYLOG(XYLOG_SEVERITY_DEBUG, "DBG::try open %s", cameraId.c_str());
// camera_facing = _camera_facing;
@ -263,7 +263,7 @@ int NdkCamera::open(const std::string& cameraId) {
if (!foundIt)
{
ACameraMetadata_free(camera_metadata);
ALOGE("Camera RES(%d, %d) Not Found on ID: %s", mWidth, mHeight, cameraId.c_str());
XYLOG(XYLOG_SEVERITY_ERROR, "Camera RES(%d, %d) Not Found on ID: %s", mWidth, mHeight, cameraId.c_str());
return 1;
}
@ -403,12 +403,12 @@ int NdkCamera::open(const std::string& cameraId) {
res = ACameraManager_openCamera(camera_manager, cameraId.c_str(), &camera_device_state_callbacks, &camera_device);
if (res != ACAMERA_OK)
{
ALOGE("Failed to open camera res=%d", res);
XYLOG(XYLOG_SEVERITY_ERROR, "Failed to open camera res=%d", res);
return 1;
}
}
ALOGI("CameraStatus::Open %s %d", cameraId.c_str(), camera_orientation);
XYLOG(XYLOG_SEVERITY_INFO, "CameraStatus::Open %s %d", cameraId.c_str(), camera_orientation);
// std::this_thread::sleep_for(std::chrono::milliseconds(128));
// capture request
@ -559,7 +559,7 @@ void NdkCamera::close()
if (camera_device)
{
ALOGI("CameraStatus::try close %s", mCameraId.c_str());
XYLOG(XYLOG_SEVERITY_INFO, "CameraStatus::try close %s", mCameraId.c_str());
ACameraDevice_close(camera_device);
camera_device = 0;
}

Loading…
Cancel
Save