Camera3: Clean up ALOGE calls in non-error conditions
Use ALOGI/ALOGD instead. Bug: 12489802 Change-Id: Id7fc9147395af3a9a0fe135d1017a155aad174fb Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
This commit is contained in:
parent
e73f66ef6b
commit
d00b95ed3c
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -873,12 +873,12 @@ void QCamera3PicChannel::jpegEvtHandle(jpeg_job_status_t status,
|
|||
|
||||
if(obj->mJpegSettings->max_jpeg_size <= 0 ||
|
||||
obj->mJpegSettings->max_jpeg_size > obj->mMemory->getSize(obj->mCurrentBufIndex)){
|
||||
ALOGE("%s:Max Jpeg size :%d is out of valid range setting to size of buffer",
|
||||
ALOGW("%s:Max Jpeg size :%d is out of valid range setting to size of buffer",
|
||||
__func__, obj->mJpegSettings->max_jpeg_size);
|
||||
maxJpegSize = obj->mMemory->getSize(obj->mCurrentBufIndex);
|
||||
} else {
|
||||
maxJpegSize = obj->mJpegSettings->max_jpeg_size;
|
||||
ALOGE("%s: Setting max jpeg size to %d",__func__, maxJpegSize);
|
||||
ALOGI("%s: Setting max jpeg size to %d",__func__, maxJpegSize);
|
||||
}
|
||||
jpeg_eof = &jpeg_buf[maxJpegSize-sizeof(jpegHeader)];
|
||||
memcpy(jpeg_eof, &jpegHeader, sizeof(jpegHeader));
|
||||
|
|
|
@ -2917,10 +2917,8 @@ camera_metadata_t* QCamera3HardwareInterface::translateCapabilityToMetadata(int
|
|||
|
||||
static uint8_t focusMode;
|
||||
if (gCamCapability[mCameraId]->supported_focus_modes_cnt > 1) {
|
||||
ALOGE("%s: Setting focus mode to auto", __func__);
|
||||
focusMode = ANDROID_CONTROL_AF_MODE_AUTO;
|
||||
} else {
|
||||
ALOGE("%s: Setting focus mode to off", __func__);
|
||||
focusMode = ANDROID_CONTROL_AF_MODE_OFF;
|
||||
}
|
||||
settings.update(ANDROID_CONTROL_AF_MODE, &focusMode, 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -385,10 +385,10 @@ int32_t QCamera3PostProcessor::processAuxiliaryData(mm_camera_buf_def_t *frame,
|
|||
// enqueu to post proc input queue
|
||||
m_inputPPQ.enqueue((void *)aux_frame);
|
||||
if (!(m_inputMetaQ.isEmpty())) {
|
||||
ALOGE("%s: meta queue is not empty, do next job", __func__);
|
||||
ALOGI("%s: meta queue is not empty, do next job", __func__);
|
||||
m_dataProcTh.sendCmd(CAMERA_CMD_TYPE_DO_NEXT_JOB, FALSE, FALSE);
|
||||
} else {
|
||||
ALOGE("%s: meta queue is empty, not calling do next job", __func__);
|
||||
ALOGI("%s: meta queue is empty, not calling do next job", __func__);
|
||||
}
|
||||
pthread_mutex_unlock(&mReprocJobLock);
|
||||
} else {
|
||||
|
@ -479,10 +479,10 @@ int32_t QCamera3PostProcessor::processPPMetadata(mm_camera_super_buf_t *frame)
|
|||
// enqueue to metadata input queue
|
||||
m_inputMetaQ.enqueue((void *)frame);
|
||||
if (!(m_inputPPQ.isEmpty())) {
|
||||
ALOGE("%s: pp queue is not empty, do next job", __func__);
|
||||
ALOGI("%s: pp queue is not empty, do next job", __func__);
|
||||
m_dataProcTh.sendCmd(CAMERA_CMD_TYPE_DO_NEXT_JOB, FALSE, FALSE);
|
||||
} else {
|
||||
ALOGE("%s: pp queue is empty, not calling do next job", __func__);
|
||||
ALOGI("%s: pp queue is empty, not calling do next job", __func__);
|
||||
}
|
||||
pthread_mutex_unlock(&mReprocJobLock);
|
||||
return NO_ERROR;
|
||||
|
@ -1090,7 +1090,7 @@ void *QCamera3PostProcessor::dataProcessRoutine(void *data)
|
|||
if (is_active == TRUE) {
|
||||
// check if there is any ongoing jpeg jobs
|
||||
if (pme->m_ongoingJpegQ.isEmpty()) {
|
||||
ALOGE("%s: ongoing jpeg queue is empty so doing the jpeg job", __func__);
|
||||
ALOGI("%s: ongoing jpeg queue is empty so doing the jpeg job", __func__);
|
||||
// no ongoing jpeg job, we are fine to send jpeg encoding job
|
||||
qcamera_jpeg_data_t *jpeg_job =
|
||||
(qcamera_jpeg_data_t *)pme->m_inputJpegQ.dequeue();
|
||||
|
@ -1111,7 +1111,7 @@ void *QCamera3PostProcessor::dataProcessRoutine(void *data)
|
|||
}
|
||||
}
|
||||
}
|
||||
ALOGE("%s: dequeuing pp frame", __func__);
|
||||
ALOGD("%s: dequeuing pp frame", __func__);
|
||||
mm_camera_super_buf_t *pp_frame =
|
||||
(mm_camera_super_buf_t *)pme->m_inputPPQ.dequeue();
|
||||
if (NULL != pp_frame) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -274,7 +274,7 @@ int32_t QCamera3Stream::init(cam_stream_type_t streamType,
|
|||
mStreamInfo->streaming_mode = CAM_STREAMING_MODE_BURST;
|
||||
//mStreamInfo->num_of_burst = reprocess_config->offline.num_of_bufs;
|
||||
mStreamInfo->num_of_burst = 1;
|
||||
ALOGE("%s: num_of_burst is %d", __func__, mStreamInfo->num_of_burst);
|
||||
ALOGI("%s: num_of_burst is %d", __func__, mStreamInfo->num_of_burst);
|
||||
} else {
|
||||
mStreamInfo->streaming_mode = CAM_STREAMING_MODE_CONTINUOUS;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -248,14 +248,14 @@ int32_t mm_camera_open(mm_camera_obj_t *my_obj)
|
|||
snprintf(dev_name, sizeof(dev_name), "/dev/%s",
|
||||
mm_camera_util_get_dev_name(my_obj->my_hdl));
|
||||
sscanf(dev_name, "/dev/video%u", &cam_idx);
|
||||
CDBG_ERROR("%s: dev name = %s, cam_idx = %d", __func__, dev_name, cam_idx);
|
||||
CDBG_HIGH("%s: dev name = %s, cam_idx = %d", __func__, dev_name, cam_idx);
|
||||
|
||||
do{
|
||||
n_try--;
|
||||
my_obj->ctrl_fd = open(dev_name, O_RDWR | O_NONBLOCK);
|
||||
CDBG("%s: ctrl_fd = %d, errno == %d", __func__, my_obj->ctrl_fd, errno);
|
||||
if((my_obj->ctrl_fd > 0) || (errno != EIO) || (n_try <= 0 )) {
|
||||
CDBG_ERROR("%s: opened, break out while loop", __func__);
|
||||
CDBG_HIGH("%s: opened, break out while loop", __func__);
|
||||
break;
|
||||
}
|
||||
CDBG_HIGH("%s:failed with I/O error retrying after %d milli-seconds",
|
||||
|
|
|
@ -1181,7 +1181,7 @@ int32_t mm_stream_qbuf(mm_stream_t *my_obj, mm_camera_buf_def_t *buf)
|
|||
mm_camera_async_call);
|
||||
CDBG_HIGH("%s: Started poll on stream %p type :%d", __func__, my_obj,my_obj->stream_info->stream_type);
|
||||
if (rc < 0) {
|
||||
ALOGE("%s: add poll fd error", __func__);
|
||||
CDBG_ERROR("%s: add poll fd error", __func__);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -59,7 +59,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef _ANDROID_
|
||||
#define CDBG_HIGH(fmt, args...) ALOGE(fmt, ##args)
|
||||
#define CDBG_HIGH(fmt, args...) ALOGI(fmt, ##args)
|
||||
#define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
|
||||
#else
|
||||
#define CDBG_HIGH(fmt, args...) fprintf(stderr, fmt, ##args)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -60,7 +60,7 @@
|
|||
FILE *fp = fopen(filename, "w+"); \
|
||||
if (fp) { \
|
||||
rc = fwrite(p_addr, 1, len, fp); \
|
||||
CDBG_ERROR("%s:%d] written size %d", __func__, __LINE__, len); \
|
||||
CDBG_HIGH("%s:%d] written size %d", __func__, __LINE__, len); \
|
||||
fclose(fp); \
|
||||
} else { \
|
||||
CDBG_ERROR("%s:%d] open %s failed", __func__, __LINE__, filename); \
|
||||
|
@ -80,7 +80,7 @@
|
|||
if (fp) { \
|
||||
rc = fwrite(p_addr1, 1, len1, fp); \
|
||||
rc = fwrite(p_addr2, 1, len2, fp); \
|
||||
CDBG_ERROR("%s:%d] written %d %d", __func__, __LINE__, len1, len2); \
|
||||
CDBG_HIGH("%s:%d] written %d %d", __func__, __LINE__, len1, len2); \
|
||||
fclose(fp); \
|
||||
} else { \
|
||||
CDBG_ERROR("%s:%d] open %s failed", __func__, __LINE__, filename); \
|
||||
|
@ -2245,12 +2245,12 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_client_id(
|
|||
data = (mm_jpeg_job_q_node_t *)node->data;
|
||||
|
||||
if (data && (data->enc_info.client_handle == client_hdl)) {
|
||||
CDBG_ERROR("%s:%d] found matching client handle", __func__, __LINE__);
|
||||
CDBG_HIGH("%s:%d] found matching client handle", __func__, __LINE__);
|
||||
job_node = data;
|
||||
cam_list_del_node(&node->list);
|
||||
queue->size--;
|
||||
free(node);
|
||||
CDBG_ERROR("%s: queue size = %d", __func__, queue->size);
|
||||
CDBG_HIGH("%s: queue size = %d", __func__, queue->size);
|
||||
break;
|
||||
}
|
||||
pos = pos->next;
|
||||
|
@ -2279,12 +2279,12 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_session_id(
|
|||
data = (mm_jpeg_job_q_node_t *)node->data;
|
||||
|
||||
if (data && (data->enc_info.encode_job.session_id == session_id)) {
|
||||
CDBG_ERROR("%s:%d] found matching session id", __func__, __LINE__);
|
||||
CDBG_HIGH("%s:%d] found matching session id", __func__, __LINE__);
|
||||
job_node = data;
|
||||
cam_list_del_node(&node->list);
|
||||
queue->size--;
|
||||
free(node);
|
||||
CDBG_ERROR("%s: queue size = %d", __func__, queue->size);
|
||||
CDBG_HIGH("%s: queue size = %d", __func__, queue->size);
|
||||
break;
|
||||
}
|
||||
pos = pos->next;
|
||||
|
@ -2313,7 +2313,7 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_job_id(
|
|||
data = (mm_jpeg_job_q_node_t *)node->data;
|
||||
|
||||
if (data && (data->enc_info.job_id == job_id)) {
|
||||
CDBG_ERROR("%s:%d] found matching job id", __func__, __LINE__);
|
||||
CDBG_HIGH("%s:%d] found matching job id", __func__, __LINE__);
|
||||
job_node = data;
|
||||
cam_list_del_node(&node->list);
|
||||
queue->size--;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
||||
/*Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
@ -79,7 +79,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init()
|
|||
} else {
|
||||
rc = OMX_ErrorInsufficientResources;
|
||||
}
|
||||
ALOGE("%s:%d] Complete %d", __func__, __LINE__, comp_cnt);
|
||||
ALOGI("%s:%d] Complete %d", __func__, __LINE__, comp_cnt);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit()
|
|||
free(g_omxcore);
|
||||
g_omxcore = NULL;
|
||||
}
|
||||
ALOGE("%s:%d] Complete", __func__, __LINE__);
|
||||
ALOGI("%s:%d] Complete", __func__, __LINE__);
|
||||
return OMX_ErrorNone;
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
|
|||
|
||||
/* Call the function from the address to create the obj */
|
||||
p_obj = (*p_core_comp->get_instance)();
|
||||
ALOGE("%s:%d] get instance pts is %p", __func__, __LINE__, p_obj);
|
||||
ALOGI("%s:%d] get instance pts is %p", __func__, __LINE__, p_obj);
|
||||
if (NULL == p_obj) {
|
||||
ALOGE("%s:%d] Error cannot create object", __func__, __LINE__);
|
||||
rc = OMX_ErrorInvalidComponent;
|
||||
|
@ -234,7 +234,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
|
|||
|
||||
p_comp->SetCallbacks(p_comp, callBacks, appData);
|
||||
pthread_mutex_unlock(&g_omxcore->core_lock);
|
||||
ALOGE("%s:%d] Success", __func__, __LINE__);
|
||||
ALOGI("%s:%d] Success", __func__, __LINE__);
|
||||
return OMX_ErrorNone;
|
||||
|
||||
error:
|
||||
|
@ -264,7 +264,7 @@ static int get_idx_from_handle(OMX_IN OMX_HANDLETYPE *ahComp, int *aCompIdx,
|
|||
for (j = 0; j < OMX_COMP_MAX_INSTANCES; j++) {
|
||||
if ((OMX_COMPONENTTYPE *)g_omxcore->component[i].handle[j] ==
|
||||
(OMX_COMPONENTTYPE *)ahComp) {
|
||||
ALOGE("%s:%d] comp_idx %d inst_idx %d", __func__, __LINE__, i, j);
|
||||
ALOGD("%s:%d] comp_idx %d inst_idx %d", __func__, __LINE__, i, j);
|
||||
*aCompIdx = i;
|
||||
*aInstIdx = j;
|
||||
return TRUE;
|
||||
|
@ -305,7 +305,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
|
|||
OMX_COMPONENTTYPE *p_comp = NULL;
|
||||
omx_core_component_t *p_core_comp = NULL;
|
||||
|
||||
ALOGE("%s:%d] ", __func__, __LINE__);
|
||||
ALOGV("%s:%d] ", __func__, __LINE__);
|
||||
if (hComp == NULL) {
|
||||
return OMX_ErrorBadParameter;
|
||||
}
|
||||
|
@ -334,9 +334,9 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
|
|||
p_core_comp->create_comp_func = NULL;
|
||||
p_core_comp->open = FALSE;
|
||||
} else {
|
||||
ALOGE("%s:%d] Error Component is still Active", __func__, __LINE__);
|
||||
ALOGI("%s:%d] Error Component is still Active", __func__, __LINE__);
|
||||
}
|
||||
pthread_mutex_unlock(&g_omxcore->core_lock);
|
||||
ALOGE("%s:%d] Success", __func__, __LINE__);
|
||||
ALOGV("%s:%d] Success", __func__, __LINE__);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue