#define CAM_LOG_CRITICAL(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_CRITICAL) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_CRITICAL) \
LOGF(format, ##args); \
} while (0)
#define CAM_LOG_ERROR(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_ERROR) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_ERROR) \
LOGE(format, ##args); \
} while (0)
#define CAM_LOG_WARNING(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_WARNING) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_WARNING) \
LOGW(format, ##args); \
} while (0)
#define CAM_LOG_INFO(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_INFO) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_INFO) \
LOGI(format, ##args); \
} while (0)
#define CAM_LOG_DEBUG(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_DEBUG) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_DEBUG) \
LOGD(format, ##args); \
} while (0)
#define CAM_LOG_VERBOSE(format, args...) \
do { \
- if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_VERBOSE) \
+ if (_camera_get_log_level() >= CAMERA_LOG_LEVEL_VERBOSE) \
LOGD("[V] "format, ##args); \
} while (0)
void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
int *ret, camera_msg_param *param0, camera_msg_param *param1, int timeout);
void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info);
+int _camera_get_log_level(void);
typedef bool (*camera_supported_cb_param1)(int param, void *user_data);
typedef bool (*camera_supported_cb_param2)(int param1, int param2, void *user_data);
static GMutex g_cam_idle_event_lock;
/* log level */
-int g_mmcam_log_level = CAMERA_LOG_LEVEL_INFO;
+static int g_camera_log_level = CAMERA_LOG_LEVEL_INFO;
static bool __camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle);
static void __camera_release_imported_bo(tbm_bo *bo);
pc->cb_info->preview_format = preview_format;
pc->cb_info->dp_info.type = CAMERA_DISPLAY_TYPE_NONE;
pc->cb_info->user_buffer_supported = (gboolean)user_buffer_supported;
- g_mmcam_log_level = log_level;
+ g_camera_log_level = log_level;
CAM_LOG_INFO("default preview format %d, user buffer %d, log level %d",
- preview_format, user_buffer_supported, g_mmcam_log_level);
+ preview_format, user_buffer_supported, g_camera_log_level);
*camera = (camera_h)pc;
return ret;
}
+
+
+int _camera_get_log_level(void)
+{
+ return g_camera_log_level;
+}
};
typedef struct _appdata appdata;
-struct appcore_ops ops = {
+static struct appcore_ops ops = {
.create = app_create,
.terminate = app_terminate,
};
-appdata ad;
-GIOChannel *stdin_channel;
-camera_device_e camera_device;
+static appdata ad;
+static GIOChannel *stdin_channel;
+static camera_device_e camera_device;
static GTimer *timer;
static int g_camera_device_state_changed_cb_id;
static int g_camera_device_list_changed_cb_id;