static guint g_rec_dev_state_changed_cb_subscribe_id;
static GMutex g_rec_idle_event_lock;
+/* log level */
+extern int g_mmcam_log_level;
static void __recorder_update_api_waiting(recorder_cb_info_s *cb_info, int api, int value)
{
if (!cb_info ||
api < 0 || api >= MUSE_RECORDER_API_MAX) {
- LOGE("invalid param %p %d", cb_info, api);
+ REC_LOG_ERROR("invalid param[%p][%d]", cb_info, api);
return;
}
cb_info->api_waiting[api] += value;
g_mutex_unlock(&(cb_info->api_mutex[api]));
- /*LOGD("api %d, value %d, waiting %d",
- api, value, cb_info->api_waiting[api]);*/
+ REC_LOG_DEBUG("api[%d], value[%d], waiting[%d]",
+ api, value, cb_info->api_waiting[api]);
return;
}
g_mutex_lock(&g_rec_dev_state_changed_cb_lock);
if (!g_rec_dev_state_changed_cb_list || !param) {
- LOGW("no callback or NULL param %p", param);
+ REC_LOG_WARNING("no callback or NULL param[%p]", param);
goto _DONE;
}
type = value >> 16;
state = 0x0000ffff & value;
- LOGD("type %d, state %d", type, state);
+ REC_LOG_INFO("type[%d], state[%d]", type, state);
tmp_list = g_rec_dev_state_changed_cb_list;
if (info) {
if (info->callback) {
- LOGD("start id[%d] callback", info->id);
+ REC_LOG_INFO("start id[%d] callback", info->id);
((recorder_device_state_changed_cb)info->callback)(type, state, info->user_data);
- LOGD("returned id[%d] callback", info->id);
+ REC_LOG_INFO("returned id[%d] callback", info->id);
} else {
- LOGW("NULL callback for id %d", info->id);
+ REC_LOG_WARNING("NULL callback for id[%d]", info->id);
}
}
tbm_bo_handle tmp_bo_handle = {NULL, };
if (bufmgr == NULL || bo == NULL || bo_handle == NULL || fd < 0) {
- LOGE("invalid parameter - bufmgr %p, bo %p, bo_handle %p, fd %d",
+ REC_LOG_ERROR("invalid parameter - bufmgr[%p], bo[%p], bo_handle[%p], fd[%d]",
bufmgr, bo, bo_handle, fd);
return false;
}
tmp_bo = tbm_bo_import_fd(bufmgr, (tbm_fd)fd);
if (tmp_bo == NULL) {
- LOGE("bo import failed - bufmgr %p, fd %d", bufmgr, fd);
+ REC_LOG_ERROR("bo import failed - bufmgr[%p], fd[%d]", bufmgr, fd);
return false;
}
tmp_bo_handle = tbm_bo_map(tmp_bo, TBM_DEVICE_CPU, TBM_OPTION_READ);
if (tmp_bo_handle.ptr == NULL) {
- LOGE("bo map failed %p", tmp_bo);
+ REC_LOG_ERROR("bo map failed[%p]", tmp_bo);
tbm_bo_unref(tmp_bo);
tmp_bo = NULL;
return false;
*bo = tmp_bo;
*bo_handle = tmp_bo_handle;
+ REC_LOG_VERBOSE("import fd[%d] -> bo[%p]", fd, tmp_bo);
+
return true;
}
static void _recorder_release_imported_bo(tbm_bo *bo)
{
if (bo == NULL || *bo == NULL) {
- LOGW("NULL bo");
+ REC_LOG_WARNING("NULL bo");
return;
}
+ REC_LOG_VERBOSE("release bo[%p]", *bo);
+
tbm_bo_unmap(*bo);
tbm_bo_unref(*bo);
*bo = NULL;
tfd[2]: zero copy bo[1]
tfd[3]: zero copy bo[2] */
if (!tfd || tfd[0] < 0) {
- LOGE("invalid fd %d", tfd ? tfd[0] : 0);
+ REC_LOG_ERROR("invalid fd[%d]", tfd ? tfd[0] : 0);
return;
}
muse_recorder_msg_get(video_fd, recv_msg);
muse_recorder_msg_get(num_buffer_fd, recv_msg);
- /*LOGD("video_fd %d, num_buffer_fd %d", video_fd, num_buffer_fd);*/
+ REC_LOG_DEBUG("video_fd[%d], num_buffer_fd[%d], tfd[%d/%d/%d/%d]",
+ video_fd, num_buffer_fd, tfd[0], tfd[1], tfd[2], tfd[3]);
memset(&frame, 0x0, sizeof(recorder_video_data_s));
if (num_buffer_fd < 0 || num_buffer_fd > BUFFER_MAX_PLANE_NUM) {
- LOGE("invalid num buffer fd %d", num_buffer_fd);
+ REC_LOG_ERROR("invalid num buffer fd[%d]", num_buffer_fd);
goto _VIDEO_ENCODE_DECISION_CB_HANDLER_DONE;
}
/* import tbm bo and get virtual address */
if (!_recorder_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
- LOGE("failed to import fd %d", tfd[0]);
+ REC_LOG_ERROR("failed to import fd[%d]", tfd[0]);
goto _VIDEO_ENCODE_DECISION_CB_HANDLER_DONE;
}
if (num_buffer_fd == 0 && tfd[1] >= 0) {
/* import tbm data_bo and get virtual address */
if (!_recorder_import_tbm_fd(cb_info->bufmgr, tfd[1], &data_bo, &data_bo_handle)) {
- LOGE("failed to import data fd %d", tfd[1]);
+ REC_LOG_ERROR("failed to import data fd[%d]", tfd[1]);
goto _VIDEO_ENCODE_DECISION_CB_HANDLER_DONE;
}
}
for (i = 0 ; i < num_buffer_fd ; i++) {
/* import buffer bo and get virtual address */
if (!_recorder_import_tbm_fd(cb_info->bufmgr, tfd[i + 1], &buffer_bo[i], &buffer_bo_handle[i])) {
- LOGE("failed to import buffer fd %d", tfd[i + 1]);
+ REC_LOG_ERROR("failed to import buffer fd[%d]", tfd[i + 1]);
goto _VIDEO_ENCODE_DECISION_CB_HANDLER_DONE;
}
}
NULL);
if (send_msg) {
if (muse_core_msg_send(cb_info->fd, send_msg) <= 0)
- LOGE("sending message failed");
+ REC_LOG_ERROR("sending message failed");
muse_core_msg_free(send_msg);
send_msg = NULL;
} else {
- LOGE("failed to create send msg for fd %d", tfd[0]);
+ REC_LOG_ERROR("failed to create send msg for fd[%d]", tfd[0]);
}
/* release imported bo and fd */
static void _recorder_client_user_callback(recorder_cb_info_s *cb_info, char *recv_msg, muse_recorder_event_e event, int *tfd)
{
if (recv_msg == NULL || event >= MUSE_RECORDER_EVENT_TYPE_NUM) {
- LOGE("invalid parameter - recorder msg %p, event %d", recv_msg, event);
+ REC_LOG_ERROR("invalid parameter - recorder msg[%p], event[%d]", recv_msg, event);
return;
}
- /*LOGD("get recorder msg %s, event %d", recv_msg, event);*/
+ REC_LOG_DEBUG("get recorder msg[%s], event[%d]", recv_msg, event);
g_mutex_lock(&cb_info->user_cb_mutex[event]);
event != MUSE_RECORDER_EVENT_TYPE_MUXED_STREAM &&
event != MUSE_RECORDER_EVENT_TYPE_VIDEO_ENCODE_DECISION) {
g_mutex_unlock(&cb_info->user_cb_mutex[event]);
- LOGW("NULL callback for event %d, return here", event);
+ REC_LOG_WARNING("NULL callback for event[%d], return here", event);
return;
} else {
- LOGW("NULL callback for event %d, NOT return here", event);
+ REC_LOG_WARNING("NULL callback for event[%d], NOT return here", event);
}
}
muse_recorder_msg_get(previous, recv_msg);
muse_recorder_msg_get(current, recv_msg);
- LOGW("INTERRUPTED - policy %d, state %d -> %d", policy, previous, current);
+ REC_LOG_WARNING("INTERRUPTED - policy[%d], state[%d] ->[%d]", policy, previous, current);
((recorder_interrupted_cb)cb_info->user_cb[event])((recorder_policy_e)policy,
(recorder_state_e)previous,
muse_recorder_msg_get(policy, recv_msg);
muse_recorder_msg_get(state, recv_msg);
- LOGW("INTERRUPT_STARTED - policy %d, state %d", policy, state);
+ REC_LOG_WARNING("INTERRUPT_STARTED - policy[%d], state[%d]", policy, state);
((recorder_interrupt_started_cb)cb_info->user_cb[event])((recorder_policy_e)policy,
(recorder_state_e)state, cb_info->user_data[event]);
char *send_msg = NULL;
if (!tfd || tfd[0] < 0) {
- LOGE("invalid fd %d", tfd ? tfd[0] : 0);
+ REC_LOG_ERROR("invalid fd[%d]", tfd ? tfd[0] : 0);
break;
}
muse_recorder_msg_get(channel, recv_msg);
muse_recorder_msg_get(timestamp, recv_msg);
- LOGD("%p, size %d, format %d, channel %d, timestamp %d",
- bo_handle.ptr, size, format, channel, timestamp);
+ REC_LOG_DEBUG("size[%d], format[%d], channel[%d], timestamp[%d]",
+ size, format, channel, timestamp);
((recorder_audio_stream_cb)cb_info->user_cb[event])((void *)bo_handle.ptr,
size, (audio_sample_type_e)format, channel,
(unsigned int)timestamp, cb_info->user_data[event]);
- LOGD("returned");
+ REC_LOG_VERBOSE("returned");
/* release imported bo */
_recorder_release_imported_bo(&bo);
} else {
- LOGE("tbm fd %d import failed", tfd[0]);
+ REC_LOG_ERROR("tbm fd[%d] import failed", tfd[0]);
}
}
NULL);
if (send_msg) {
if (muse_core_msg_send(cb_info->fd, send_msg) <= 0)
- LOGE("sending message failed");
+ REC_LOG_ERROR("sending message failed");
muse_core_msg_free(send_msg);
send_msg = NULL;
} else {
- LOGE("failed to create send msg for fd %d", audio_fd);
+ REC_LOG_ERROR("failed to create send msg for fd[%d]", audio_fd);
}
/* close imported fd */
char *send_msg = NULL;
if (!tfd || tfd[0] < 0) {
- LOGE("invalid fd %d", tfd ? tfd[0] : 0);
+ REC_LOG_ERROR("invalid fd[%d]", tfd ? tfd[0] : 0);
break;
}
muse_recorder_msg_get(size, recv_msg);
muse_recorder_msg_get_int64(offset, recv_msg);
- LOGD("%p, size %d, offset %"PRId64, bo_handle.ptr, size, offset);
+ REC_LOG_DEBUG("size[%d], offset[%"PRId64"]", size, offset);
((recorder_muxed_stream_cb)cb_info->user_cb[event])((void *)bo_handle.ptr,
size, (unsigned long long)offset, cb_info->user_data[event]);
- LOGD("returned");
+ REC_LOG_VERBOSE("returned");
/* release imported bo */
_recorder_release_imported_bo(&bo);
} else {
- LOGE("tbm fd %d import failed", tfd[0]);
+ REC_LOG_ERROR("tbm fd[%d] import failed", tfd[0]);
}
}
NULL);
if (send_msg) {
if (muse_core_msg_send(cb_info->fd, send_msg) <= 0)
- LOGE("sending message failed");
+ REC_LOG_ERROR("sending message failed");
muse_core_msg_free(send_msg);
send_msg = NULL;
} else {
- LOGE("failed to create send msg for fd %d", tfd[0]);
+ REC_LOG_ERROR("failed to create send msg for fd[%d]", tfd[0]);
}
/* close imported fd */
if (((recorder_supported_audio_encoder_cb)cb_info->user_cb[event])((recorder_audio_codec_e)codec, cb_info->user_data[event]) == false) {
cb_info->user_cb[event] = NULL;
cb_info->user_data[event] = NULL;
- /*LOGD("stop foreach callback for SUPPORTED_AUDIO_ENCODER");*/
+ REC_LOG_DEBUG("stop foreach callback for SUPPORTED_AUDIO_ENCODER");
}
break;
}
if (((recorder_supported_file_format_cb)cb_info->user_cb[event])((recorder_file_format_e)format, cb_info->user_data[event]) == false) {
cb_info->user_cb[event] = NULL;
cb_info->user_data[event] = NULL;
- /*LOGD("stop foreach callback for SUPPORTED_FILE_FORMAT");*/
+ REC_LOG_DEBUG("stop foreach callback for SUPPORTED_FILE_FORMAT");
}
break;
}
if (((recorder_supported_video_encoder_cb)cb_info->user_cb[event])((recorder_video_codec_e)codec, cb_info->user_data[event]) == false) {
cb_info->user_cb[event] = NULL;
cb_info->user_data[event] = NULL;
- /*LOGD("stop foreach callback for SUPPORTED_VIDEO_ENCODER");*/
+ REC_LOG_DEBUG("stop foreach callback for SUPPORTED_VIDEO_ENCODER");
}
break;
}
if (((recorder_supported_video_resolution_cb)cb_info->user_cb[event])(width, height, cb_info->user_data[event]) == false) {
cb_info->user_cb[event] = NULL;
cb_info->user_data[event] = NULL;
- /*LOGD("stop foreach callback for SUPPORTED_VIDEO_RESOLUTION");*/
+ REC_LOG_DEBUG("stop foreach callback for SUPPORTED_VIDEO_RESOLUTION");
}
break;
}
recorder_idle_event_s *rec_idle_event = (recorder_idle_event_s *)data;
if (rec_idle_event == NULL) {
- LOGE("rec_idle_event is NULL");
+ REC_LOG_ERROR("rec_idle_event is NULL");
return FALSE;
}
cb_info = rec_idle_event->cb_info;
if (cb_info == NULL) {
- LOGW("recorder cb_info is NULL. event %p %d", rec_idle_event, rec_idle_event->event);
+ REC_LOG_WARNING("recorder cb_info is NULL. event[%p][%d]", rec_idle_event, rec_idle_event->event);
g_mutex_unlock(&g_rec_idle_event_lock);
goto IDLE_EVENT_CALLBACK_DONE;
}
GList *list = NULL;
if (cb_info == NULL) {
- LOGE("cb_info is NULL");
+ REC_LOG_ERROR("cb_info is NULL");
return;
}
g_mutex_lock(&g_rec_idle_event_lock);
if (cb_info->idle_event_list == NULL) {
- LOGD("No event");
+ REC_LOG_INFO("No event");
} else {
list = cb_info->idle_event_list;
list = g_list_next(list);
if (!rec_idle_event) {
- LOGW("The event is NULL");
+ REC_LOG_WARNING("The event is NULL");
continue;
}
if (g_idle_remove_by_data(rec_idle_event)) {
- LOGW("remove idle event %p done", rec_idle_event);
+ REC_LOG_WARNING("remove idle event[%p] done", rec_idle_event);
cb_info->idle_event_list = g_list_remove(cb_info->idle_event_list, (gpointer)rec_idle_event);
continue;
}
- LOGW("set NULL cb_info for event %p %d, it will be freed on idle callback",
+ REC_LOG_WARNING("set NULL cb_info for event[%p][%d], it will be freed on idle callback",
rec_idle_event, rec_idle_event->event);
rec_idle_event->cb_info = NULL;
recorder_msg_handler_info_s *msg_handler_info = NULL;
if (!cb_info || !msg) {
- LOGE("NULL pointer %p %p", cb_info, msg);
+ REC_LOG_ERROR("NULL pointer[%p][%p]", cb_info, msg);
return;
}
rec_msg = g_new0(recorder_message_s, 1);
if (!rec_msg) {
- LOGE("failed to alloc rec_msg for [%s]", msg);
+ REC_LOG_ERROR("failed to alloc rec_msg for[%s]", msg);
return;
}
strncpy(rec_msg->recv_msg, msg, sizeof(rec_msg->recv_msg) - 1);
- /*LOGD("add recorder message to queue : api %d, event %d, event_class %d", api, event, event_class);*/
+ REC_LOG_DEBUG("api[%d], event[%d], event_class[%d]",
+ api, event, event_class);
if (event == MUSE_RECORDER_EVENT_TYPE_AUDIO_STREAM)
msg_handler_info = &cb_info->audio_stream_cb_info;
static void __recorder_get_api_operation(int api, recorder_cb_info_s *cb_info, char *msg)
{
if (!cb_info || !msg) {
- LOGE("NULL pointer %p %p", cb_info, msg);
+ REC_LOG_ERROR("NULL pointer[%p][%p]", cb_info, msg);
return;
}
int event_class = -1;
if (!cb_info || !msg) {
- LOGE("invalid ptr %p %p", cb_info, msg);
+ REC_LOG_ERROR("invalid ptr[%p][%p]", cb_info, msg);
return;
}
- /*LOGD("msg [%s]", msg);*/
+ REC_LOG_DEBUG("msg[%s]", msg);
if (!muse_recorder_msg_get(api, msg)) {
- LOGE("failed to get recorder api");
+ REC_LOG_ERROR("failed to get recorder api");
return;
}
if (api == MUSE_RECORDER_CB_EVENT) {
if (!muse_recorder_msg_get(event, msg) ||
!muse_recorder_msg_get(event_class, msg)) {
- LOGE("failed to get event or event_class [%s]", msg);
+ REC_LOG_ERROR("failed to get event or event_class[%s]", msg);
return;
}
} else {
if (!muse_recorder_msg_get(api_class, msg)) {
- LOGE("failed to get api_class [%s]", msg);
+ REC_LOG_ERROR("failed to get api_class[%s]", msg);
return;
}
}
if (api_class == MUSE_RECORDER_API_CLASS_IMMEDIATE) {
if (api >= MUSE_RECORDER_API_MAX) {
- LOGE("invalid api %d", api);
+ REC_LOG_ERROR("invalid api[%d]", api);
return;
}
if (!muse_recorder_msg_get(ret, msg)) {
- LOGE("failed to get recorder ret");
+ REC_LOG_ERROR("failed to get recorder ret");
return;
}
if (api == MUSE_RECORDER_API_GET_DEVICE_STATE) {
g_atomic_int_set(&cb_info->msg_recv_running, 0);
- LOGD("get device state done. close client cb handler");
+ REC_LOG_INFO("get device state done. close client cb handler");
} else {
switch (api) {
case MUSE_RECORDER_API_CREATE:
if (ret != RECORDER_ERROR_NONE) {
g_atomic_int_set(&cb_info->msg_recv_running, 0);
- LOGE("create error 0x%x. closing..", ret);
+ REC_LOG_ERROR("create error [0x%x]. closing..", ret);
}
break;
case MUSE_RECORDER_API_DESTROY:
if (ret == RECORDER_ERROR_NONE) {
g_atomic_int_set(&cb_info->msg_recv_running, 0);
- LOGD("destroy done. closing..");
+ REC_LOG_INFO("destroy done. closing..");
}
break;
default:
g_cond_signal(&cb_info->api_cond[api]);
} else {
- LOGE("no waiting for api [%d]", api);
+ REC_LOG_ERROR("no waiting for api[%d]", api);
}
g_mutex_unlock(&cb_info->api_mutex[api]);
} else if (api_class == MUSE_RECORDER_API_CLASS_THREAD_SUB || api == MUSE_RECORDER_CB_EVENT) {
__recorder_add_msg_to_queue(cb_info, api, event, event_class, msg, tfd);
} else {
- LOGW("unknown recorder api %d and api_class %d", api, api_class);
+ REC_LOG_WARNING("unknown recorder api[%d] and api_class[%d]", api, api_class);
}
return;
recorder_cb_info_s *cb_info = NULL;
if (!handler_info || !handler_info->cb_info) {
- LOGE("NULL handler %p", handler_info);
+ REC_LOG_ERROR("NULL handler[%p]", handler_info);
return NULL;
}
cb_info = (recorder_cb_info_s *)handler_info->cb_info;
type = handler_info->type;
- LOGD("t:%d start", type);
+ REC_LOG_INFO("t[%d] start", type);
g_mutex_lock(&handler_info->mutex);
while (g_atomic_int_get(&handler_info->running)) {
if (g_queue_is_empty(handler_info->queue)) {
- /*LOGD("signal wait...");*/
+ REC_LOG_VERBOSE("signal wait...");
g_cond_wait(&handler_info->cond, &handler_info->mutex);
- /*LOGD("signal received");*/
+ REC_LOG_VERBOSE("signal received");
if (g_atomic_int_get(&handler_info->running) == 0) {
- LOGD("stop event thread");
+ REC_LOG_INFO("stop event thread");
break;
}
}
rec_msg = (recorder_message_s *)g_queue_pop_head(handler_info->queue);
g_mutex_unlock(&handler_info->mutex);
if (rec_msg == NULL) {
- LOGE("NULL message");
+ REC_LOG_ERROR("NULL message");
g_mutex_lock(&handler_info->mutex);
continue;
}
cb_info->api_ret[api] = ret;
cb_info->api_activating[api] = TRUE;
- /*LOGD("recorder api %d - return 0x%x", api, ret);*/
+ REC_LOG_DEBUG("recorder api[%d] - return[0x%x]", api, ret);
g_cond_signal(&cb_info->api_cond[api]);
} else {
- LOGE("no waiting for api [%d]", api);
+ REC_LOG_ERROR("no waiting for api [%d]", api);
}
} else {
- LOGE("t:%d failed to get ret for api %d, msg %s", type, api, rec_msg->recv_msg);
+ REC_LOG_ERROR("t[%d] failed to get ret for api[%d], msg[%s]", type, api, rec_msg->recv_msg);
}
g_mutex_unlock(&cb_info->api_mutex[api]);
case MUSE_RECORDER_EVENT_CLASS_THREAD_MAIN:
rec_idle_event = g_new0(recorder_idle_event_s, 1);
if (rec_idle_event == NULL) {
- LOGE("event alloc failed");
+ REC_LOG_ERROR("event alloc failed");
break;
}
strncpy(rec_idle_event->recv_msg, rec_msg->recv_msg, sizeof(rec_idle_event->recv_msg));
- /*LOGD("add recorder event[%d, %p] to IDLE", rec_msg->event, rec_idle_event);*/
+ REC_LOG_DEBUG("add recorder event[%d][%p] to IDLE", rec_msg->event, rec_idle_event);
g_mutex_lock(&g_rec_idle_event_lock);
cb_info->idle_event_list = g_list_append(cb_info->idle_event_list, (gpointer)rec_idle_event);
NULL);
break;
default:
- LOGE("unknown event class %d", rec_msg->event_class);
+ REC_LOG_ERROR("unknown event class[%d]", rec_msg->event_class);
break;
}
} else {
- LOGE("unknown api[%d] message", api);
+ REC_LOG_ERROR("unknown api[%d] message", api);
}
g_free(rec_msg);
while (!g_queue_is_empty(handler_info->queue)) {
rec_msg = (recorder_message_s *)g_queue_pop_head(handler_info->queue);
if (rec_msg) {
- LOGD("remove message %p", rec_msg);
+ REC_LOG_INFO("remove message[%p]", rec_msg);
free(rec_msg);
rec_msg = NULL;
} else {
- LOGW("NULL message");
+ REC_LOG_WARNING("NULL message");
}
}
g_mutex_unlock(&handler_info->mutex);
- LOGD("return");
+ REC_LOG_INFO("return");
return NULL;
}
recorder_cb_info_s *cb_info = (recorder_cb_info_s *)data;
if (cb_info == NULL) {
- LOGE("cb_info NULL");
+ REC_LOG_ERROR("cb_info NULL");
return NULL;
}
- LOGD("start");
+ REC_LOG_INFO("start");
recv_msg = cb_info->recv_msg;
if (recv_length <= 0) {
//LCOV_EXCL_START
cb_info->is_server_connected = FALSE;
- LOGE("receive msg failed - server disconnected");
+ REC_LOG_ERROR("receive msg failed - server disconnected");
break;
//LCOV_EXCL_STOP
}
recv_msg[recv_length] = '\0';
- /*LOGD("recv msg : %s, length : %d", recv_msg, recv_length);*/
+ REC_LOG_DEBUG("recv msg[%s], length[%d]", recv_msg, recv_length);
__recorder_process_msg(cb_info, recv_msg, tfd);
}
- LOGD("client cb exit - server connected %d", cb_info->is_server_connected);
+ REC_LOG_INFO("client cb exit - server connected[%d]", cb_info->is_server_connected);
if (!cb_info->is_server_connected) {
//LCOV_EXCL_START
NULL);
if (!error_msg) {
- LOGE("error_msg failed");
+ REC_LOG_ERROR("error_msg failed");
goto CB_HANDLER_EXIT;
}
- LOGE("add error msg for service disconnection done");
+ REC_LOG_ERROR("add error msg for service disconnection done");
__recorder_add_msg_to_queue(cb_info,
MUSE_RECORDER_CB_EVENT,
muse_core_msg_free(error_msg);
error_msg = NULL;
- LOGE("add error msg for service disconnection done");
+ REC_LOG_ERROR("add error msg for service disconnection done");
//LCOV_EXCL_STOP
}
int type, const char *thread_name, recorder_cb_info_s *cb_info)
{
if (!handler_info || !thread_name || !cb_info) {
- LOGE("t:%d NULL %p %p %p",
+ REC_LOG_ERROR("t[%d] NULL[%p][%p][%p]",
type, handler_info, thread_name, cb_info);
return false;
}
- LOGD("t:%d", type);
+ REC_LOG_INFO("t[%d]", type);
handler_info->type = type;
handler_info->queue = g_queue_new();
if (handler_info->queue == NULL) {
- LOGE("t:%d queue failed", type);
+ REC_LOG_ERROR("t[%d] queue failed", type);
return false;
}
_recorder_msg_handler_func, (gpointer)handler_info, NULL);
if (handler_info->thread == NULL) {
//LCOV_EXCL_START
- LOGE("t:%d thread failed", type);
+ REC_LOG_ERROR("t[%d] thread failed", type);
g_mutex_clear(&handler_info->mutex);
g_cond_clear(&handler_info->cond);
//LCOV_EXCL_STOP
}
- LOGD("t:%d done", type);
+ REC_LOG_INFO("t[%d] done", type);
return true;
}
int type = 0;
if (!handler_info) {
- LOGE("NULL handler");
+ REC_LOG_ERROR("NULL handler");
return;
}
if (!handler_info->thread) {
- LOGW("thread is not created");
+ REC_LOG_WARNING("thread is not created");
return;
}
type = handler_info->type;
- LOGD("t:%d thread %p", type, handler_info->thread);
+ REC_LOG_INFO("t[%d] thread[%p]", type, handler_info->thread);
g_mutex_lock(&handler_info->mutex);
g_atomic_int_set(&handler_info->running, 0);
g_queue_free(handler_info->queue);
handler_info->queue = NULL;
- LOGD("t:%d done", type);
+ REC_LOG_INFO("t[%d] done", type);
return;
}
cb_info = g_new0(recorder_cb_info_s, 1);
if (cb_info == NULL) {
- LOGE("cb_info failed");
+ REC_LOG_ERROR("cb_info failed");
goto ErrorExit;
}
/* message handler thread */
if (!__create_msg_handler_thread(&cb_info->msg_handler_info,
_RECORDER_MESSAGE_HANDLER_TYPE_GENERAL, "recorder_msg_handler", cb_info)) {
- LOGE("msg_handler_info failed");
+ REC_LOG_ERROR("msg_handler_info failed");
goto ErrorExit;
}
/* message handler thread for audio stream callback */
if (!__create_msg_handler_thread(&cb_info->audio_stream_cb_info,
_RECORDER_MESSAGE_HANDLER_TYPE_AUDIO_STREAM_CB, "recorder_msg_handler:audio_stream_cb", cb_info)) {
- LOGE("audio_stream_cb_info failed");
+ REC_LOG_ERROR("audio_stream_cb_info failed");
goto ErrorExit;
}
/* message handler thread for muxed stream callback */
if (!__create_msg_handler_thread(&cb_info->muxed_stream_cb_info,
_RECORDER_MESSAGE_HANDLER_TYPE_MUXED_STREAM_CB, "recorder_msg_handler:muxed_stream_cb", cb_info)) {
- LOGE("muxed_stream_cb_info failed");
+ REC_LOG_ERROR("muxed_stream_cb_info failed");
goto ErrorExit;
}
cb_info->msg_recv_thread = g_thread_try_new("recorder_msg_recv",
_recorder_msg_recv_func, (gpointer)cb_info, NULL);
if (cb_info->msg_recv_thread == NULL) {
- LOGE("message receive thread creation failed");
+ REC_LOG_ERROR("message receive thread creation failed");
goto ErrorExit;
}
int ret = RECORDER_ERROR_NONE;
gint64 end_time;
- /*LOGD("Enter api : %d", api);*/
-
if (!cb_info->is_server_connected) {
- LOGE("server is disconnected");
+ REC_LOG_ERROR("server is disconnected");
return RECORDER_ERROR_SERVICE_DISCONNECTED;
}
g_mutex_lock(&(cb_info->api_mutex[api]));
- LOGD("api [%d], timeout [%d sec]", api, time_out);
+ REC_LOG_INFO("api[%d], timeout[%d]sec", api, time_out);
end_time = g_get_monotonic_time() + time_out * G_TIME_SPAN_SECOND;
while (!cb_info->api_activating[api]) {
if (time_out == RECORDER_CB_NO_TIMEOUT) {
g_cond_wait(&(cb_info->api_cond[api]), &(cb_info->api_mutex[api]));
- LOGW("api %d returned 0x%x", api, cb_info->api_ret[api]);
+ REC_LOG_WARNING("api[%d] returned[0x%x]", api, cb_info->api_ret[api]);
} else if (!g_cond_wait_until(&(cb_info->api_cond[api]), &(cb_info->api_mutex[api]), end_time)) {
- LOGE("api %d was TIMED OUT!", api);
+ REC_LOG_ERROR("api[%d] was TIMED OUT!", api);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _CB_RETURN_END;
}
if (!cb_info->api_activating[api])
- LOGW("invalid signal received, wait again...");
+ REC_LOG_WARNING("invalid signal received, wait again...");
}
ret = cb_info->api_ret[api];
g_mutex_unlock(&(cb_info->api_mutex[api]));
if (ret != RECORDER_ERROR_NONE)
- LOGE("ERROR : api %d - ret 0x%x", api, ret);
+ REC_LOG_ERROR("ERROR : api[%d] - ret[0x%x]", api, ret);
return ret;
}
char *msg = NULL;
if (!cb_info || !ret) {
- LOGE("invalid pointer for api %d - %p %p", api, cb_info, ret);
+ REC_LOG_ERROR("invalid pointer for api[%d] -[%p][%p]", api, cb_info, ret);
return RECORDER_ERROR_INVALID_PARAMETER;
}
msg = muse_core_msg_new(api, NULL);
if (!msg) {
- LOGE("msg creation failed: api %d", api);
+ REC_LOG_ERROR("msg creation failed: api[%d]", api);
return RECORDER_ERROR_OUT_OF_MEMORY;
}
- /*LOGD("send msg %s", msg);*/
+ REC_LOG_VERBOSE("send msg[%s]", msg);
if (cb_info->is_server_connected) {
__recorder_update_api_waiting(cb_info, api, 1);
}
if (send_ret < 0) {
- LOGE("message send failed");
+ REC_LOG_ERROR("message send failed");
*ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
*ret = _recorder_client_wait_for_cb_return(api, cb_info, timeout);
char *msg = NULL;
if (!cb_info || !ret || !param) {
- LOGE("invalid pointer for api %d - %p %p %p", api, cb_info, ret, param);
+ REC_LOG_ERROR("invalid pointer for api[%d] -[%p][%p][%p]", api, cb_info, ret, param);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- /*LOGD("type %d, name %s", param->type, param->name);*/
+ REC_LOG_VERBOSE("type[%d], name[%s]", param->type, param->name);
switch (param->type) {
case MUSE_TYPE_INT:
msg = muse_core_msg_new(api, param->type, param->name, param->value.value_STRING, NULL);
break;
default:
- LOGE("unknown type %d", param->type);
+ REC_LOG_ERROR("unknown type[%d]", param->type);
break;
}
if (!msg) {
- LOGE("msg creation failed: api %d, type %d, param name %s",
+ REC_LOG_ERROR("msg creation failed: api[%d], type[%d], param name[%s]",
api, param->type, param->name);
return RECORDER_ERROR_OUT_OF_MEMORY;
}
- /*LOGD("send msg %s", msg);*/
+ REC_LOG_VERBOSE("send msg[%s]", msg);
if (cb_info->is_server_connected) {
__recorder_update_api_waiting(cb_info, api, 1);
}
if (send_ret < 0) {
- LOGE("message send failed");
+ REC_LOG_ERROR("message send failed");
*ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
*ret = _recorder_client_wait_for_cb_return(api, cb_info, RECORDER_CB_TIMEOUT);
/* remove idle event */
_recorder_deactivate_idle_event_all(cb_info);
- LOGD("MSG receive thread[%p] destroy", cb_info->msg_recv_thread);
+ REC_LOG_INFO("MSG receive thread[%p] destroy", cb_info->msg_recv_thread);
g_thread_join(cb_info->msg_recv_thread);
cb_info->msg_recv_thread = NULL;
- LOGD("msg_recv thread removed");
+ REC_LOG_INFO("msg_recv thread removed");
__destroy_msg_handler_thread(&cb_info->msg_handler_info);
__destroy_msg_handler_thread(&cb_info->audio_stream_cb_info);
char **root_directory = (char **)user_data;
if (root_directory == NULL) {
- LOGE("user data is NULL");
+ REC_LOG_ERROR("user data is NULL");
return false;
}
- LOGD("storage id %d, type %d, state %d, path %s",
+ REC_LOG_INFO("storage id[%d], type[%d], state[%d], path[%s]",
storage_id, type, state, path ? path : "NULL");
if (type == STORAGE_TYPE_INTERNAL && path) {
*root_directory = strdup(path);
if (*root_directory) {
- LOGD("get root directory %s", *root_directory);
+ REC_LOG_INFO("get root directory[%s]", *root_directory);
return false;
} else {
- LOGE("strdup %s failed", path);
+ REC_LOG_ERROR("strdup[%s] failed", path);
}
}
int ret = STORAGE_ERROR_NONE;
if (root_directory == NULL) {
- LOGE("user data is NULL");
+ REC_LOG_ERROR("user data is NULL");
return false;
}
ret = storage_foreach_device_supported((storage_device_supported_cb)_recorder_storage_device_supported_cb, root_directory);
if (ret != STORAGE_ERROR_NONE) {
- LOGE("storage_foreach_device_supported failed 0x%x", ret);
+ REC_LOG_ERROR("storage_foreach_device_supported failed[0x%x]", ret);
return false;
}
recorder_cli_s *pc = NULL;
recorder_msg_param param;
- LOGD("Enter - type %d", type);
+ REC_LOG_INFO("Enter - type[%d]", type);
if (recorder == NULL) {
- LOGE("NULL pointer for recorder handle");
+ REC_LOG_ERROR("NULL pointer for recorder handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (type == MUSE_RECORDER_TYPE_VIDEO && camera == NULL) {
- LOGE("NULL pointer for camera handle on video recorder mode");
+ REC_LOG_ERROR("NULL pointer for camera handle on video recorder mode");
return RECORDER_ERROR_INVALID_PARAMETER;
}
bufmgr = tbm_bufmgr_init(-1);
if (bufmgr == NULL) {
- LOGE("get tbm bufmgr failed");
+ REC_LOG_ERROR("get tbm bufmgr failed");
return RECORDER_ERROR_INVALID_OPERATION;
}
sock_fd = muse_client_new();
if (sock_fd < 0) {
//LCOV_EXCL_START
- LOGE("muse_client_new failed - returned fd %d", sock_fd);
+ REC_LOG_ERROR("muse_client_new failed - returned fd[%d]", sock_fd);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_EXIT;
//LCOV_EXCL_STOP
}
if (muse_client_get_module_index(MODULE_NAME, &module_index) != MM_ERROR_NONE) {
- LOGE("muse client get module index failed");
+ REC_LOG_ERROR("muse client get module index failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_EXIT;
}
if (!send_msg) {
//LCOV_EXCL_START
- LOGE("NULL msg");
+ REC_LOG_ERROR("NULL msg");
ret = RECORDER_ERROR_OUT_OF_MEMORY;
goto _ERR_RECORDER_EXIT;
//LCOV_EXCL_STOP
}
- LOGD("sock_fd : %d, msg : %s", sock_fd, send_msg);
+ REC_LOG_INFO("sock_fd[%d], msg[%s]", sock_fd, send_msg);
send_ret = muse_core_msg_send(sock_fd, send_msg);
if (send_ret < 0) {
//LCOV_EXCL_START
- LOGE("send msg failed %d", errno);
+ REC_LOG_ERROR("send msg failed[%d]", errno);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_EXIT;
//LCOV_EXCL_STOP
pc->cb_info->api_waiting[MUSE_RECORDER_API_CREATE] = 0;
if (ret != RECORDER_ERROR_NONE) {
- LOGE("API_CREATE failed 0x%x", ret);
+ REC_LOG_ERROR("API_CREATE failed[0x%x]", ret);
goto _ERR_RECORDER_EXIT;
}
muse_recorder_msg_get_pointer(handle, pc->cb_info->recv_msg);
if (handle == 0) {
//LCOV_EXCL_START
- LOGE("Receiving Handle Failed!!");
+ REC_LOG_ERROR("Receiving Handle Failed!!");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_AFTER_CREATE;
//LCOV_EXCL_STOP
if (!_recorder_client_get_root_directory(&root_directory) || root_directory == NULL) {
//LCOV_EXCL_START
- LOGE("failed to get root directory of internal storage");
+ REC_LOG_ERROR("failed to get root directory of internal storage");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_AFTER_CREATE;
//LCOV_EXCL_STOP
}
- LOGD("root directory [%s]", root_directory);
+ REC_LOG_INFO("root directory[%s]", root_directory);
RECORDER_MSG_PARAM_SET(param, STRING, root_directory);
_recorder_msg_send_param1(MUSE_RECORDER_API_ATTR_SET_ROOT_DIRECTORY, pc->cb_info, &ret, ¶m);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("failed to set root directory %s", root_directory);
+ REC_LOG_ERROR("failed to set root directory[%s]", root_directory);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _ERR_RECORDER_AFTER_CREATE;
}
pc->remote_handle = handle;
pc->cb_info->bufmgr = bufmgr;
- LOGD("recorder[type %d] %p create success : remote handle 0x%td",
+ REC_LOG_INFO("recorder type[%d][%p] create success : remote handle[%td]",
type, pc, pc->remote_handle);
*recorder = (recorder_h)pc;
- LOGD("done");
+ REC_LOG_INFO("done");
return RECORDER_ERROR_NONE;
//LCOV_EXCL_START
_ERR_RECORDER_AFTER_CREATE:
_recorder_msg_send(MUSE_RECORDER_API_DESTROY, pc->cb_info, &destroy_ret, RECORDER_CB_TIMEOUT);
- LOGE("destroy return 0x%x", destroy_ret);
+ REC_LOG_ERROR("destroy return[0x%x]", destroy_ret);
_ERR_RECORDER_EXIT:
tbm_bufmgr_deinit(bufmgr);
muse_recorder_api_e api = MUSE_RECORDER_API_GET_STATE;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (state == NULL) {
- LOGE("NULL pointer state");
+ REC_LOG_ERROR("NULL pointer state");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, remote_handle : %td", pc->remote_handle);
+ REC_LOG_INFO("Enter, remote_handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*state = (recorder_state_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_STATE];
- LOGD("ret : 0x%x, state : %d", ret, *state);
+ REC_LOG_INFO("ret[0x%x], state[%d]", ret, *state);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
if (pc->cb_info->is_server_connected)
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
else
- LOGW("server disconnected. release resource without send message.");
+ REC_LOG_WARNING("server disconnected. release resource without send message.");
if (ret == RECORDER_ERROR_NONE) {
_recorder_client_callback_destroy(pc->cb_info);
pc = NULL;
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
if (ret == RECORDER_ERROR_NONE && pc->camera)
camera_start_evas_rendering(pc->camera);
camera_state_e camera_state = CAMERA_STATE_NONE;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
if (pc->camera) {
//LCOV_EXCL_START
ret = camera_get_state(pc->camera, &camera_state);
if (ret != CAMERA_ERROR_NONE) {
- LOGE("failed to get camera state 0x%x", ret);
+ REC_LOG_ERROR("failed to get camera state[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
if (camera_state == CAMERA_STATE_PREVIEW) {
ret = camera_stop_evas_rendering(pc->camera, false);
if (ret != CAMERA_ERROR_NONE) {
- LOGE("camera_stop_evas_rendering failed 0x%x", ret);
+ REC_LOG_ERROR("camera_stop_evas_rendering failed[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
}
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_state_e current_state = RECORDER_STATE_NONE;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
if (pc->camera) {
//LCOV_EXCL_START
ret = recorder_get_state(recorder, ¤t_state);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("failed to get current state 0x%x", ret);
+ REC_LOG_ERROR("failed to get current state[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
if (current_state == RECORDER_STATE_READY) {
ret = camera_stop_evas_rendering(pc->camera, true);
if (ret != CAMERA_ERROR_NONE) {
- LOGE("camera_stop_evas_rendering failed 0x%x", ret);
+ REC_LOG_ERROR("camera_stop_evas_rendering failed[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
}
if (pc->camera && current_state == RECORDER_STATE_READY)
camera_start_evas_rendering(pc->camera);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_state_e current_state = RECORDER_STATE_NONE;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
if (pc->camera) {
//LCOV_EXCL_START
ret = recorder_get_state(recorder, ¤t_state);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("failed to get current state 0x%x", ret);
+ REC_LOG_ERROR("failed to get current state[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
if (current_state >= RECORDER_STATE_RECORDING) {
ret = camera_stop_evas_rendering(pc->camera, true);
if (ret != CAMERA_ERROR_NONE) {
- LOGE("camera_stop_evas_rendering failed 0x%x", ret);
+ REC_LOG_ERROR("camera_stop_evas_rendering failed[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
}
if (pc->camera && current_state >= RECORDER_STATE_RECORDING)
camera_start_evas_rendering(pc->camera);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_state_e current_state = RECORDER_STATE_NONE;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
if (pc->camera) {
ret = recorder_get_state(recorder, ¤t_state);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("failed to get current state 0x%x", ret);
+ REC_LOG_ERROR("failed to get current state[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
if (current_state >= RECORDER_STATE_RECORDING) {
ret = camera_stop_evas_rendering(pc->camera, true);
if (ret != CAMERA_ERROR_NONE) {
- LOGE("camera_stop_evas_rendering failed 0x%x", ret);
+ REC_LOG_ERROR("camera_stop_evas_rendering failed[0x%x]", ret);
return RECORDER_ERROR_INVALID_OPERATION;
}
}
if (pc->camera && current_state >= RECORDER_STATE_RECORDING)
camera_start_evas_rendering(pc->camera);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
send_msg = muse_core_msg_new(api,
MUSE_TYPE_INT, "width", width,
}
if (send_ret < 0) {
- LOGE("message send failed");
+ REC_LOG_ERROR("message send failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
ret = _recorder_client_wait_for_cb_return(api, pc->cb_info, RECORDER_CB_TIMEOUT);
muse_core_msg_free(send_msg);
} else {
- LOGE("failed to create msg");
+ REC_LOG_ERROR("failed to create msg");
ret = RECORDER_ERROR_OUT_OF_MEMORY;
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (!width || !height) {
- LOGE("NULL pointer width = [%p], height = [%p]", width, height);
+ REC_LOG_ERROR("NULL pointer width = [%p], height = [%p]", width, height);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
*height = (0x0000ffff & pc->cb_info->get_int_value[_RECORDER_GET_INT_VIDEO_RESOLUTION]);
}
- LOGD("ret : 0x%x, %dx%d", ret, *width, *height);
+ REC_LOG_INFO("ret[0x%x],[%d]x%d", ret, *width, *height);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_VIDEO_RESOLUTION;
if (!pc || !pc->cb_info || foreach_cb == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
pc->cb_info->user_cb[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_VIDEO_RESOLUTION] = foreach_cb;
pc->cb_info->user_data[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_VIDEO_RESOLUTION] = user_data;
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info || level == NULL) {
- LOGE("NULL pointer %p %p", pc, level);
+ REC_LOG_ERROR("NULL pointer[%p][%p]", pc, level);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*level = pc->cb_info->get_double_value[_RECORDER_GET_DOUBLE_AUDIO_LEVEL];
- LOGD("ret : 0x%x, level %lf", ret, *level);
+ REC_LOG_INFO("ret[0x%x], level %lf", ret, *level);
return ret;
}
char set_filename[RECORDER_FILENAME_MAX] = {'\0',};
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (filename == NULL) {
- LOGE("filename is NULL");
+ REC_LOG_ERROR("filename is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER [%s]", filename);
+ REC_LOG_INFO("ENTER[%s]", filename);
length = strlen(filename);
if (length >= RECORDER_FILENAME_MAX - 1) {
- LOGE("too long file name [%zu]", length);
+ REC_LOG_ERROR("too long file name [%zu]", length);
return RECORDER_ERROR_INVALID_PARAMETER;
}
pc->cb_info->is_filename_converted = FALSE;
} else {
/* Converted. Use converted path. */
- LOGD("Converted filename : %s -> %s", filename, set_filename);
+ REC_LOG_INFO("Converted filename[%s] ->[%s]", filename, set_filename);
pc->cb_info->is_filename_converted = TRUE;
}
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
char compat_filename[RECORDER_FILENAME_MAX] = {0, };
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (filename == NULL) {
- LOGE("filename is NULL");
+ REC_LOG_ERROR("filename is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
*filename = pc->cb_info->get_filename;
} else {
/* Converted. Use converted path. */
- LOGD("Converted filename : %s -> %s", pc->cb_info->get_filename, compat_filename);
+ REC_LOG_INFO("Converted filename[%s] ->[%s]", pc->cb_info->get_filename, compat_filename);
*filename = strdup(compat_filename);
free(pc->cb_info->get_filename);
}
pc->cb_info->get_filename = NULL;
}
- LOGD("ret : 0x%x, filename : [%s]", ret, (*filename) ? *filename : "NULL");
+ REC_LOG_INFO("ret[0x%x], filename[%s]", ret, (*filename) ? *filename : "NULL");
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER, set_format : %d", set_format);
+ REC_LOG_INFO("ENTER, set_format[%d]", set_format);
RECORDER_MSG_PARAM_SET(param, INT, set_format);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (format == NULL) {
- LOGE("NULL pointer data");
+ REC_LOG_ERROR("NULL pointer data");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*format = (recorder_file_format_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_FILE_FORMAT];
- LOGD("ret : 0x%x, format %d", ret, *format);
+ REC_LOG_INFO("ret[0x%x], format[%d]", ret, *format);
return ret;
}
int send_ret = 0;
if (!pc || !pc->cb_info || stream_info == NULL) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
ret = sound_manager_is_available_stream_information(stream_info, NATIVE_API_RECORDER, &is_available);
if (ret != SOUND_MANAGER_ERROR_NONE) {
- LOGE("stream info verification failed");
+ REC_LOG_ERROR("stream info verification failed");
return RECORDER_ERROR_INVALID_OPERATION;
}
if (is_available == false) {
- LOGE("stream information is not available");
+ REC_LOG_ERROR("stream information is not available");
return RECORDER_ERROR_INVALID_OPERATION;
}
ret = sound_manager_get_type_from_stream_information(stream_info, &stream_type);
ret |= sound_manager_get_index_from_stream_information(stream_info, &stream_index);
- LOGD("sound manager return [0x%x]", ret);
+ REC_LOG_INFO("sound manager return [0x%x]", ret);
if (ret == SOUND_MANAGER_ERROR_NONE) {
send_msg = muse_core_msg_new(api,
}
if (send_ret < 0) {
- LOGE("message send failed");
+ REC_LOG_ERROR("message send failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
ret = _recorder_client_wait_for_cb_return(api, pc->cb_info, RECORDER_CB_TIMEOUT);
muse_core_msg_free(send_msg);
} else {
- LOGE("failed to create msg");
+ REC_LOG_ERROR("failed to create msg");
ret = RECORDER_ERROR_OUT_OF_MEMORY;
}
} else {
muse_recorder_api_e api = MUSE_RECORDER_API_SET_STATE_CHANGED_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_STATE_CHANGE]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_STATE_CHANGE]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_INTERRUPTED_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_INTERRUPTED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_INTERRUPTED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_INTERRUPT_STARTED_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_INTERRUPT_STARTED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_INTERRUPT_STARTED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_AUDIO_STREAM_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_AUDIO_STREAM]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_AUDIO_STREAM]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_MUXED_STREAM_CB;
if (!pc || !pc->cb_info || !callback) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_MUXED_STREAM]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_MUXED_STREAM]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_VIDEO_ENCODE_DECISION_CB;
if (!pc || !pc->cb_info || !callback) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_VIDEO_ENCODE_DECISION]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_VIDEO_ENCODE_DECISION]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_ERROR_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_ERROR]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_ERROR]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_RECORDING_STATUS_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_RECORDING_STATUS]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_RECORDING_STATUS]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_SET_RECORDING_LIMIT_REACHED_CB;
if (!pc || !pc->cb_info || callback == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_RECORDING_LIMITED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_RECORDER_EVENT_TYPE_RECORDING_LIMITED]);
}
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_FILE_FORMAT;
if (!pc || !pc->cb_info || foreach_cb == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
pc->cb_info->user_cb[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_FILE_FORMAT] = foreach_cb;
pc->cb_info->user_data[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_FILE_FORMAT] = user_data;
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, kbyte);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, second);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
};
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, set_device);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, set_codec);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (codec == NULL) {
- LOGE("codec is NULL");
+ REC_LOG_ERROR("codec is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*codec = (recorder_audio_codec_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_AUDIO_ENCODER];
- LOGD("ret : 0x%x, codec %d", ret, *codec);
+ REC_LOG_INFO("ret[0x%x], codec[%d]", ret, *codec);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, set_codec);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (codec == NULL) {
- LOGE("codec is NULL");
+ REC_LOG_ERROR("codec is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*codec = (recorder_video_codec_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_VIDEO_ENCODER];
- LOGD("ret : 0x%x, codec %d", ret, *codec);
+ REC_LOG_INFO("ret[0x%x], codec[%d]", ret, *codec);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER, samplerate : %d", samplerate);
+ REC_LOG_INFO("ENTER, samplerate[%d]", samplerate);
RECORDER_MSG_PARAM_SET(param, INT, samplerate);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, bitrate);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, bitrate);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (kbyte == NULL) {
- LOGE("NULL pointer kbyte");
+ REC_LOG_ERROR("NULL pointer kbyte");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*kbyte = pc->cb_info->get_int_value[_RECORDER_GET_INT_SIZE_LIMIT];
- LOGD("ret : 0x%x, %d kbyte", ret, *kbyte);
+ REC_LOG_INFO("ret[0x%x],[%d] kbyte", ret, *kbyte);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (second == NULL) {
- LOGE("NULL pointer second");
+ REC_LOG_ERROR("NULL pointer second");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*second = pc->cb_info->get_int_value[_RECORDER_GET_INT_TIME_LIMIT];
- LOGD("ret : 0x%x, %d second", ret, *second);
+ REC_LOG_INFO("ret[0x%x],[%d] second", ret, *second);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (device == NULL) {
- LOGE("NULL pointer device");
+ REC_LOG_ERROR("NULL pointer device");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*device = (recorder_audio_device_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_AUDIO_DEVICE];
- LOGD("ret : 0x%x, device %d", ret, *device);
+ REC_LOG_INFO("ret[0x%x], device[%d]", ret, *device);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (samplerate == NULL) {
- LOGE("NULL pointer handle");
+ REC_LOG_ERROR("NULL pointer handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*samplerate = pc->cb_info->get_int_value[_RECORDER_GET_INT_AUDIO_SAMPLERATE];
- LOGD("ret : 0x%x, samplerate %d", ret, *samplerate);
+ REC_LOG_INFO("ret[0x%x], samplerate[%d]", ret, *samplerate);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (bitrate == NULL) {
- LOGE("NULL pointer");
+ REC_LOG_ERROR("NULL pointer");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*bitrate = pc->cb_info->get_int_value[_RECORDER_GET_INT_AUDIO_ENCODER_BITRATE];
- LOGD("ret : 0x%x, bitrate %d", ret, *bitrate);
+ REC_LOG_INFO("ret[0x%x], bitrate[%d]", ret, *bitrate);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (bitrate == NULL) {
- LOGE("NULL pointer");
+ REC_LOG_ERROR("NULL pointer");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*bitrate = pc->cb_info->get_int_value[_RECORDER_GET_INT_VIDEO_ENCODER_BITRATE];
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_AUDIO_ENCODER;
if (!pc || !pc->cb_info || foreach_cb == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
pc->cb_info->user_cb[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_AUDIO_ENCODER] = foreach_cb;
pc->cb_info->user_data[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_AUDIO_ENCODER] = user_data;
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_VIDEO_ENCODER;
if (!pc || !pc->cb_info || foreach_cb == NULL) {
- LOGE("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
+ REC_LOG_ERROR("INVALID_PARAMETER(0x%08x)", RECORDER_ERROR_INVALID_PARAMETER);
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter, handle :%td", pc->remote_handle);
+ REC_LOG_INFO("Enter, handle[%td]", pc->remote_handle);
pc->cb_info->user_cb[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_VIDEO_ENCODER] = foreach_cb;
pc->cb_info->user_data[MUSE_RECORDER_EVENT_TYPE_FOREACH_SUPPORTED_VIDEO_ENCODER] = user_data;
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, set_enable);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return false;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_SERVICE_DISCONNECTED)
ret = false;
- LOGD("ret : %d", ret);
+ REC_LOG_INFO("ret[%d]", ret);
return (bool)ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER - %.20lf", rate);
+ REC_LOG_INFO("ENTER - %.20lf", rate);
RECORDER_MSG_PARAM_SET(param, DOUBLE, rate);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (rate == NULL) {
- LOGE("rate is NULL");
+ REC_LOG_ERROR("rate is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*rate = pc->cb_info->get_double_value[_RECORDER_GET_DOUBLE_RECORDING_MOTION_RATE];
- LOGD("ret : 0x%x - rate %.20lf", ret, *rate);
+ REC_LOG_INFO("ret[0x%x] - rate %.20lf", ret, *rate);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, channel_count);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (channel_count == NULL) {
- LOGE("channel_count is NULL");
+ REC_LOG_ERROR("channel_count is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*channel_count = pc->cb_info->get_int_value[_RECORDER_GET_INT_AUDIO_CHANNEL];
- LOGD("ret : 0x%x, channel count %d", ret, *channel_count);
+ REC_LOG_INFO("ret[0x%x], channel count[%d]", ret, *channel_count);
return ret;
}
recorder_msg_param param;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
RECORDER_MSG_PARAM_SET(param, INT, set_orientation);
_recorder_msg_send_param1(api, pc->cb_info, &ret, ¶m);
- LOGD("ret : 0x%x", ret);
+ REC_LOG_INFO("ret[0x%x]", ret);
return ret;
}
recorder_cli_s *pc = (recorder_cli_s *)recorder;
if (!pc || !pc->cb_info) {
- LOGE("NULL handle");
+ REC_LOG_ERROR("NULL handle");
return RECORDER_ERROR_INVALID_PARAMETER;
}
if (orientation == NULL) {
- LOGE("orientation is NULL");
+ REC_LOG_ERROR("orientation is NULL");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("ENTER");
+ REC_LOG_INFO("ENTER");
_recorder_msg_send(api, pc->cb_info, &ret, RECORDER_CB_TIMEOUT);
if (ret == RECORDER_ERROR_NONE)
*orientation = (recorder_rotation_e)pc->cb_info->get_int_value[_RECORDER_GET_INT_ORIENTATION_TAG];
- LOGD("ret : 0x%x, orientation %d", ret, *orientation);
+ REC_LOG_INFO("ret[0x%x], orientation[%d]", ret, *orientation);
return ret;
}
char recv_msg[MUSE_RECORDER_MSG_MAX_LENGTH] = {'\0',};
if (!state) {
- LOGE("NULL pointer");
+ REC_LOG_ERROR("NULL pointer");
return RECORDER_ERROR_INVALID_PARAMETER;
}
- LOGD("Enter - type %d", type);
+ REC_LOG_INFO("Enter - type[%d]", type);
sock_fd = muse_client_new();
if (sock_fd < 0) {
//LCOV_EXCL_START
- LOGE("muse_client_new failed - returned fd %d", sock_fd);
+ REC_LOG_ERROR("muse_client_new failed - returned fd[%d]", sock_fd);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _GET_DEVICE_STATE_EXIT;
//LCOV_EXCL_STOP
}
if (muse_client_get_module_index(MODULE_NAME, &module_index) != MM_ERROR_NONE) {
- LOGE("muse client get module index failed");
+ REC_LOG_ERROR("muse client get module index failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _GET_DEVICE_STATE_EXIT;
}
NULL);
if (!send_msg) {
//LCOV_EXCL_START
- LOGE("NULL msg");
+ REC_LOG_ERROR("NULL msg");
ret = RECORDER_ERROR_OUT_OF_MEMORY;
goto _GET_DEVICE_STATE_EXIT;
//LCOV_EXCL_STOP
}
- LOGD("sock_fd : %d, msg : %s", sock_fd, send_msg);
+ REC_LOG_INFO("sock_fd[%d], msg[%s]", sock_fd, send_msg);
ret = muse_core_msg_send(sock_fd, send_msg);
if (ret < 0) {
//LCOV_EXCL_START
- LOGE("send msg failed %d", errno);
+ REC_LOG_ERROR("send msg failed[%d]", errno);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _GET_DEVICE_STATE_EXIT;
//LCOV_EXCL_STOP
ret = muse_core_msg_recv(sock_fd, recv_msg, MUSE_RECORDER_MSG_MAX_LENGTH);
if (ret <= 0) {
//LCOV_EXCL_START
- LOGE("recv msg failed %d", errno);
+ REC_LOG_ERROR("recv msg failed[%d]", errno);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _GET_DEVICE_STATE_EXIT;
//LCOV_EXCL_STOP
if (!muse_recorder_msg_get(ret, recv_msg)) {
//LCOV_EXCL_START
- LOGE("failed to get return value from msg [%s]", recv_msg);
+ REC_LOG_ERROR("failed to get return value from msg[%s]", recv_msg);
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _GET_DEVICE_STATE_EXIT;
//LCOV_EXCL_STOP
if (ret == RECORDER_ERROR_NONE) {
if (muse_recorder_msg_get(get_device_state, recv_msg)) {
*state = (recorder_device_state_e)get_device_state;
- LOGD("device type %d state %d", type, *state);
+ REC_LOG_INFO("device type[%d] state[%d]", type, *state);
} else {
- LOGE("failed to get device state from msg [%s]", recv_msg);
+ REC_LOG_ERROR("failed to get device state from msg[%s]", recv_msg);
ret = RECORDER_ERROR_INVALID_OPERATION;
}
} else {
- LOGE("failed 0x%x", ret);
+ REC_LOG_ERROR("failed[0x%x]", ret);
}
_GET_DEVICE_STATE_EXIT:
recorder_cb_info *info = NULL;
if (!callback || !cb_id) {
- LOGE("invalid pointer %p %p", callback, cb_id);
+ REC_LOG_ERROR("invalid pointer[%p][%p]", callback, cb_id);
return RECORDER_ERROR_INVALID_PARAMETER;
}
/* check recorder support */
ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, &state);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("get device state failed");
+ REC_LOG_ERROR("get device state failed");
g_mutex_unlock(&g_rec_dev_state_changed_cb_lock);
return ret;
}
info = g_new0(recorder_cb_info, 1);
if (!info) {
- LOGE("info failed");
+ REC_LOG_ERROR("info failed");
ret = RECORDER_ERROR_OUT_OF_MEMORY;
goto _DONE;
}
if (!g_rec_dev_state_changed_cb_conn) {
g_rec_dev_state_changed_cb_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
if (!g_rec_dev_state_changed_cb_conn) {
- LOGE("failed to get gdbus connection");
+ REC_LOG_ERROR("failed to get gdbus connection");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _DONE;
}
- LOGD("subscribe signal %s - %s - %s",
+ REC_LOG_INFO("subscribe signal[%s][%s][%s]",
MM_CAMCORDER_DBUS_OBJECT,
MM_CAMCORDER_DBUS_INTERFACE_RECORDER,
MM_CAMCORDER_DBUS_SIGNAL_STATE_CHANGED);
NULL, MM_CAMCORDER_DBUS_INTERFACE_RECORDER, MM_CAMCORDER_DBUS_SIGNAL_STATE_CHANGED, MM_CAMCORDER_DBUS_OBJECT, NULL,
G_DBUS_SIGNAL_FLAGS_NONE, (GDBusSignalCallback)__recorder_device_state_changed_cb, NULL, NULL);
if (!g_rec_dev_state_changed_cb_subscribe_id) {
- LOGE("failed to get gdbus connection");
+ REC_LOG_ERROR("failed to get gdbus connection");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _DONE;
}
- LOGD("signal subscribe id %u", g_rec_dev_state_changed_cb_subscribe_id);
+ REC_LOG_INFO("signal subscribe id %u", g_rec_dev_state_changed_cb_subscribe_id);
}
g_rec_dev_state_changed_cb_list = g_list_prepend(g_rec_dev_state_changed_cb_list, (gpointer)info);
- LOGD("callback id %d", info->id);
+ REC_LOG_INFO("callback id[%d]", info->id);
_DONE:
if (ret != RECORDER_ERROR_NONE) {
/* check recorder support */
ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, &state);
if (ret != RECORDER_ERROR_NONE) {
- LOGE("get device state failed");
+ REC_LOG_ERROR("get device state failed");
return ret;
}
g_mutex_lock(&g_rec_dev_state_changed_cb_lock);
if (!g_rec_dev_state_changed_cb_list) {
- LOGE("there is no callback info");
+ REC_LOG_ERROR("there is no callback info");
ret = RECORDER_ERROR_INVALID_OPERATION;
goto _DONE;
}
tmp_list = tmp_list->next;
if (!info) {
- LOGW("NULL info");
+ REC_LOG_WARNING("NULL info");
continue;
}
}
}
- LOGD("id %d callback removed", cb_id);
+ REC_LOG_INFO("id[%d] callback removed", cb_id);
ret = RECORDER_ERROR_NONE;
goto _DONE;
}
} while (tmp_list);
- LOGE("id %d callback not found", cb_id);
+ REC_LOG_ERROR("id[%d] callback not found", cb_id);
ret = RECORDER_ERROR_INVALID_PARAMETER;
_DONE: