summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-07-14 19:40:13 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-07-14 19:40:13 +0700
commit9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf (patch)
tree78decdc46aa76a0fd3cf00bbb371966571cf902e /libcamera
parent83f873cb99c5827c794c31b6e0003e12b05069e3 (diff)
downloaddevice_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.zip
device_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.tar.gz
device_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.tar.bz2
jellybean bring up
Change-Id: I19a95c3c8613a81d02f1146941fcb2f9ecc4efae
Diffstat (limited to 'libcamera')
-rw-r--r--libcamera/Android.mk1
-rwxr-xr-xlibcamera/SecCamera.cpp532
-rw-r--r--libcamera/SecCamera.h4
-rwxr-xr-xlibcamera/SecCameraHWInterface.cpp400
4 files changed, 469 insertions, 468 deletions
diff --git a/libcamera/Android.mk b/libcamera/Android.mk
index 728ceca..08f8581 100644
--- a/libcamera/Android.mk
+++ b/libcamera/Android.mk
@@ -7,6 +7,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../libs3cjpeg
+LOCAL_C_INCLUDES += frameworks/native/include/media/hardware
LOCAL_SRC_FILES:= \
SecCamera.cpp \
diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp
index 3150b15..7442f6f 100755
--- a/libcamera/SecCamera.cpp
+++ b/libcamera/SecCamera.cpp
@@ -40,7 +40,7 @@ using namespace android;
#define CHECK(return_value) \
if (return_value < 0) { \
- LOGE("%s::%d fail. errno: %s, m_camera_id = %d\n", \
+ ALOGE("%s::%d fail. errno: %s, m_camera_id = %d\n", \
__func__, __LINE__, strerror(errno), m_camera_id); \
return -1; \
}
@@ -48,7 +48,7 @@ using namespace android;
#define CHECK_PTR(return_value) \
if (return_value < 0) { \
- LOGE("%s::%d fail, errno: %s, m_camera_id = %d\n", \
+ ALOGE("%s::%d fail, errno: %s, m_camera_id = %d\n", \
__func__,__LINE__, strerror(errno), m_camera_id); \
return NULL; \
}
@@ -133,12 +133,12 @@ static int fimc_poll(struct pollfd *events)
*/
ret = poll(events, 1, 10000);
if (ret < 0) {
- LOGE("ERR(%s):poll error\n", __func__);
+ ALOGE("ERR(%s):poll error\n", __func__);
return ret;
}
if (ret == 0) {
- LOGE("ERR(%s):No data in 10 secs..\n", __func__);
+ ALOGE("ERR(%s):No data in 10 secs..\n", __func__);
return ret;
}
@@ -157,7 +157,7 @@ int SecCamera::previewPoll(bool preview)
status = getCameraSensorESDStatus();
m_esd_check_count = 0;
if (status) {
- LOGE("ERR(%s) ESD status(%d)", __func__, status);
+ ALOGE("ERR(%s) ESD status(%d)", __func__, status);
return status;
}
}
@@ -169,12 +169,12 @@ int SecCamera::previewPoll(bool preview)
}
if (ret < 0) {
- LOGE("ERR(%s):poll error\n", __func__);
+ ALOGE("ERR(%s):poll error\n", __func__);
return ret;
}
if (ret == 0) {
- LOGE("ERR(%s):No data in 1 secs.. Camera Device Reset \n", __func__);
+ ALOGE("ERR(%s):No data in 1 secs.. Camera Device Reset \n", __func__);
return ret;
}
@@ -189,12 +189,12 @@ static int fimc_v4l2_querycap(int fp)
ret = ioctl(fp, VIDIOC_QUERYCAP, &cap);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_QUERYCAP failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_QUERYCAP failed\n", __func__);
return -1;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- LOGE("ERR(%s):no capture devices\n", __func__);
+ ALOGE("ERR(%s):no capture devices\n", __func__);
return -1;
}
@@ -207,10 +207,10 @@ static const __u8* fimc_v4l2_enuminput(int fp, int index)
input.index = index;
if (ioctl(fp, VIDIOC_ENUMINPUT, &input) != 0) {
- LOGE("ERR(%s):No matching index found\n", __func__);
+ ALOGE("ERR(%s):No matching index found\n", __func__);
return NULL;
}
- LOGI("Name of input channel[%d] is %s\n", input.index, input.name);
+ ALOGI("Name of input channel[%d] is %s\n", input.index, input.name);
return input.name;
}
@@ -225,7 +225,7 @@ static int fimc_v4l2_s_input(int fp, int index)
ret = ioctl(fp, VIDIOC_S_INPUT, &input);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_S_INPUT failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_S_INPUT failed\n", __func__);
return ret;
}
@@ -255,7 +255,7 @@ static int fimc_v4l2_s_fmt(int fp, int width, int height, unsigned int fmt, int
/* Set up for capture */
ret = ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__);
return -1;
}
@@ -283,12 +283,12 @@ static int fimc_v4l2_s_fmt_cap(int fp, int width, int height, unsigned int fmt)
v4l2_fmt.fmt.pix = pixfmt;
- //LOGE("ori_w %d, ori_h %d, w %d, h %d\n", width, height, v4l2_fmt.fmt.pix.width, v4l2_fmt.fmt.pix.height);
+ //ALOGE("ori_w %d, ori_h %d, w %d, h %d\n", width, height, v4l2_fmt.fmt.pix.width, v4l2_fmt.fmt.pix.height);
/* Set up for capture */
ret = ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__);
return ret;
}
@@ -305,7 +305,7 @@ static int fimc_v4l2_enum_fmt(int fp, unsigned int fmt)
while (ioctl(fp, VIDIOC_ENUM_FMT, &fmtdesc) == 0) {
if (fmtdesc.pixelformat == fmt) {
- LOGV("passed fmt = %#x found pixel format[%d]: %s\n", fmt, fmtdesc.index, fmtdesc.description);
+ ALOGV("passed fmt = %#x found pixel format[%d]: %s\n", fmt, fmtdesc.index, fmtdesc.description);
found = 1;
break;
}
@@ -314,7 +314,7 @@ static int fimc_v4l2_enum_fmt(int fp, unsigned int fmt)
}
if (!found) {
- LOGE("unsupported pixel format\n");
+ ALOGE("unsupported pixel format\n");
return -1;
}
@@ -332,7 +332,7 @@ static int fimc_v4l2_reqbufs(int fp, enum v4l2_buf_type type, int nr_bufs)
ret = ioctl(fp, VIDIOC_REQBUFS, &req);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_REQBUFS failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_REQBUFS failed\n", __func__);
return -1;
}
@@ -344,7 +344,7 @@ static int fimc_v4l2_querybuf(int fp, struct fimc_buffer *buffer, enum v4l2_buf_
struct v4l2_buffer v4l2_buf;
int ret;
- LOGI("%s :", __func__);
+ ALOGI("%s :", __func__);
v4l2_buf.type = type;
v4l2_buf.memory = V4L2_MEMORY_MMAP;
@@ -352,7 +352,7 @@ static int fimc_v4l2_querybuf(int fp, struct fimc_buffer *buffer, enum v4l2_buf_
ret = ioctl(fp , VIDIOC_QUERYBUF, &v4l2_buf);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_QUERYBUF failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_QUERYBUF failed\n", __func__);
return -1;
}
@@ -360,11 +360,11 @@ static int fimc_v4l2_querybuf(int fp, struct fimc_buffer *buffer, enum v4l2_buf_
if ((buffer->start = (char *)mmap(0, v4l2_buf.length,
PROT_READ | PROT_WRITE, MAP_SHARED,
fp, v4l2_buf.m.offset)) < 0) {
- LOGE("%s %d] mmap() failed\n",__func__, __LINE__);
+ ALOGE("%s %d] mmap() failed\n",__func__, __LINE__);
return -1;
}
- LOGI("%s: buffer->start = %p v4l2_buf.length = %d",
+ ALOGI("%s: buffer->start = %p v4l2_buf.length = %d",
__func__, buffer->start, v4l2_buf.length);
return 0;
@@ -377,7 +377,7 @@ static int fimc_v4l2_streamon(int fp)
ret = ioctl(fp, VIDIOC_STREAMON, &type);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_STREAMON failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_STREAMON failed\n", __func__);
return ret;
}
@@ -389,10 +389,10 @@ static int fimc_v4l2_streamoff(int fp)
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
int ret;
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
ret = ioctl(fp, VIDIOC_STREAMOFF, &type);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_STREAMOFF failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_STREAMOFF failed\n", __func__);
return ret;
}
@@ -410,7 +410,7 @@ static int fimc_v4l2_qbuf(int fp, int index)
ret = ioctl(fp, VIDIOC_QBUF, &v4l2_buf);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_QBUF failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_QBUF failed\n", __func__);
return ret;
}
@@ -427,7 +427,7 @@ static int fimc_v4l2_dqbuf(int fp)
ret = ioctl(fp, VIDIOC_DQBUF, &v4l2_buf);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame\n", __func__);
return ret;
}
@@ -443,7 +443,7 @@ static int fimc_v4l2_g_ctrl(int fp, unsigned int id)
ret = ioctl(fp, VIDIOC_G_CTRL, &ctrl);
if (ret < 0) {
- LOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d\n",
+ ALOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d\n",
__func__, id, id-V4L2_CID_PRIVATE_BASE, ret);
return ret;
}
@@ -461,7 +461,7 @@ static int fimc_v4l2_s_ctrl(int fp, unsigned int id, unsigned int value)
ret = ioctl(fp, VIDIOC_S_CTRL, &ctrl);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d\n",
+ ALOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d\n",
__func__, id, id-V4L2_CID_PRIVATE_BASE, value, ret);
return ret;
@@ -477,7 +477,7 @@ static int fimc_v4l2_s_ext_ctrl(int fp, unsigned int id, void *value)
int ret;
ctrl.id = id;
- ctrl.reserved = value;
+ //ctrl.reserved = value; TODO: FIXME
ctrls.ctrl_class = V4L2_CTRL_CLASS_CAMERA;
ctrls.count = 1;
@@ -485,7 +485,7 @@ static int fimc_v4l2_s_ext_ctrl(int fp, unsigned int id, void *value)
ret = ioctl(fp, VIDIOC_S_EXT_CTRLS, &ctrls);
if (ret < 0)
- LOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed\n", __func__);
return ret;
}
@@ -498,11 +498,11 @@ static int fimc_v4l2_g_parm(int fp, struct v4l2_streamparm *streamparm)
ret = ioctl(fp, VIDIOC_G_PARM, streamparm);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_G_PARM failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_G_PARM failed\n", __func__);
return -1;
}
- LOGV("%s : timeperframe: numerator %d, denominator %d\n", __func__,
+ ALOGV("%s : timeperframe: numerator %d, denominator %d\n", __func__,
streamparm->parm.capture.timeperframe.numerator,
streamparm->parm.capture.timeperframe.denominator);
@@ -517,7 +517,7 @@ static int fimc_v4l2_s_parm(int fp, struct v4l2_streamparm *streamparm)
ret = ioctl(fp, VIDIOC_S_PARM, streamparm);
if (ret < 0) {
- LOGE("ERR(%s):VIDIOC_S_PARM failed\n", __func__);
+ ALOGE("ERR(%s):VIDIOC_S_PARM failed\n", __func__);
return ret;
}
@@ -593,17 +593,17 @@ SecCamera::SecCamera() :
memset(&m_capture_buf, 0, sizeof(m_capture_buf));
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
}
SecCamera::~SecCamera()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
}
int SecCamera::initCamera(int index)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int ret = 0;
if (!m_flag_init) {
@@ -615,12 +615,12 @@ int SecCamera::initCamera(int index)
m_cam_fd = open(CAMERA_DEV_NAME, O_RDWR);
if (m_cam_fd < 0) {
- LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME, strerror(errno));
+ ALOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME, strerror(errno));
return -1;
}
- LOGV("%s: open(%s) --> m_cam_fd %d", __FUNCTION__, CAMERA_DEV_NAME, m_cam_fd);
+ ALOGV("%s: open(%s) --> m_cam_fd %d", __FUNCTION__, CAMERA_DEV_NAME, m_cam_fd);
- LOGE("initCamera: m_cam_fd(%d), m_jpeg_fd(%d)", m_cam_fd, m_jpeg_fd);
+ ALOGE("initCamera: m_cam_fd(%d), m_jpeg_fd(%d)", m_cam_fd, m_jpeg_fd);
ret = fimc_v4l2_querycap(m_cam_fd);
CHECK(ret);
@@ -630,13 +630,13 @@ int SecCamera::initCamera(int index)
CHECK(ret);
m_cam_fd2 = open(CAMERA_DEV_NAME2, O_RDWR);
- LOGV("%s: open(%s) --> m_cam_fd2 = %d", __FUNCTION__, CAMERA_DEV_NAME2, m_cam_fd2);
+ ALOGV("%s: open(%s) --> m_cam_fd2 = %d", __FUNCTION__, CAMERA_DEV_NAME2, m_cam_fd2);
if (m_cam_fd2 < 0) {
- LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME2, strerror(errno));
+ ALOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME2, strerror(errno));
return -1;
}
- LOGE("initCamera: m_cam_fd2(%d)", m_cam_fd2);
+ ALOGE("initCamera: m_cam_fd2(%d)", m_cam_fd2);
ret = fimc_v4l2_querycap(m_cam_fd2);
CHECK(ret);
@@ -666,21 +666,21 @@ int SecCamera::initCamera(int index)
setExifFixedAttribute();
m_flag_init = 1;
- LOGI("%s : initialized", __FUNCTION__);
+ ALOGI("%s : initialized", __FUNCTION__);
}
return 0;
}
void SecCamera::resetCamera()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
DeinitCamera();
initCamera(m_camera_id);
}
void SecCamera::DeinitCamera()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_flag_init) {
@@ -689,13 +689,13 @@ void SecCamera::DeinitCamera()
/* close m_cam_fd after stopRecord() because stopRecord()
* uses m_cam_fd to change frame rate
*/
- LOGI("DeinitCamera: m_cam_fd(%d)", m_cam_fd);
+ ALOGI("DeinitCamera: m_cam_fd(%d)", m_cam_fd);
if (m_cam_fd > -1) {
close(m_cam_fd);
m_cam_fd = -1;
}
- LOGI("DeinitCamera: m_cam_fd2(%d)", m_cam_fd2);
+ ALOGI("DeinitCamera: m_cam_fd2(%d)", m_cam_fd2);
if (m_cam_fd2 > -1) {
close(m_cam_fd2);
m_cam_fd2 = -1;
@@ -703,7 +703,7 @@ void SecCamera::DeinitCamera()
m_flag_init = 0;
}
- else LOGI("%s : already deinitialized", __FUNCTION__);
+ else ALOGI("%s : already deinitialized", __FUNCTION__);
}
@@ -720,16 +720,16 @@ int SecCamera::startPreview(void)
v4l2_streamparm streamparm;
struct sec_cam_parm *parms;
parms = (struct sec_cam_parm*)&streamparm.parm.raw_data;
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
// aleady started
if (m_flag_camera_start > 0) {
- LOGE("ERR(%s):Preview was already started\n", __func__);
+ ALOGE("ERR(%s):Preview was already started\n", __func__);
return 0;
}
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
@@ -750,7 +750,7 @@ int SecCamera::startPreview(void)
ret = fimc_v4l2_reqbufs(m_cam_fd, V4L2_BUF_TYPE_VIDEO_CAPTURE, MAX_BUFFERS);
CHECK(ret);
- LOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d\n",
+ ALOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d\n",
__func__, m_preview_width, m_preview_height, m_angle);
ret = fimc_v4l2_s_ctrl(m_cam_fd,
@@ -834,7 +834,7 @@ int SecCamera::startPreview(void)
if (m_camera_id == CAMERA_ID_FRONT) {
/* Blur setting */
- LOGV("m_blur_level = %d", m_blur_level);
+ ALOGV("m_blur_level = %d", m_blur_level);
ret = fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_VGA_BLUR,
m_blur_level);
CHECK(ret);
@@ -846,7 +846,7 @@ int SecCamera::startPreview(void)
ret = fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_RETURN_FOCUS, 0);
CHECK(ret);
- LOGV("%s: got the first frame of the preview\n", __func__);
+ ALOGV("%s: got the first frame of the preview\n", __func__);
return 0;
}
@@ -855,10 +855,10 @@ int SecCamera::stopPreview(void)
{
int ret;
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_flag_camera_start == 0) {
- LOGW("%s: doing nothing because m_flag_camera_start is zero", __func__);
+ ALOGW("%s: doing nothing because m_flag_camera_start is zero", __func__);
return 0;
}
@@ -866,7 +866,7 @@ int SecCamera::stopPreview(void)
setFlashMode(FLASH_MODE_OFF);
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
@@ -883,16 +883,16 @@ int SecCamera::startRecord(void)
{
int ret, i;
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
// aleady started
if (m_flag_record_start > 0) {
- LOGE("ERR(%s):Preview was already started\n", __func__);
+ ALOGE("ERR(%s):Preview was already started\n", __func__);
return 0;
}
if (m_cam_fd2 <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
@@ -900,7 +900,7 @@ int SecCamera::startRecord(void)
ret = fimc_v4l2_enum_fmt(m_cam_fd2, V4L2_PIX_FMT_NV12T);
CHECK(ret);
- LOGI("%s: m_recording_width = %d, m_recording_height = %d\n",
+ ALOGI("%s: m_recording_width = %d, m_recording_height = %d\n",
__func__, m_recording_width, m_recording_height);
if (m_camera_id == CAMERA_ID_BACK) {
@@ -956,15 +956,15 @@ int SecCamera::stopRecord(void)
{
int ret;
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_flag_record_start == 0) {
- LOGW("%s: doing nothing because m_flag_record_start is zero", __func__);
+ ALOGW("%s: doing nothing because m_flag_record_start is zero", __func__);
return 0;
}
if (m_cam_fd2 <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
@@ -1048,7 +1048,7 @@ int SecCamera::getPreview()
int ret;
if (m_flag_camera_start == 0 || previewPoll(true) == 0) {
- LOGE("ERR(%s):Start Camera Device Reset \n", __func__);
+ ALOGE("ERR(%s):Start Camera Device Reset \n", __func__);
/* GAUDI Project([arun.c@samsung.com]) 2010.05.20. [Implemented ESD code] */
/*
* When there is no data for more than 1 second from the camera we inform
@@ -1066,14 +1066,14 @@ int SecCamera::getPreview()
CHECK(ret);
ret = startPreview();
if (ret < 0) {
- LOGE("ERR(%s): startPreview() return %d\n", __func__, ret);
+ ALOGE("ERR(%s): startPreview() return %d\n", __func__, ret);
return 0;
}
}
index = fimc_v4l2_dqbuf(m_cam_fd);
if (!(0 <= index && index < MAX_BUFFERS)) {
- LOGE("ERR(%s):wrong index = %d\n", __func__, index);
+ ALOGE("ERR(%s):wrong index = %d\n", __func__, index);
return -1;
}
@@ -1086,7 +1086,7 @@ int SecCamera::getPreview()
int SecCamera::getRecordFrame()
{
if (m_flag_record_start == 0) {
- LOGE("%s: m_flag_record_start is 0", __func__);
+ ALOGE("%s: m_flag_record_start is 0", __func__);
return -1;
}
@@ -1103,7 +1103,7 @@ int SecCamera::releaseRecordFrame(int index)
* cases where fimc could crash if we called qbuf and it
* wasn't expecting it.
*/
- LOGI("%s: recording not in progress, ignoring", __func__);
+ ALOGI("%s: recording not in progress, ignoring", __func__);
return 0;
}
@@ -1112,27 +1112,27 @@ int SecCamera::releaseRecordFrame(int index)
int SecCamera::setPreviewSize(int width, int height, int pixel_format)
{
- LOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format);
+ ALOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format);
int v4lpixelformat = pixel_format;
-#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0
+#if defined(ALOG_NDEBUG) && ALOG_NDEBUG == 0
if (v4lpixelformat == V4L2_PIX_FMT_YUV420)
- LOGV("PreviewFormat:V4L2_PIX_FMT_YUV420");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV420");
else if (v4lpixelformat == V4L2_PIX_FMT_NV12)
- LOGV("PreviewFormat:V4L2_PIX_FMT_NV12");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12");
else if (v4lpixelformat == V4L2_PIX_FMT_NV12T)
- LOGV("PreviewFormat:V4L2_PIX_FMT_NV12T");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12T");
else if (v4lpixelformat == V4L2_PIX_FMT_NV21)
- LOGV("PreviewFormat:V4L2_PIX_FMT_NV21");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_NV21");
else if (v4lpixelformat == V4L2_PIX_FMT_YUV422P)
- LOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P");
else if (v4lpixelformat == V4L2_PIX_FMT_YUYV)
- LOGV("PreviewFormat:V4L2_PIX_FMT_YUYV");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_YUYV");
else if (v4lpixelformat == V4L2_PIX_FMT_RGB565)
- LOGV("PreviewFormat:V4L2_PIX_FMT_RGB565");
+ ALOGV("PreviewFormat:V4L2_PIX_FMT_RGB565");
else
- LOGV("PreviewFormat:UnknownFormat");
+ ALOGV("PreviewFormat:UnknownFormat");
#endif
m_preview_width = width;
m_preview_height = height;
@@ -1172,7 +1172,7 @@ int SecCamera::getPreviewPixelFormat(void)
*/
int SecCamera::setSnapshotCmd(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int ret = 0;
@@ -1180,13 +1180,13 @@ int SecCamera::setSnapshotCmd(void)
LOG_TIME_DEFINE(1)
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return 0;
}
if (m_flag_camera_start > 0) {
LOG_TIME_START(0)
- LOGW("WARN(%s):Camera was in preview, should have been stopped\n", __func__);
+ ALOGW("WARN(%s):Camera was in preview, should have been stopped\n", __func__);
stopPreview();
LOG_TIME_END(0)
}
@@ -1269,10 +1269,10 @@ int SecCamera::endSnapshot(void)
{
int ret;
- LOGI("%s :", __func__);
+ ALOGI("%s :", __func__);
if (m_capture_buf.start) {
munmap(m_capture_buf.start, m_capture_buf.length);
- LOGI("munmap():virt. addr %p size = %d\n",
+ ALOGI("munmap():virt. addr %p size = %d\n",
m_capture_buf.start, m_capture_buf.length);
m_capture_buf.start = NULL;
m_capture_buf.length = 0;
@@ -1285,7 +1285,7 @@ int SecCamera::endSnapshot(void)
*/
unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int index, ret = 0;
unsigned char *addr;
@@ -1297,7 +1297,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr)
CHECK_PTR(ret);
index = fimc_v4l2_dqbuf(m_cam_fd);
if (index != 0) {
- LOGE("ERR(%s):wrong index = %d\n", __func__, index);
+ ALOGE("ERR(%s):wrong index = %d\n", __func__, index);
return NULL;
}
@@ -1311,7 +1311,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr)
ret = fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_STREAM_PAUSE, 0);
CHECK_PTR(ret);
- LOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d\n\n",
+ ALOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d\n\n",
index, m_snapshot_width, m_snapshot_height, *jpeg_size);
addr = (unsigned char*)(m_capture_buf.start) + main_offset;
@@ -1329,7 +1329,7 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc)
{
JpegEncoder jpgEnc;
- LOGV("%s : m_jpeg_thumbnail_width = %d, height = %d",
+ ALOGV("%s : m_jpeg_thumbnail_width = %d, height = %d",
__func__, m_jpeg_thumbnail_width, m_jpeg_thumbnail_height);
if ((m_jpeg_thumbnail_width > 0) && (m_jpeg_thumbnail_height > 0)) {
int inFormat = JPG_MODESEL_YCBCR;
@@ -1374,10 +1374,10 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc)
jpgEnc.encode(&thumbSize, NULL);
- LOGV("%s : enableThumb set to true", __func__);
+ ALOGV("%s : enableThumb set to true", __func__);
mExifInfo.enableThumb = true;
} else {
- LOGV("%s : enableThumb set to false", __func__);
+ ALOGV("%s : enableThumb set to false", __func__);
mExifInfo.enableThumb = false;
}
@@ -1385,7 +1385,7 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc)
setExifChangedAttribute();
- LOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d\n",
+ ALOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d\n",
__func__, mExifInfo.width, mExifInfo.height);
jpgEnc.makeExif(pExifDst, &mExifInfo, &exifSize, true);
@@ -1404,7 +1404,7 @@ void SecCamera::getPostViewConfig(int *width, int *height, int *size)
*height = BACK_CAMERA_POSTVIEW_HEIGHT;
*size = BACK_CAMERA_POSTVIEW_WIDTH * BACK_CAMERA_POSTVIEW_HEIGHT * BACK_CAMERA_POSTVIEW_BPP / 8;
}
- LOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
+ ALOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
m_preview_width, *width, *height, *size);
}
@@ -1431,7 +1431,7 @@ int SecCamera::getPostViewOffset(void)
int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_buf,
unsigned int *output_size)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int index;
//unsigned int addr;
@@ -1448,13 +1448,13 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
//fimc_v4l2_streamoff(m_cam_fd); [zzangdol] remove - it is separate in HWInterface with camera_id
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
if (m_flag_camera_start > 0) {
LOG_TIME_START(0)
- LOGW("WARN(%s):Camera was in preview, should have been stopped\n", __func__);
+ ALOGW("WARN(%s):Camera was in preview, should have been stopped\n", __func__);
stopPreview();
LOG_TIME_END(0)
}
@@ -1463,25 +1463,25 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
m_events_c.fd = m_cam_fd;
m_events_c.events = POLLIN | POLLERR;
-#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0
+#if defined(ALOG_NDEBUG) && ALOG_NDEBUG == 0
if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_NV21");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV21");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY");
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565)
- LOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565");
+ ALOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565");
else
- LOGV("SnapshotFormat:UnknownFormat");
+ ALOGV("SnapshotFormat:UnknownFormat");
#endif
LOG_TIME_START(1) // prepare
@@ -1508,12 +1508,12 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
fimc_poll(&m_events_c);
index = fimc_v4l2_dqbuf(m_cam_fd);
fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_STREAM_PAUSE, 0);
- LOGV("\nsnapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d\n\n",
+ ALOGV("\nsnapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d\n\n",
index, m_snapshot_width, m_snapshot_height);
LOG_TIME_END(2)
- LOGI("%s : calling memcpy from m_capture_buf", __func__);
+ ALOGI("%s : calling memcpy from m_capture_buf", __func__);
memcpy(yuv_buf, (unsigned char*)m_capture_buf.start, m_snapshot_width * m_snapshot_height * 2);
LOG_TIME_START(5) // post
fimc_v4l2_streamoff(m_cam_fd);
@@ -1543,10 +1543,10 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
}
if (jpgEnc.setConfig(JPEG_SET_ENCODE_IN_FORMAT, inFormat) != JPG_SUCCESS)
- LOGE("[JPEG_SET_ENCODE_IN_FORMAT] Error\n");
+ ALOGE("[JPEG_SET_ENCODE_IN_FORMAT] Error\n");
if (jpgEnc.setConfig(JPEG_SET_SAMPING_MODE, outFormat) != JPG_SUCCESS)
- LOGE("[JPEG_SET_SAMPING_MODE] Error\n");
+ ALOGE("[JPEG_SET_SAMPING_MODE] Error\n");
image_quality_type_t jpegQuality;
if (m_jpeg_quality >= 90)
@@ -1559,18 +1559,18 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
jpegQuality = JPG_QUALITY_LEVEL_4;
if (jpgEnc.setConfig(JPEG_SET_ENCODE_QUALITY, jpegQuality) != JPG_SUCCESS)
- LOGE("[JPEG_SET_ENCODE_QUALITY] Error\n");
+ ALOGE("[JPEG_SET_ENCODE_QUALITY] Error\n");
if (jpgEnc.setConfig(JPEG_SET_ENCODE_WIDTH, m_snapshot_width) != JPG_SUCCESS)
- LOGE("[JPEG_SET_ENCODE_WIDTH] Error\n");
+ ALOGE("[JPEG_SET_ENCODE_WIDTH] Error\n");
if (jpgEnc.setConfig(JPEG_SET_ENCODE_HEIGHT, m_snapshot_height) != JPG_SUCCESS)
- LOGE("[JPEG_SET_ENCODE_HEIGHT] Error\n");
+ ALOGE("[JPEG_SET_ENCODE_HEIGHT] Error\n");
unsigned int snapshot_size = m_snapshot_width * m_snapshot_height * 2;
unsigned char *pInBuf = (unsigned char *)jpgEnc.getInBuf(snapshot_size);
if (pInBuf == NULL) {
- LOGE("JPEG input buffer is NULL!!\n");
+ ALOGE("JPEG input buffer is NULL!!\n");
return -1;
}
memcpy(pInBuf, yuv_buf, snapshot_size);
@@ -1582,7 +1582,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
unsigned char *pOutBuf = (unsigned char *)jpgEnc.getOutBuf(&outbuf_size);
if (pOutBuf == NULL) {
- LOGE("JPEG output buffer is NULL!!\n");
+ ALOGE("JPEG output buffer is NULL!!\n");
return -1;
}
@@ -1594,7 +1594,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu
int SecCamera::setSnapshotSize(int width, int height)
{
- LOGV("%s(width(%d), height(%d))", __func__, width, height);
+ ALOGV("%s(width(%d), height(%d))", __func__, width, height);
m_snapshot_width = width;
m_snapshot_height = height;
@@ -1649,25 +1649,25 @@ int SecCamera::setSnapshotPixelFormat(int pixel_format)
m_snapshot_v4lformat = v4lpixelformat;
}
-#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0
+#if defined(ALOG_NDEBUG) && ALOG_NDEBUG == 0
if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420)
- LOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__);
+ ALOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__);
else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565)
- LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__);
+ ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__);
else
- LOGD("SnapshotFormat:UnknownFormat");
+ ALOGD("SnapshotFormat:UnknownFormat");
#endif
return 0;
}
@@ -1689,15 +1689,15 @@ int SecCamera::getCameraId(void)
int SecCamera::setAutofocus(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_ON) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__);
return -1;
}
@@ -1716,17 +1716,17 @@ int SecCamera::getAutoFocusResult(void)
}
if ((count >= FIRST_AF_SEARCH_COUNT) || (ret != AF_SUCCESS)) {
- LOGV("%s : 1st AF timed out, failed, or was canceled", __func__);
+ ALOGV("%s : 1st AF timed out, failed, or was canceled", __func__);
af_result = 0;
goto finish_auto_focus;
}
af_result = 1;
- LOGV("%s : AF was successful, returning %d", __func__, af_result);
+ ALOGV("%s : AF was successful, returning %d", __func__, af_result);
finish_auto_focus:
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FINISH_AUTO_FOCUS, 0) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FINISH_AUTO_FOCUS", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FINISH_AUTO_FOCUS", __func__);
return -1;
}
return af_result;
@@ -1734,15 +1734,15 @@ finish_auto_focus:
int SecCamera::cancelAutofocus(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_OFF) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__);
return -1;
}
@@ -1753,13 +1753,13 @@ int SecCamera::cancelAutofocus(void)
int SecCamera::zoomIn(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
return 0;
}
int SecCamera::zoomOut(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
return 0;
}
@@ -1767,7 +1767,7 @@ int SecCamera::zoomOut(void)
int SecCamera::SetRotate(int angle)
{
- LOGE("%s(angle(%d))", __func__, angle);
+ ALOGE("%s(angle(%d))", __func__, angle);
if (m_angle != angle) {
switch (angle) {
@@ -1793,13 +1793,13 @@ int SecCamera::SetRotate(int angle)
break;
default:
- LOGE("ERR(%s):Invalid angle(%d)", __func__, angle);
+ ALOGE("ERR(%s):Invalid angle(%d)", __func__, angle);
return -1;
}
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_ROTATION, angle) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__);
return -1;
}
}
@@ -1810,22 +1810,22 @@ int SecCamera::SetRotate(int angle)
int SecCamera::getRotate(void)
{
- LOGV("%s : angle(%d)", __func__, m_angle);
+ ALOGV("%s : angle(%d)", __func__, m_angle);
return m_angle;
}
int SecCamera::setFrameRate(int frame_rate)
{
- LOGV("%s(FrameRate(%d))", __func__, frame_rate);
+ ALOGV("%s(FrameRate(%d))", __func__, frame_rate);
if (frame_rate < FRAME_RATE_AUTO || FRAME_RATE_MAX < frame_rate )
- LOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate);
+ ALOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate);
if (m_params->capture.timeperframe.denominator != (unsigned)frame_rate) {
m_params->capture.timeperframe.denominator = frame_rate;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FRAME_RATE, frame_rate) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__);
return -1;
}
}
@@ -1838,15 +1838,15 @@ int SecCamera::setFrameRate(int frame_rate)
int SecCamera::setVerticalMirror(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_VFLIP, 0) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__);
return -1;
}
@@ -1855,15 +1855,15 @@ int SecCamera::setVerticalMirror(void)
int SecCamera::setHorizontalMirror(void)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (m_cam_fd <= 0) {
- LOGE("ERR(%s):Camera was closed\n", __func__);
+ ALOGE("ERR(%s):Camera was closed\n", __func__);
return -1;
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_HFLIP, 0) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__);
return -1;
}
@@ -1874,10 +1874,10 @@ int SecCamera::setHorizontalMirror(void)
int SecCamera::setWhiteBalance(int white_balance)
{
- LOGV("%s(white_balance(%d))", __func__, white_balance);
+ ALOGV("%s(white_balance(%d))", __func__, white_balance);
if (white_balance <= WHITE_BALANCE_BASE || WHITE_BALANCE_MAX <= white_balance) {
- LOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance);
+ ALOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance);
return -1;
}
@@ -1885,7 +1885,7 @@ int SecCamera::setWhiteBalance(int white_balance)
m_params->white_balance = white_balance;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_WHITE_BALANCE, white_balance) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__);
return -1;
}
}
@@ -1896,7 +1896,7 @@ int SecCamera::setWhiteBalance(int white_balance)
int SecCamera::getWhiteBalance(void)
{
- LOGV("%s : white_balance(%d)", __func__, m_params->white_balance);
+ ALOGV("%s : white_balance(%d)", __func__, m_params->white_balance);
return m_params->white_balance;
}
@@ -1904,12 +1904,12 @@ int SecCamera::getWhiteBalance(void)
int SecCamera::setBrightness(int brightness)
{
- LOGV("%s(brightness(%d))", __func__, brightness);
+ ALOGV("%s(brightness(%d))", __func__, brightness);
brightness += EV_DEFAULT;
if (brightness < EV_MINUS_4 || EV_PLUS_4 < brightness) {
- LOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness);
+ ALOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness);
return -1;
}
@@ -1917,7 +1917,7 @@ int SecCamera::setBrightness(int brightness)
m_params->brightness = brightness;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BRIGHTNESS, brightness) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__);
return -1;
}
}
@@ -1928,7 +1928,7 @@ int SecCamera::setBrightness(int brightness)
int SecCamera::getBrightness(void)
{
- LOGV("%s : brightness(%d)", __func__, m_params->brightness);
+ ALOGV("%s : brightness(%d)", __func__, m_params->brightness);
return m_params->brightness;
}
@@ -1936,10 +1936,10 @@ int SecCamera::getBrightness(void)
int SecCamera::setImageEffect(int image_effect)
{
- LOGV("%s(image_effect(%d))", __func__, image_effect);
+ ALOGV("%s(image_effect(%d))", __func__, image_effect);
if (image_effect <= IMAGE_EFFECT_BASE || IMAGE_EFFECT_MAX <= image_effect) {
- LOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect);
+ ALOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect);
return -1;
}
@@ -1947,7 +1947,7 @@ int SecCamera::setImageEffect(int image_effect)
m_params->effects = image_effect;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_EFFECT, image_effect) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__);
return -1;
}
}
@@ -1958,17 +1958,17 @@ int SecCamera::setImageEffect(int image_effect)
int SecCamera::getImageEffect(void)
{
- LOGV("%s : image_effect(%d)", __func__, m_params->effects);
+ ALOGV("%s : image_effect(%d)", __func__, m_params->effects);
return m_params->effects;
}
// ======================================================================
int SecCamera::setAntiBanding(int anti_banding)
{
- LOGV("%s(anti_banding(%d))", __func__, anti_banding);
+ ALOGV("%s(anti_banding(%d))", __func__, anti_banding);
if (anti_banding < ANTI_BANDING_AUTO || ANTI_BANDING_OFF < anti_banding) {
- LOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding);
+ ALOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding);
return -1;
}
@@ -1976,7 +1976,7 @@ int SecCamera::setAntiBanding(int anti_banding)
m_anti_banding = anti_banding;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ANTI_BANDING, anti_banding) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__);
return -1;
}
}
@@ -1988,10 +1988,10 @@ int SecCamera::setAntiBanding(int anti_banding)
//======================================================================
int SecCamera::setSceneMode(int scene_mode)
{
- LOGV("%s(scene_mode(%d))", __func__, scene_mode);
+ ALOGV("%s(scene_mode(%d))", __func__, scene_mode);
if (scene_mode <= SCENE_MODE_BASE || SCENE_MODE_MAX <= scene_mode) {
- LOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode);
+ ALOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode);
return -1;
}
@@ -1999,7 +1999,7 @@ int SecCamera::setSceneMode(int scene_mode)
m_params->scene_mode = scene_mode;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SCENE_MODE, scene_mode) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__);
return -1;
}
}
@@ -2017,10 +2017,10 @@ int SecCamera::getSceneMode(void)
int SecCamera::setFlashMode(int flash_mode)
{
- LOGV("%s(flash_mode(%d))", __func__, flash_mode);
+ ALOGV("%s(flash_mode(%d))", __func__, flash_mode);
if (flash_mode <= FLASH_MODE_BASE || FLASH_MODE_MAX <= flash_mode) {
- LOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode);
+ ALOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode);
return -1;
}
@@ -2028,7 +2028,7 @@ int SecCamera::setFlashMode(int flash_mode)
m_params->flash_mode = flash_mode;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FLASH_MODE, flash_mode) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__);
return -1;
}
}
@@ -2046,9 +2046,9 @@ int SecCamera::getFlashMode(void)
int SecCamera::setISO(int iso_value)
{
- LOGV("%s(iso_value(%d))", __func__, iso_value);
+ ALOGV("%s(iso_value(%d))", __func__, iso_value);
if (iso_value < ISO_AUTO || ISO_MAX <= iso_value) {
- LOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value);
+ ALOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value);
return -1;
}
@@ -2056,7 +2056,7 @@ int SecCamera::setISO(int iso_value)
m_params->iso = iso_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ISO, iso_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__);
return -1;
}
}
@@ -2074,10 +2074,10 @@ int SecCamera::getISO(void)
int SecCamera::setContrast(int contrast_value)
{
- LOGV("%s(contrast_value(%d))", __func__, contrast_value);
+ ALOGV("%s(contrast_value(%d))", __func__, contrast_value);
if (contrast_value < CONTRAST_MINUS_2 || CONTRAST_MAX <= contrast_value) {
- LOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value);
+ ALOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value);
return -1;
}
@@ -2085,7 +2085,7 @@ int SecCamera::setContrast(int contrast_value)
m_params->contrast = contrast_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_CONTRAST, contrast_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__);
return -1;
}
}
@@ -2103,10 +2103,10 @@ int SecCamera::getContrast(void)
int SecCamera::setSaturation(int saturation_value)
{
- LOGV("%s(saturation_value(%d))", __func__, saturation_value);
+ ALOGV("%s(saturation_value(%d))", __func__, saturation_value);
if (saturation_value <SATURATION_MINUS_2 || SATURATION_MAX<= saturation_value) {
- LOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value);
+ ALOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value);
return -1;
}
@@ -2114,7 +2114,7 @@ int SecCamera::setSaturation(int saturation_value)
m_params->saturation = saturation_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SATURATION, saturation_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__);
return -1;
}
}
@@ -2132,10 +2132,10 @@ int SecCamera::getSaturation(void)
int SecCamera::setSharpness(int sharpness_value)
{
- LOGV("%s(sharpness_value(%d))", __func__, sharpness_value);
+ ALOGV("%s(sharpness_value(%d))", __func__, sharpness_value);
if (sharpness_value < SHARPNESS_MINUS_2 || SHARPNESS_MAX <= sharpness_value) {
- LOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value);
+ ALOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value);
return -1;
}
@@ -2143,7 +2143,7 @@ int SecCamera::setSharpness(int sharpness_value)
m_params->sharpness = sharpness_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SHARPNESS, sharpness_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__);
return -1;
}
}
@@ -2161,10 +2161,10 @@ int SecCamera::getSharpness(void)
int SecCamera::setWDR(int wdr_value)
{
- LOGV("%s(wdr_value(%d))", __func__, wdr_value);
+ ALOGV("%s(wdr_value(%d))", __func__, wdr_value);
if (wdr_value < WDR_OFF || WDR_MAX <= wdr_value) {
- LOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value);
+ ALOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value);
return -1;
}
@@ -2172,7 +2172,7 @@ int SecCamera::setWDR(int wdr_value)
m_wdr = wdr_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_WDR, wdr_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__);
return -1;
}
}
@@ -2190,10 +2190,10 @@ int SecCamera::getWDR(void)
int SecCamera::setAntiShake(int anti_shake)
{
- LOGV("%s(anti_shake(%d))", __func__, anti_shake);
+ ALOGV("%s(anti_shake(%d))", __func__, anti_shake);
if (anti_shake < ANTI_SHAKE_OFF || ANTI_SHAKE_MAX <= anti_shake) {
- LOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake);
+ ALOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake);
return -1;
}
@@ -2201,7 +2201,7 @@ int SecCamera::setAntiShake(int anti_shake)
m_anti_shake = anti_shake;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ANTI_SHAKE, anti_shake) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__);
return -1;
}
}
@@ -2220,10 +2220,10 @@ int SecCamera::getAntiShake(void)
int SecCamera::setMetering(int metering_value)
{
- LOGV("%s(metering (%d))", __func__, metering_value);
+ ALOGV("%s(metering (%d))", __func__, metering_value);
if (metering_value <= METERING_BASE || METERING_MAX <= metering_value) {
- LOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value);
+ ALOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value);
return -1;
}
@@ -2231,7 +2231,7 @@ int SecCamera::setMetering(int metering_value)
m_params->metering = metering_value;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_METERING, metering_value) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__);
return -1;
}
}
@@ -2249,10 +2249,10 @@ int SecCamera::getMetering(void)
int SecCamera::setJpegQuality(int jpeg_quality)
{
- LOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality);
+ ALOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality);
if (jpeg_quality < JPEG_QUALITY_ECONOMY || JPEG_QUALITY_MAX <= jpeg_quality) {
- LOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality);
+ ALOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality);
return -1;
}
@@ -2260,7 +2260,7 @@ int SecCamera::setJpegQuality(int jpeg_quality)
m_jpeg_quality = jpeg_quality;
if (m_flag_camera_start && (m_camera_id == CAMERA_ID_BACK)) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAM_JPEG_QUALITY, jpeg_quality) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__);
return -1;
}
}
@@ -2278,10 +2278,10 @@ int SecCamera::getJpegQuality(void)
int SecCamera::setZoom(int zoom_level)
{
- LOGV("%s(zoom_level (%d))", __func__, zoom_level);
+ ALOGV("%s(zoom_level (%d))", __func__, zoom_level);
if (zoom_level < ZOOM_LEVEL_0 || ZOOM_LEVEL_MAX <= zoom_level) {
- LOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level);
+ ALOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level);
return -1;
}
@@ -2289,7 +2289,7 @@ int SecCamera::setZoom(int zoom_level)
m_zoom_level = zoom_level;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ZOOM, zoom_level) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__);
return -1;
}
}
@@ -2307,10 +2307,10 @@ int SecCamera::getZoom(void)
int SecCamera::setObjectTracking(int object_tracking)
{
- LOGV("%s(object_tracking (%d))", __func__, object_tracking);
+ ALOGV("%s(object_tracking (%d))", __func__, object_tracking);
if (object_tracking < OBJECT_TRACKING_OFF || OBJECT_TRACKING_MAX <= object_tracking) {
- LOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking);
+ ALOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking);
return -1;
}
@@ -2335,12 +2335,12 @@ int SecCamera::getObjectTrackingStatus(void)
int SecCamera::setObjectTrackingStartStop(int start_stop)
{
- LOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop);
+ ALOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop);
if (m_object_tracking_start_stop != start_stop) {
m_object_tracking_start_stop = start_stop;
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP, start_stop) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__);
return -1;
}
}
@@ -2350,12 +2350,12 @@ int SecCamera::setObjectTrackingStartStop(int start_stop)
int SecCamera::setTouchAFStartStop(int start_stop)
{
- LOGV("%s(touch_af_start_stop (%d))", __func__, start_stop);
+ ALOGV("%s(touch_af_start_stop (%d))", __func__, start_stop);
if (m_touch_af_start_stop != start_stop) {
m_touch_af_start_stop = start_stop;
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_TOUCH_AF_START_STOP, start_stop) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__);
return -1;
}
}
@@ -2367,10 +2367,10 @@ int SecCamera::setTouchAFStartStop(int start_stop)
int SecCamera::setSmartAuto(int smart_auto)
{
- LOGV("%s(smart_auto (%d))", __func__, smart_auto);
+ ALOGV("%s(smart_auto (%d))", __func__, smart_auto);
if (smart_auto < SMART_AUTO_OFF || SMART_AUTO_MAX <= smart_auto) {
- LOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto);
+ ALOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto);
return -1;
}
@@ -2378,7 +2378,7 @@ int SecCamera::setSmartAuto(int smart_auto)
m_smart_auto = smart_auto;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SMART_AUTO, smart_auto) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__);
return -1;
}
}
@@ -2400,21 +2400,21 @@ int SecCamera::getAutosceneStatus(void)
autoscene_status = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_SMART_AUTO_STATUS);
if ((autoscene_status < SMART_AUTO_STATUS_AUTO) || (autoscene_status > SMART_AUTO_STATUS_MAX)) {
- LOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status);
+ ALOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status);
return -1;
}
}
- //LOGV("%s : autoscene_status (%d)", __func__, autoscene_status);
+ //ALOGV("%s : autoscene_status (%d)", __func__, autoscene_status);
return autoscene_status;
}
//======================================================================
int SecCamera::setBeautyShot(int beauty_shot)
{
- LOGV("%s(beauty_shot (%d))", __func__, beauty_shot);
+ ALOGV("%s(beauty_shot (%d))", __func__, beauty_shot);
if (beauty_shot < BEAUTY_SHOT_OFF || BEAUTY_SHOT_MAX <= beauty_shot) {
- LOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot);
+ ALOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot);
return -1;
}
@@ -2422,7 +2422,7 @@ int SecCamera::setBeautyShot(int beauty_shot)
m_beauty_shot = beauty_shot;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BEAUTY_SHOT, beauty_shot) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__);
return -1;
}
}
@@ -2442,10 +2442,10 @@ int SecCamera::getBeautyShot(void)
int SecCamera::setVintageMode(int vintage_mode)
{
- LOGV("%s(vintage_mode(%d))", __func__, vintage_mode);
+ ALOGV("%s(vintage_mode(%d))", __func__, vintage_mode);
if (vintage_mode <= VINTAGE_MODE_BASE || VINTAGE_MODE_MAX <= vintage_mode) {
- LOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode);
+ ALOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode);
return -1;
}
@@ -2453,7 +2453,7 @@ int SecCamera::setVintageMode(int vintage_mode)
m_vintage_mode = vintage_mode;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_VINTAGE_MODE, vintage_mode) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__);
return -1;
}
}
@@ -2471,10 +2471,10 @@ int SecCamera::getVintageMode(void)
int SecCamera::setFocusMode(int focus_mode)
{
- LOGV("%s(focus_mode(%d))", __func__, focus_mode);
+ ALOGV("%s(focus_mode(%d))", __func__, focus_mode);
if (FOCUS_MODE_MAX <= focus_mode) {
- LOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode);
+ ALOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode);
return -1;
}
@@ -2483,7 +2483,7 @@ int SecCamera::setFocusMode(int focus_mode)
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FOCUS_MODE, focus_mode) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__);
return -1;
}
}
@@ -2501,19 +2501,19 @@ int SecCamera::getFocusMode(void)
int SecCamera::setFaceDetect(int face_detect)
{
- LOGV("%s(face_detect(%d))", __func__, face_detect);
+ ALOGV("%s(face_detect(%d))", __func__, face_detect);
if (m_face_detect != face_detect) {
m_face_detect = face_detect;
if (m_flag_camera_start) {
if (m_face_detect != FACE_DETECTION_OFF) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FOCUS_MODE, FOCUS_MODE_AUTO) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__);
return -1;
}
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FACE_DETECTION, face_detect) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__);
return -1;
}
}
@@ -2531,7 +2531,7 @@ int SecCamera::getFaceDetect(void)
int SecCamera::setGPSLatitude(const char *gps_latitude)
{
- LOGV("%s(gps_latitude(%s))", __func__, gps_latitude);
+ ALOGV("%s(gps_latitude(%s))", __func__, gps_latitude);
if (gps_latitude == NULL)
m_gps_enabled = false;
else {
@@ -2556,13 +2556,13 @@ int SecCamera::setGPSLatitude(const char *gps_latitude)
}
}
- LOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude);
+ ALOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude);
return 0;
}
int SecCamera::setGPSLongitude(const char *gps_longitude)
{
- LOGV("%s(gps_longitude(%s))", __func__, gps_longitude);
+ ALOGV("%s(gps_longitude(%s))", __func__, gps_longitude);
if (gps_longitude == NULL)
m_gps_enabled = false;
else {
@@ -2587,13 +2587,13 @@ int SecCamera::setGPSLongitude(const char *gps_longitude)
}
}
- LOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude);
+ ALOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude);
return 0;
}
int SecCamera::setGPSAltitude(const char *gps_altitude)
{
- LOGV("%s(gps_altitude(%s))", __func__, gps_altitude);
+ ALOGV("%s(gps_altitude(%s))", __func__, gps_altitude);
if (gps_altitude == NULL)
m_gps_altitude = 0;
else {
@@ -2608,25 +2608,25 @@ int SecCamera::setGPSAltitude(const char *gps_altitude)
gpsInfoAltitude.second = 0;
}
- LOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude);
+ ALOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude);
return 0;
}
int SecCamera::setGPSTimeStamp(const char *gps_timestamp)
{
- LOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp);
+ ALOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp);
if (gps_timestamp == NULL)
m_gps_timestamp = 0;
else
m_gps_timestamp = atol(gps_timestamp);
- LOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp);
+ ALOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp);
return 0;
}
int SecCamera::setGPSProcessingMethod(const char *gps_processing_method)
{
- LOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method);
+ ALOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method);
memset(mExifInfo.gps_processing_method, 0, sizeof(mExifInfo.gps_processing_method));
if (gps_processing_method != NULL) {
size_t len = strlen(gps_processing_method);
@@ -2640,10 +2640,10 @@ int SecCamera::setGPSProcessingMethod(const char *gps_processing_method)
int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock)
{
- LOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock);
+ ALOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock);
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK, facedetect_lockunlock) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__);
return -1;
}
@@ -2652,15 +2652,15 @@ int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock)
int SecCamera::setObjectPosition(int x, int y)
{
- LOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y);
+ ALOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y);
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_X, x) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__);
return -1;
}
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_Y, y) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__);
return -1;
}
@@ -2671,10 +2671,10 @@ int SecCamera::setObjectPosition(int x, int y)
int SecCamera::setGamma(int gamma)
{
- LOGV("%s(gamma(%d))", __func__, gamma);
+ ALOGV("%s(gamma(%d))", __func__, gamma);
if (gamma < GAMMA_OFF || GAMMA_MAX <= gamma) {
- LOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma);
+ ALOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma);
return -1;
}
@@ -2682,7 +2682,7 @@ int SecCamera::setGamma(int gamma)
m_video_gamma = gamma;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_GAMMA, gamma) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__);
return -1;
}
}
@@ -2695,10 +2695,10 @@ int SecCamera::setGamma(int gamma)
int SecCamera::setSlowAE(int slow_ae)
{
- LOGV("%s(slow_ae(%d))", __func__, slow_ae);
+ ALOGV("%s(slow_ae(%d))", __func__, slow_ae);
if (slow_ae < GAMMA_OFF || GAMMA_MAX <= slow_ae) {
- LOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae);
+ ALOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae);
return -1;
}
@@ -2706,7 +2706,7 @@ int SecCamera::setSlowAE(int slow_ae)
m_slow_ae = slow_ae;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_SLOW_AE, slow_ae) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__);
return -1;
}
}
@@ -2718,7 +2718,7 @@ int SecCamera::setSlowAE(int slow_ae)
//======================================================================
int SecCamera::setRecordingSize(int width, int height)
{
- LOGV("%s(width(%d), height(%d))", __func__, width, height);
+ ALOGV("%s(width(%d), height(%d))", __func__, width, height);
m_recording_width = width;
m_recording_height = height;
@@ -2730,10 +2730,10 @@ int SecCamera::setRecordingSize(int width, int height)
int SecCamera::setExifOrientationInfo(int orientationInfo)
{
- LOGV("%s(orientationInfo(%d))", __func__, orientationInfo);
+ ALOGV("%s(orientationInfo(%d))", __func__, orientationInfo);
if (orientationInfo < 0) {
- LOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo);
+ ALOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo);
return -1;
}
m_exif_orientation = orientationInfo;
@@ -2747,7 +2747,7 @@ int SecCamera::setBatchReflection()
{
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BATCH_REFLECTION, 1) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__);
return -1;
}
}
@@ -2758,10 +2758,10 @@ int SecCamera::setBatchReflection()
/*Video call*/
int SecCamera::setVTmode(int vtmode)
{
- LOGV("%s(vtmode (%d))", __func__, vtmode);
+ ALOGV("%s(vtmode (%d))", __func__, vtmode);
if (vtmode < VT_MODE_OFF || VT_MODE_MAX <= vtmode) {
- LOGE("ERR(%s):Invalid vtmode (%d)", __func__, vtmode);
+ ALOGE("ERR(%s):Invalid vtmode (%d)", __func__, vtmode);
return -1;
}
@@ -2775,10 +2775,10 @@ int SecCamera::setVTmode(int vtmode)
/* Camcorder fix fps */
int SecCamera::setSensorMode(int sensor_mode)
{
- LOGV("%s(sensor_mode (%d))", __func__, sensor_mode);
+ ALOGV("%s(sensor_mode (%d))", __func__, sensor_mode);
if (sensor_mode < SENSOR_MODE_CAMERA || SENSOR_MODE_MOVIE < sensor_mode) {
- LOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode);
+ ALOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode);
return -1;
}
@@ -2798,9 +2798,9 @@ int SecCamera::setSensorMode(int sensor_mode)
*/
int SecCamera::setShotMode(int shot_mode)
{
- LOGV("%s(shot_mode (%d))", __func__, shot_mode);
+ ALOGV("%s(shot_mode (%d))", __func__, shot_mode);
if (shot_mode < SHOT_MODE_SINGLE || SHOT_MODE_SELF < shot_mode) {
- LOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode);
+ ALOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode);
return -1;
}
m_shot_mode = shot_mode;
@@ -2815,10 +2815,10 @@ int SecCamera::getVTmode(void)
int SecCamera::setBlur(int blur_level)
{
- LOGV("%s(level (%d))", __func__, blur_level);
+ ALOGV("%s(level (%d))", __func__, blur_level);
if (blur_level < BLUR_LEVEL_0 || BLUR_LEVEL_MAX <= blur_level) {
- LOGE("ERR(%s):Invalid level (%d)", __func__, blur_level);
+ ALOGE("ERR(%s):Invalid level (%d)", __func__, blur_level);
return -1;
}
@@ -2826,7 +2826,7 @@ int SecCamera::setBlur(int blur_level)
m_blur_level = blur_level;
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_VGA_BLUR, blur_level) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VGA_BLUR", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VGA_BLUR", __func__);
return -1;
}
}
@@ -2841,10 +2841,10 @@ int SecCamera::getBlur(void)
int SecCamera::setDataLineCheck(int chk_dataline)
{
- LOGV("%s(chk_dataline (%d))", __func__, chk_dataline);
+ ALOGV("%s(chk_dataline (%d))", __func__, chk_dataline);
if (chk_dataline < CHK_DATALINE_OFF || CHK_DATALINE_MAX <= chk_dataline) {
- LOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline);
+ ALOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline);
return -1;
}
@@ -2860,11 +2860,11 @@ int SecCamera::getDataLineCheck(void)
int SecCamera::setDataLineCheckStop(void)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
if (m_flag_camera_start) {
if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_CHECK_DATALINE_STOP, 1) < 0) {
- LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__);
+ ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__);
return -1;
}
}
@@ -2873,7 +2873,7 @@ int SecCamera::setDataLineCheckStop(void)
const __u8* SecCamera::getCameraSensorName(void)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return fimc_v4l2_enuminput(m_cam_fd, getCameraId());
}
@@ -2881,7 +2881,7 @@ const __u8* SecCamera::getCameraSensorName(void)
#ifdef ENABLE_ESD_PREVIEW_CHECK
int SecCamera::getCameraSensorESDStatus(void)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
// 0 : normal operation, 1 : abnormal operation
int status = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_ESD_INT);
@@ -2895,7 +2895,7 @@ int SecCamera::getCameraSensorESDStatus(void)
int SecCamera::setJpegThumbnailSize(int width, int height)
{
- LOGV("%s(width(%d), height(%d))", __func__, width, height);
+ ALOGV("%s(width(%d), height(%d))", __func__, width, height);
m_jpeg_thumbnail_width = width;
m_jpeg_thumbnail_height = height;
@@ -3019,7 +3019,7 @@ void SecCamera::setExifChangedAttribute()
it current returns a negative err value, so avoid putting
odd value into exif for now */
if (shutterSpeed < 0) {
- LOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100",
+ ALOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100",
__func__, shutterSpeed, m_camera_id);
shutterSpeed = 100;
}
@@ -3033,7 +3033,7 @@ void SecCamera::setExifChangedAttribute()
it current returns a negative err value, so avoid putting
odd value into exif for now */
if (iso < 0) {
- LOGE("%s: error %d getting iso, camera_id = %d, using 100",
+ ALOGE("%s: error %d getting iso, camera_id = %d, using 100",
__func__, iso, m_camera_id);
iso = ISO_100;
}
@@ -3067,8 +3067,8 @@ void SecCamera::setExifChangedAttribute()
sv = APEX_ISO_TO_FILMSENSITIVITY(mExifInfo.iso_speed_rating);
bv = av + tv - sv;
ev = av + tv;
- LOGD("Shutter speed=%d us, iso=%d\n", shutterSpeed, mExifInfo.iso_speed_rating);
- LOGD("AV=%d, TV=%d, SV=%d\n", av, tv, sv);
+ ALOGD("Shutter speed=%d us, iso=%d\n", shutterSpeed, mExifInfo.iso_speed_rating);
+ ALOGD("AV=%d, TV=%d, SV=%d\n", av, tv, sv);
//3 Shutter Speed
mExifInfo.shutter_speed.num = tv*EXIF_DEF_APEX_DEN;
@@ -3209,7 +3209,7 @@ inline int SecCamera::m_frameSize(int format, int width, int height)
break;
default :
- LOGE("ERR(%s):Invalid V4L2 pixel format(%d)\n", __func__, format);
+ ALOGE("ERR(%s):Invalid V4L2 pixel format(%d)\n", __func__, format);
case V4L2_PIX_FMT_RGB565:
size = (width * height * BPP);
break;
diff --git a/libcamera/SecCamera.h b/libcamera/SecCamera.h
index 648a0f6..c93f63f 100644
--- a/libcamera/SecCamera.h
+++ b/libcamera/SecCamera.h
@@ -48,8 +48,8 @@ namespace android {
// #define ENABLE_ESD_PREVIEW_CHECK
#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0
-#define LOG_CAMERA LOGD
-#define LOG_CAMERA_PREVIEW LOGD
+#define LOG_CAMERA ALOGD
+#define LOG_CAMERA_PREVIEW ALOGD
#define LOG_TIME_DEFINE(n) \
struct timeval time_start_##n, time_stop_##n; unsigned long log_time_##n = 0;
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index bbc5b64..161daf0 100755
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -28,7 +28,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <camera/Camera.h>
-#include <media/stagefright/MetadataBufferType.h>
+#include <MetadataBufferType.h>
#define VIDEO_COMMENT_MARKER_H 0xFFBE
#define VIDEO_COMMENT_MARKER_L 0xFFBF
@@ -96,7 +96,7 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev)
mPostViewSize(0),
mHalDevice(dev)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int ret = 0;
mPreviewWindow = NULL;
@@ -109,16 +109,16 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev)
if (!mGrallocHal) {
ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&mGrallocHal);
if (ret)
- LOGE("ERR(%s):Fail on loading gralloc HAL", __func__);
+ ALOGE("ERR(%s):Fail on loading gralloc HAL", __func__);
}
ret = mSecCamera->initCamera(cameraId);
if (ret < 0) {
- LOGE("ERR(%s):Fail on mSecCamera init", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera init", __func__);
}
mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
- LOGV("mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
+ ALOGV("mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
mPostViewWidth,mPostViewHeight,mPostViewSize);
initDefaultParameters(cameraId);
@@ -143,7 +143,7 @@ int CameraHardwareSec::getCameraId() const
void CameraHardwareSec::initDefaultParameters(int cameraId)
{
if (mSecCamera == NULL) {
- LOGE("ERR(%s):mSecCamera object is NULL", __func__);
+ ALOGE("ERR(%s):mSecCamera object is NULL", __func__);
return;
}
@@ -151,7 +151,7 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
CameraParameters ip;
mCameraSensorName = mSecCamera->getCameraSensorName();
- LOGV("CameraSensorName: %s", mCameraSensorName);
+ ALOGV("CameraSensorName: %s", mCameraSensorName);
int preview_max_width = 0;
int preview_max_height = 0;
@@ -176,11 +176,11 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
// sizes at zero to catch the error.
if (mSecCamera->getPreviewMaxSize(&preview_max_width,
&preview_max_height) < 0)
- LOGE("getPreviewMaxSize fail (%d / %d) \n",
+ ALOGE("getPreviewMaxSize fail (%d / %d) \n",
preview_max_width, preview_max_height);
if (mSecCamera->getSnapshotMaxSize(&snapshot_max_width,
&snapshot_max_height) < 0)
- LOGE("getSnapshotMaxSize fail (%d / %d) \n",
+ ALOGE("getSnapshotMaxSize fail (%d / %d) \n",
snapshot_max_width, snapshot_max_height);
String8 previewColorString;
previewColorString = CameraParameters::PIXEL_FORMAT_YUV420SP;
@@ -378,7 +378,7 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
CameraHardwareSec::~CameraHardwareSec()
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
mSecCamera->DeinitCamera();
}
@@ -387,33 +387,33 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w)
int min_bufs;
mPreviewWindow = w;
- LOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow);
+ ALOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow);
if (!w) {
- LOGE("preview window is NULL!");
+ ALOGE("preview window is NULL!");
return OK;
}
mPreviewLock.lock();
if (mPreviewRunning && !mPreviewStartDeferred) {
- LOGI("stop preview (window change)");
+ ALOGI("stop preview (window change)");
stopPreviewInternal();
}
if (w->get_min_undequeued_buffer_count(w, &min_bufs)) {
- LOGE("%s: could not retrieve min undequeued buffer count", __func__);
+ ALOGE("%s: could not retrieve min undequeued buffer count", __func__);
return INVALID_OPERATION;
}
if (min_bufs >= kBufferCount) {
- LOGE("%s: min undequeued buffer count %d is too high (expecting at most %d)", __func__,
+ ALOGE("%s: min undequeued buffer count %d is too high (expecting at most %d)", __func__,
min_bufs, kBufferCount - 1);
}
- LOGV("%s: setting buffer count to %d", __func__, kBufferCount);
+ ALOGV("%s: setting buffer count to %d", __func__, kBufferCount);
if (w->set_buffer_count(w, kBufferCount)) {
- LOGE("%s: could not set buffer count", __func__);
+ ALOGE("%s: could not set buffer count", __func__);
return INVALID_OPERATION;
}
@@ -423,23 +423,23 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w)
int hal_pixel_format = HAL_PIXEL_FORMAT_YV12;
const char *str_preview_format = mParameters.getPreviewFormat();
- LOGV("%s: preview format %s", __func__, str_preview_format);
+ ALOGV("%s: preview format %s", __func__, str_preview_format);
if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) {
- LOGE("%s: could not set usage on gralloc buffer", __func__);
+ ALOGE("%s: could not set usage on gralloc buffer", __func__);
return INVALID_OPERATION;
}
if (w->set_buffers_geometry(w,
preview_width, preview_height,
hal_pixel_format)) {
- LOGE("%s: could not set buffers geometry to %s",
+ ALOGE("%s: could not set buffers geometry to %s",
__func__, str_preview_format);
return INVALID_OPERATION;
}
if (mPreviewRunning && mPreviewStartDeferred) {
- LOGV("start/resume preview");
+ ALOGV("start/resume preview");
status_t ret = startPreviewInternal();
if (ret == OK) {
mPreviewStartDeferred = false;
@@ -466,19 +466,19 @@ void CameraHardwareSec::setCallbacks(camera_notify_callback notify_cb,
void CameraHardwareSec::enableMsgType(int32_t msgType)
{
- LOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
+ ALOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
__func__, msgType, mMsgEnabled);
mMsgEnabled |= msgType;
- LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+ ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
}
void CameraHardwareSec::disableMsgType(int32_t msgType)
{
- LOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
+ ALOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
__func__, msgType, mMsgEnabled);
mMsgEnabled &= ~msgType;
- LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+ ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
}
bool CameraHardwareSec::msgTypeEnabled(int32_t msgType)
@@ -498,21 +498,21 @@ void CameraHardwareSec::setSkipFrame(int frame)
int CameraHardwareSec::previewThreadWrapper()
{
- LOGI("%s: starting", __func__);
+ ALOGI("%s: starting", __func__);
while (1) {
mPreviewLock.lock();
while (!mPreviewRunning) {
- LOGI("%s: calling mSecCamera->stopPreview() and waiting", __func__);
+ ALOGI("%s: calling mSecCamera->stopPreview() and waiting", __func__);
mSecCamera->stopPreview();
/* signal that we're stopping */
mPreviewStoppedCondition.signal();
mPreviewCondition.wait(mPreviewLock);
- LOGI("%s: return from wait", __func__);
+ ALOGI("%s: return from wait", __func__);
}
mPreviewLock.unlock();
if (mExitPreviewThread) {
- LOGI("%s: exiting", __func__);
+ ALOGI("%s: exiting", __func__);
mSecCamera->stopPreview();
return 0;
}
@@ -530,17 +530,17 @@ int CameraHardwareSec::previewThread()
index = mSecCamera->getPreview();
if (index < 0) {
- LOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__);
+ ALOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__);
return UNKNOWN_ERROR;
}
-// LOGV("%s: index %d", __func__, index);
+// ALOGV("%s: index %d", __func__, index);
mSkipFrameLock.lock();
if (mSkipFrame > 0) {
mSkipFrame--;
mSkipFrameLock.unlock();
- LOGV("%s: index %d skipping frame", __func__, index);
+ ALOGV("%s: index %d skipping frame", __func__, index);
return NO_ERROR;
}
mSkipFrameLock.unlock();
@@ -551,7 +551,7 @@ int CameraHardwareSec::previewThread()
phyCAddr = mSecCamera->getPhyAddrC(index);
if (phyYAddr == 0xffffffff || phyCAddr == 0xffffffff) {
- LOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x",
+ ALOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x",
__func__, phyYAddr, phyCAddr);
return UNKNOWN_ERROR;
}
@@ -566,7 +566,7 @@ int CameraHardwareSec::previewThread()
buffer_handle_t *buf_handle;
int stride;
if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &buf_handle, &stride)) {
- LOGE("Could not dequeue gralloc buffer!\n");
+ ALOGE("Could not dequeue gralloc buffer!\n");
goto callbacks;
}
@@ -612,10 +612,10 @@ int CameraHardwareSec::previewThread()
mGrallocHal->unlock(mGrallocHal, *buf_handle);
}
else
- LOGE("%s: could not obtain gralloc buffer", __func__);
+ ALOGE("%s: could not obtain gralloc buffer", __func__);
if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, buf_handle)) {
- LOGE("Could not enqueue gralloc buffer!\n");
+ ALOGE("Could not enqueue gralloc buffer!\n");
goto callbacks;
}
}
@@ -647,7 +647,7 @@ callbacks:
if (mRecordRunning == true) {
index = mSecCamera->getRecordFrame();
if (index < 0) {
- LOGE("ERR(%s):Fail on SecCamera->getRecord()", __func__);
+ ALOGE("ERR(%s):Fail on SecCamera->getRecord()", __func__);
return UNKNOWN_ERROR;
}
@@ -655,7 +655,7 @@ callbacks:
phyCAddr = mSecCamera->getRecPhyAddrC(index);
if (phyYAddr == 0xffffffff || phyCAddr == 0xffffffff) {
- LOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__,
+ ALOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__,
phyYAddr, phyCAddr);
return UNKNOWN_ERROR;
}
@@ -683,7 +683,7 @@ status_t CameraHardwareSec::startPreview()
{
int ret = 0; //s1 [Apply factory standard]
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
if (waitCaptureCompletion() != NO_ERROR) {
return TIMED_OUT;
@@ -692,7 +692,7 @@ status_t CameraHardwareSec::startPreview()
mPreviewLock.lock();
if (mPreviewRunning) {
// already running
- LOGE("%s : preview thread already running", __func__);
+ ALOGE("%s : preview thread already running", __func__);
mPreviewLock.unlock();
return INVALID_OPERATION;
}
@@ -701,7 +701,7 @@ status_t CameraHardwareSec::startPreview()
mPreviewStartDeferred = false;
if (!mPreviewWindow) {
- LOGI("%s : deferring", __func__);
+ ALOGI("%s : deferring", __func__);
mPreviewStartDeferred = true;
mPreviewLock.unlock();
return NO_ERROR;
@@ -717,13 +717,13 @@ status_t CameraHardwareSec::startPreview()
status_t CameraHardwareSec::startPreviewInternal()
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
int ret = mSecCamera->startPreview();
- LOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
+ ALOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
if (ret < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
return UNKNOWN_ERROR;
}
@@ -733,7 +733,7 @@ status_t CameraHardwareSec::startPreviewInternal()
mSecCamera->getPreviewSize(&width, &height, &frame_size);
- LOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
+ ALOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
mSecCamera->getCameraFd(), frame_size, width, height);
if (mPreviewHeap) {
mPreviewHeap->release(mPreviewHeap);
@@ -746,7 +746,7 @@ status_t CameraHardwareSec::startPreviewInternal()
0); // no cookie
mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
- LOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
+ ALOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
mPostViewWidth,mPostViewHeight,mPostViewSize);
return NO_ERROR;
@@ -754,7 +754,7 @@ status_t CameraHardwareSec::startPreviewInternal()
void CameraHardwareSec::stopPreviewInternal()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
/* request that the preview thread stop. */
if (mPreviewRunning) {
@@ -765,14 +765,14 @@ void CameraHardwareSec::stopPreviewInternal()
mPreviewStoppedCondition.wait(mPreviewLock);
}
else
- LOGV("%s : preview running but deferred, doing nothing", __func__);
+ ALOGV("%s : preview running but deferred, doing nothing", __func__);
} else
- LOGI("%s : preview not running, doing nothing", __func__);
+ ALOGI("%s : preview not running, doing nothing", __func__);
}
void CameraHardwareSec::stopPreview()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
/* request that the preview thread stop. */
mPreviewLock.lock();
@@ -783,7 +783,7 @@ void CameraHardwareSec::stopPreview()
bool CameraHardwareSec::previewEnabled()
{
Mutex::Autolock lock(mPreviewLock);
- LOGV("%s : %d", __func__, mPreviewRunning);
+ ALOGV("%s : %d", __func__, mPreviewRunning);
return mPreviewRunning;
}
@@ -791,7 +791,7 @@ bool CameraHardwareSec::previewEnabled()
status_t CameraHardwareSec::startRecording()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
Mutex::Autolock lock(mRecordLock);
@@ -801,13 +801,13 @@ status_t CameraHardwareSec::startRecording()
}
mRecordHeap = mGetMemoryCb(-1, sizeof(struct addrs), kBufferCount, NULL);
if (!mRecordHeap) {
- LOGE("ERR(%s): Record heap creation fail", __func__);
+ ALOGE("ERR(%s): Record heap creation fail", __func__);
return UNKNOWN_ERROR;
}
if (mRecordRunning == false) {
if (mSecCamera->startRecord() < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__);
return UNKNOWN_ERROR;
}
mRecordRunning = true;
@@ -817,13 +817,13 @@ status_t CameraHardwareSec::startRecording()
void CameraHardwareSec::stopRecording()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
Mutex::Autolock lock(mRecordLock);
if (mRecordRunning == true) {
if (mSecCamera->stopRecord() < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->stopRecord()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->stopRecord()", __func__);
return;
}
mRecordRunning = false;
@@ -832,7 +832,7 @@ void CameraHardwareSec::stopRecording()
bool CameraHardwareSec::recordingEnabled()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
return mRecordRunning;
}
@@ -850,7 +850,7 @@ int CameraHardwareSec::autoFocusThread()
int count =0;
int af_status =0 ;
- LOGV("%s : starting", __func__);
+ ALOGV("%s : starting", __func__);
/* block until we're told to start. we don't want to use
* a restartable thread and requestExitAndWait() in cancelAutoFocus()
@@ -862,32 +862,32 @@ int CameraHardwareSec::autoFocusThread()
/* check early exit request */
if (mExitAutoFocusThread) {
mFocusLock.unlock();
- LOGV("%s : exiting on request0", __func__);
+ ALOGV("%s : exiting on request0", __func__);
return NO_ERROR;
}
mFocusCondition.wait(mFocusLock);
/* check early exit request */
if (mExitAutoFocusThread) {
mFocusLock.unlock();
- LOGV("%s : exiting on request1", __func__);
+ ALOGV("%s : exiting on request1", __func__);
return NO_ERROR;
}
mFocusLock.unlock();
- LOGV("%s : calling setAutoFocus", __func__);
+ ALOGV("%s : calling setAutoFocus", __func__);
if (mSecCamera->setAutofocus() < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
return UNKNOWN_ERROR;
}
af_status = mSecCamera->getAutoFocusResult();
if (af_status == 0x01) {
- LOGV("%s : AF Success!!", __func__);
+ ALOGV("%s : AF Success!!", __func__);
if (mMsgEnabled & CAMERA_MSG_FOCUS)
mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
} else if (af_status == 0x02) {
- LOGV("%s : AF Cancelled !!", __func__);
+ ALOGV("%s : AF Cancelled !!", __func__);
if (mMsgEnabled & CAMERA_MSG_FOCUS) {
/* CAMERA_MSG_FOCUS only takes a bool. true for
* finished and false for failure. cancel is still
@@ -896,19 +896,19 @@ int CameraHardwareSec::autoFocusThread()
mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
}
} else {
- LOGV("%s : AF Fail !!", __func__);
- LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+ ALOGV("%s : AF Fail !!", __func__);
+ ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
if (mMsgEnabled & CAMERA_MSG_FOCUS)
mNotifyCb(CAMERA_MSG_FOCUS, false, 0, mCallbackCookie);
}
- LOGV("%s : exiting with no error", __func__);
+ ALOGV("%s : exiting with no error", __func__);
return NO_ERROR;
}
status_t CameraHardwareSec::autoFocus()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
/* signal autoFocusThread to run once */
mFocusCondition.signal();
return NO_ERROR;
@@ -917,7 +917,7 @@ status_t CameraHardwareSec::autoFocus()
/* 2009.10.14 by icarus for added interface */
status_t CameraHardwareSec::cancelAutoFocus()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
// cancelAutoFocus should be allowed after preview is started. But if
// the preview is deferred, cancelAutoFocus will fail. Ignore it if that is
@@ -925,7 +925,7 @@ status_t CameraHardwareSec::cancelAutoFocus()
if (mPreviewRunning && mPreviewStartDeferred) return NO_ERROR;
if (mSecCamera->cancelAutofocus() < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__);
return UNKNOWN_ERROR;
}
@@ -940,14 +940,14 @@ int CameraHardwareSec::save_jpeg( unsigned char *real_jpeg, int jpeg_size)
/* file create/open, note to "wb" */
yuv_fp = fopen("/data/camera_dump.jpeg", "wb");
if (yuv_fp == NULL) {
- LOGE("Save jpeg file open error");
+ ALOGE("Save jpeg file open error");
return -1;
}
- LOGV("[BestIQ] real_jpeg size ========> %d\n", jpeg_size);
+ ALOGV("[BestIQ] real_jpeg size ========> %d\n", jpeg_size);
buffer = (char *) malloc(jpeg_size);
if (buffer == NULL) {
- LOGE("Save YUV] buffer alloc failed");
+ ALOGE("Save YUV] buffer alloc failed");
if (yuv_fp)
fclose(yuv_fp);
@@ -976,24 +976,24 @@ void CameraHardwareSec::save_postview(const char *fname, uint8_t *buf, uint32_t
int cnt = 0;
uint32_t written = 0;
- LOGD("opening file [%s]\n", fname);
+ ALOGD("opening file [%s]\n", fname);
int fd = open(fname, O_RDWR | O_CREAT);
if (fd < 0) {
- LOGE("failed to create file [%s]: %s", fname, strerror(errno));
+ ALOGE("failed to create file [%s]: %s", fname, strerror(errno));
return;
}
- LOGD("writing %d bytes to file [%s]\n", size, fname);
+ ALOGD("writing %d bytes to file [%s]\n", size, fname);
while (written < size) {
nw = ::write(fd, buf + written, size - written);
if (nw < 0) {
- LOGE("failed to write to file %d [%s]: %s",written,fname, strerror(errno));
+ ALOGE("failed to write to file %d [%s]: %s",written,fname, strerror(errno));
break;
}
written += nw;
cnt++;
}
- LOGD("done writing %d bytes to file [%s] in %d passes\n",size, fname, cnt);
+ ALOGD("done writing %d bytes to file [%s] in %d passes\n",size, fname, cnt);
::close(fd);
}
@@ -1005,7 +1005,7 @@ bool CameraHardwareSec::scaleDownYuv422(char *srcBuf, uint32_t srcWidth, uint32_
int32_t x, y, src_y_start_pos, dst_pos, src_pos;
if (dstWidth % 2 != 0 || dstHeight % 2 != 0){
- LOGE("scale_down_yuv422: invalid width, height for scaling");
+ ALOGE("scale_down_yuv422: invalid width, height for scaling");
return false;
}
@@ -1062,7 +1062,7 @@ bool CameraHardwareSec::YUY2toNV21(void *srcBuf, void *dstBuf, uint32_t srcWidth
int CameraHardwareSec::pictureThread()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
int jpeg_size = 0;
int ret = NO_ERROR;
@@ -1096,7 +1096,7 @@ int CameraHardwareSec::pictureThread()
addrs[0].width = mPostViewWidth;
addrs[0].height = mPostViewHeight;
- LOGV("[5B] mPostViewWidth = %d mPostViewHeight = %d\n",mPostViewWidth,mPostViewHeight);
+ ALOGV("[5B] mPostViewWidth = %d mPostViewHeight = %d\n",mPostViewWidth,mPostViewHeight);
camera_memory_t *JpegHeap = mGetMemoryCb(-1, mJpegHeapSize, 1, 0);
sp<MemoryHeapBase> PostviewHeap = new MemoryHeapBase(mPostViewSize);
@@ -1121,7 +1121,7 @@ int CameraHardwareSec::pictureThread()
if (mSecCamera->getCameraId() == SecCamera::CAMERA_ID_BACK){
jpeg_data = mSecCamera->getJpeg(&jpeg_size, &phyAddr);
if (jpeg_data == NULL) {
- LOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__);
+ ALOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__);
ret = UNKNOWN_ERROR;
goto out;
}
@@ -1131,7 +1131,7 @@ int CameraHardwareSec::pictureThread()
ret = UNKNOWN_ERROR;
goto out;
}
- LOGI("snapshotandjpeg done\n");
+ ALOGI("snapshotandjpeg done\n");
}
LOG_TIME_END(1)
@@ -1168,7 +1168,7 @@ int CameraHardwareSec::pictureThread()
JpegExifSize = mSecCamera->getExif((unsigned char *)ExifHeap->data,
(unsigned char *)ThumbnailHeap->base());
- LOGV("JpegExifSize=%d", JpegExifSize);
+ ALOGV("JpegExifSize=%d", JpegExifSize);
if (JpegExifSize < 0) {
ret = UNKNOWN_ERROR;
@@ -1190,7 +1190,7 @@ int CameraHardwareSec::pictureThread()
LOG_TIME_END(0)
LOG_CAMERA("pictureThread interval: %lu us", LOG_TIME(0));
- LOGV("%s : pictureThread end", __func__);
+ ALOGV("%s : pictureThread end", __func__);
out:
JpegHeap->release(JpegHeap);
@@ -1210,10 +1210,10 @@ status_t CameraHardwareSec::waitCaptureCompletion() {
while (mCaptureInProgress) {
nsecs_t remainingTime = endTime - systemTime(SYSTEM_TIME_MONOTONIC);
if (remainingTime <= 0) {
- LOGE("Timed out waiting picture thread.");
+ ALOGE("Timed out waiting picture thread.");
return TIMED_OUT;
}
- LOGD("Waiting for picture thread to complete.");
+ ALOGD("Waiting for picture thread to complete.");
mCaptureCondition.waitRelative(mCaptureLock, remainingTime);
}
return NO_ERROR;
@@ -1221,16 +1221,16 @@ status_t CameraHardwareSec::waitCaptureCompletion() {
status_t CameraHardwareSec::takePicture()
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
stopPreview();
if (!mRawHeap) {
int rawHeapSize = mPostViewSize;
- LOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
+ ALOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
mRawHeap = mGetMemoryCb(-1, rawHeapSize, 1, 0);
if (!mRawHeap) {
- LOGE("ERR(%s): Raw heap creation fail", __func__);
+ ALOGE("ERR(%s): Raw heap creation fail", __func__);
}
}
@@ -1239,7 +1239,7 @@ status_t CameraHardwareSec::takePicture()
}
if (mPictureThread->run("CameraPictureThread", PRIORITY_DEFAULT) != NO_ERROR) {
- LOGE("%s : couldn't run picture thread", __func__);
+ ALOGE("%s : couldn't run picture thread", __func__);
return INVALID_OPERATION;
}
mCaptureLock.lock();
@@ -1251,12 +1251,12 @@ status_t CameraHardwareSec::takePicture()
status_t CameraHardwareSec::cancelPicture()
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
if (mPictureThread.get()) {
- LOGV("%s: waiting for picture thread to exit", __func__);
+ ALOGV("%s: waiting for picture thread to exit", __func__);
mPictureThread->requestExitAndWait();
- LOGV("%s: picture thread has exited", __func__);
+ ALOGV("%s: picture thread has exited", __func__);
}
return NO_ERROR;
@@ -1265,7 +1265,7 @@ status_t CameraHardwareSec::cancelPicture()
bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf)
{
if (!pBuf) {
- LOGE("CheckVideoStartMarker() => pBuf is NULL\n");
+ ALOGE("CheckVideoStartMarker() => pBuf is NULL\n");
return false;
}
@@ -1279,7 +1279,7 @@ bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf)
bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf)
{
if (!pBuf) {
- LOGE("CheckEOIMarker() => pBuf is NULL\n");
+ ALOGE("CheckEOIMarker() => pBuf is NULL\n");
return false;
}
@@ -1293,7 +1293,7 @@ bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf)
bool CameraHardwareSec::FindEOIMarkerInJPEG(unsigned char *pBuf, int dwBufSize, int *pnJPEGsize)
{
if (NULL == pBuf || 0 >= dwBufSize) {
- LOGE("FindEOIMarkerInJPEG() => There is no contents.");
+ ALOGE("FindEOIMarkerInJPEG() => There is no contents.");
return false;
}
@@ -1372,7 +1372,7 @@ bool CameraHardwareSec::isSupportedParameter(const char * const parm,
status_t CameraHardwareSec::setParameters(const CameraParameters& params)
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
status_t ret = NO_ERROR;
@@ -1388,12 +1388,12 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_preview_height = 0;
params.getPreviewSize(&new_preview_width, &new_preview_height);
const char *new_str_preview_format = params.getPreviewFormat();
- LOGV("%s : new_preview_width x new_preview_height = %dx%d, format = %s",
+ ALOGV("%s : new_preview_width x new_preview_height = %dx%d, format = %s",
__func__, new_preview_width, new_preview_height, new_str_preview_format);
if (strcmp(new_str_preview_format, CameraParameters::PIXEL_FORMAT_YUV420SP) &&
strcmp(new_str_preview_format, CameraParameters::PIXEL_FORMAT_YUV420P)) {
- LOGE("Unsupported preview color format: %s", new_str_preview_format);
+ ALOGE("Unsupported preview color format: %s", new_str_preview_format);
return BAD_VALUE;
}
@@ -1413,33 +1413,33 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
current_pixel_format != new_preview_format) {
if (mSecCamera->setPreviewSize(new_preview_width, new_preview_height,
new_preview_format) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
+ ALOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
__func__, new_preview_width, new_preview_height, new_preview_format);
ret = UNKNOWN_ERROR;
} else {
if (mPreviewWindow) {
if (mPreviewRunning && !mPreviewStartDeferred) {
- LOGE("ERR(%s): preview is running, cannot change size and format!",
+ ALOGE("ERR(%s): preview is running, cannot change size and format!",
__func__);
ret = INVALID_OPERATION;
}
- LOGV("%s: mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
- LOGV("%s: mPreviewWindow->set_buffers_geometry (%p)", __func__,
+ ALOGV("%s: mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+ ALOGV("%s: mPreviewWindow->set_buffers_geometry (%p)", __func__,
mPreviewWindow->set_buffers_geometry);
mPreviewWindow->set_buffers_geometry(mPreviewWindow,
new_preview_width, new_preview_height,
new_preview_format);
- LOGV("%s: DONE mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+ ALOGV("%s: DONE mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
}
mParameters.setPreviewSize(new_preview_width, new_preview_height);
mParameters.setPreviewFormat(new_str_preview_format);
}
}
- else LOGV("%s: preview size and format has not changed", __func__);
+ else ALOGV("%s: preview size and format has not changed", __func__);
} else {
- LOGE("%s: Invalid preview size(%dx%d)",
+ ALOGE("%s: Invalid preview size(%dx%d)",
__func__, new_preview_width, new_preview_height);
ret = INVALID_OPERATION;
@@ -1449,11 +1449,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_picture_height = 0;
params.getPictureSize(&new_picture_width, &new_picture_height);
- LOGV("%s : new_picture_width x new_picture_height = %dx%d", __func__, new_picture_width, new_picture_height);
+ ALOGV("%s : new_picture_width x new_picture_height = %dx%d", __func__, new_picture_width, new_picture_height);
if (0 < new_picture_width && 0 < new_picture_height) {
- LOGV("%s: setSnapshotSize", __func__);
+ ALOGV("%s: setSnapshotSize", __func__);
if (mSecCamera->setSnapshotSize(new_picture_width, new_picture_height) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setSnapshotSize(width(%d), height(%d))",
+ ALOGE("ERR(%s):Fail on mSecCamera->setSnapshotSize(width(%d), height(%d))",
__func__, new_picture_width, new_picture_height);
ret = UNKNOWN_ERROR;
} else {
@@ -1463,7 +1463,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// picture format
const char *new_str_picture_format = params.getPictureFormat();
- LOGV("%s : new_str_picture_format %s", __func__, new_str_picture_format);
+ ALOGV("%s : new_str_picture_format %s", __func__, new_str_picture_format);
if (new_str_picture_format != NULL) {
int new_picture_format = 0;
@@ -1491,7 +1491,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
new_picture_format = V4L2_PIX_FMT_NV21; //for 3rd party
if (mSecCamera->setSnapshotPixelFormat(new_picture_format) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setSnapshotPixelFormat(format(%d))", __func__, new_picture_format);
+ ALOGE("ERR(%s):Fail on mSecCamera->setSnapshotPixelFormat(format(%d))", __func__, new_picture_format);
ret = UNKNOWN_ERROR;
} else {
mParameters.setPictureFormat(new_str_picture_format);
@@ -1500,11 +1500,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
//JPEG image quality
int new_jpeg_quality = params.getInt(CameraParameters::KEY_JPEG_QUALITY);
- LOGV("%s : new_jpeg_quality %d", __func__, new_jpeg_quality);
+ ALOGV("%s : new_jpeg_quality %d", __func__, new_jpeg_quality);
/* we ignore bad values */
if (new_jpeg_quality >=1 && new_jpeg_quality <= 100) {
if (mSecCamera->setJpegQuality(new_jpeg_quality) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setJpegQuality(quality(%d))", __func__, new_jpeg_quality);
+ ALOGE("ERR(%s):Fail on mSecCamera->setJpegQuality(quality(%d))", __func__, new_jpeg_quality);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_JPEG_QUALITY, new_jpeg_quality);
@@ -1516,7 +1516,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_jpeg_thumbnail_height= params.getInt(CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT);
if (0 <= new_jpeg_thumbnail_width && 0 <= new_jpeg_thumbnail_height) {
if (mSecCamera->setJpegThumbnailSize(new_jpeg_thumbnail_width, new_jpeg_thumbnail_height) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailSize(width(%d), height(%d))", __func__, new_jpeg_thumbnail_width, new_jpeg_thumbnail_height);
+ ALOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailSize(width(%d), height(%d))", __func__, new_jpeg_thumbnail_width, new_jpeg_thumbnail_height);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH, new_jpeg_thumbnail_width);
@@ -1530,17 +1530,17 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
* on scene mode. don't return an error because it causes CTS failure.
*/
if (new_frame_rate != mParameters.getPreviewFrameRate()) {
- LOGW("WARN(%s): request for preview frame %d not allowed, != %d\n",
+ ALOGW("WARN(%s): request for preview frame %d not allowed, != %d\n",
__func__, new_frame_rate, mParameters.getPreviewFrameRate());
}
// rotation
int new_rotation = params.getInt(CameraParameters::KEY_ROTATION);
- LOGV("%s : new_rotation %d", __func__, new_rotation);
+ ALOGV("%s : new_rotation %d", __func__, new_rotation);
if (0 <= new_rotation) {
- LOGV("%s : set orientation:%d\n", __func__, new_rotation);
+ ALOGV("%s : set orientation:%d\n", __func__, new_rotation);
if (mSecCamera->setExifOrientationInfo(new_rotation) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setExifOrientationInfo(%d)", __func__, new_rotation);
+ ALOGE("ERR(%s):Fail on mSecCamera->setExifOrientationInfo(%d)", __func__, new_rotation);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_ROTATION, new_rotation);
@@ -1551,11 +1551,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_exposure_compensation = params.getInt(CameraParameters::KEY_EXPOSURE_COMPENSATION);
int max_exposure_compensation = params.getInt(CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION);
int min_exposure_compensation = params.getInt(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION);
- LOGV("%s : new_exposure_compensation %d", __func__, new_exposure_compensation);
+ ALOGV("%s : new_exposure_compensation %d", __func__, new_exposure_compensation);
if ((min_exposure_compensation <= new_exposure_compensation) &&
(max_exposure_compensation >= new_exposure_compensation)) {
if (mSecCamera->setBrightness(new_exposure_compensation) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_exposure_compensation);
+ ALOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_exposure_compensation);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, new_exposure_compensation);
@@ -1564,7 +1564,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// whitebalance
const char *new_white_str = params.get(CameraParameters::KEY_WHITE_BALANCE);
- LOGV("%s : new_white_str %s", __func__, new_white_str);
+ ALOGV("%s : new_white_str %s", __func__, new_white_str);
if (new_white_str != NULL) {
int new_white = -1;
@@ -1583,13 +1583,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
CameraParameters::WHITE_BALANCE_INCANDESCENT))
new_white = WHITE_BALANCE_TUNGSTEN;
else {
- LOGE("ERR(%s):Invalid white balance(%s)", __func__, new_white_str); //twilight, shade, warm_flourescent
+ ALOGE("ERR(%s):Invalid white balance(%s)", __func__, new_white_str); //twilight, shade, warm_flourescent
ret = UNKNOWN_ERROR;
}
if (0 <= new_white) {
if (mSecCamera->setWhiteBalance(new_white) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setWhiteBalance(white(%d))", __func__, new_white);
+ ALOGE("ERR(%s):Fail on mSecCamera->setWhiteBalance(white(%d))", __func__, new_white);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_WHITE_BALANCE, new_white_str);
@@ -1614,9 +1614,9 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (new_scene_mode_str && current_scene_mode_str) {
if (!strcmp(new_scene_mode_str, current_scene_mode_str)) {
if ((new_min_fps != current_min_fps) || (new_max_fps != current_max_fps)) {
- LOGW("%s : requested new_min_fps = %d, new_max_fps = %d not allowed",
+ ALOGW("%s : requested new_min_fps = %d, new_max_fps = %d not allowed",
__func__, new_min_fps, new_max_fps);
- LOGE("%s : current_min_fps = %d, current_max_fps = %d",
+ ALOGE("%s : current_min_fps = %d, current_max_fps = %d",
__func__, current_min_fps, current_max_fps);
ret = UNKNOWN_ERROR;
}
@@ -1725,7 +1725,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
#endif
} else {
- LOGE("%s::unmatched scene_mode(%s)",
+ ALOGE("%s::unmatched scene_mode(%s)",
__func__, new_scene_mode_str); //action, night-portrait, theatre, steadyphoto
ret = UNKNOWN_ERROR;
}
@@ -1756,7 +1756,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
else if (!strcmp(new_focus_mode_str, FOCUS_MODE_FACEDETECT)) {
// Enable face detect here, SecCamera will take care of the rest
if (mSecCamera->setFaceDetect(FACE_DETECTION_ON) < 0) {
- LOGE("%s::mSecCamera->setFaceDetect(%d) fail", __func__, FACE_DETECTION_ON);
+ ALOGE("%s::mSecCamera->setFaceDetect(%d) fail", __func__, FACE_DETECTION_ON);
ret = UNKNOWN_ERROR;
}
mParameters.set(CameraParameters::KEY_FOCUS_MODE, new_focus_mode_str);
@@ -1764,19 +1764,19 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
BACK_CAMERA_AUTO_FOCUS_DISTANCES_STR);
}
else {
- LOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str);
+ ALOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str);
ret = UNKNOWN_ERROR;
}
if (0 <= new_focus_mode) {
// Disable face-detect
if (mSecCamera->setFaceDetect(FACE_DETECTION_OFF) < 0) {
- LOGE("%s::mSecCamera->setFaceDetect(%d) fail", __func__, FACE_DETECTION_OFF);
+ ALOGE("%s::mSecCamera->setFaceDetect(%d) fail", __func__, FACE_DETECTION_OFF);
ret = UNKNOWN_ERROR;
}
if (mSecCamera->setFocusMode(new_focus_mode) < 0) {
- LOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode);
+ ALOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_FOCUS_MODE, new_focus_mode_str);
@@ -1798,12 +1798,12 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
else if (!strcmp(new_flash_mode_str, CameraParameters::FLASH_MODE_TORCH))
new_flash_mode = FLASH_MODE_TORCH;
else {
- LOGE("%s::unmatched flash_mode(%s)", __func__, new_flash_mode_str); //red-eye
+ ALOGE("%s::unmatched flash_mode(%s)", __func__, new_flash_mode_str); //red-eye
ret = UNKNOWN_ERROR;
}
if (0 <= new_flash_mode) {
if (mSecCamera->setFlashMode(new_flash_mode) < 0) {
- LOGE("%s::mSecCamera->setFlashMode(%d) fail", __func__, new_flash_mode);
+ ALOGE("%s::mSecCamera->setFlashMode(%d) fail", __func__, new_flash_mode);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_FLASH_MODE, new_flash_mode_str);
@@ -1815,7 +1815,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// scene..
if (0 <= new_scene_mode) {
if (mSecCamera->setSceneMode(new_scene_mode) < 0) {
- LOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode);
+ ALOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_SCENE_MODE, new_scene_mode_str);
@@ -1825,7 +1825,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// touch to focus
const char *new_focus_area = params.get(CameraParameters::KEY_FOCUS_AREAS);
if (new_focus_area != NULL) {
- LOGV("focus area: %s", new_focus_area);
+ ALOGV("focus area: %s", new_focus_area);
SecCameraArea area(new_focus_area);
if (!area.isDummy()) {
@@ -1835,16 +1835,16 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int x = area.getX(width);
int y = area.getY(height);
- LOGV("area=%s, x=%i, y=%i", area.toString8().string(), x, y);
+ ALOGV("area=%s, x=%i, y=%i", area.toString8().string(), x, y);
if (mSecCamera->setObjectPosition(x, y) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setObjectPosition(%s)", __func__, new_focus_area);
+ ALOGE("ERR(%s):Fail on mSecCamera->setObjectPosition(%s)", __func__, new_focus_area);
ret = UNKNOWN_ERROR;
}
}
int val = area.isDummy() ? 0 : 1;
if (mSecCamera->setTouchAFStartStop(val) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setTouchAFStartStop(%d)", __func__, val);
+ ALOGE("ERR(%s):Fail on mSecCamera->setTouchAFStartStop(%d)", __func__, val);
ret = UNKNOWN_ERROR;
}
}
@@ -1852,11 +1852,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// zoom
int new_zoom = params.getInt(CameraParameters::KEY_ZOOM);
int max_zoom = params.getInt(CameraParameters::KEY_MAX_ZOOM);
- LOGV("%s : new_zoom %d", __func__, new_zoom);
+ ALOGV("%s : new_zoom %d", __func__, new_zoom);
if (0 <= new_zoom && new_zoom <= max_zoom) {
- LOGV("%s : set zoom:%d\n", __func__, new_zoom);
+ ALOGV("%s : set zoom:%d\n", __func__, new_zoom);
if (mSecCamera->setZoom(new_zoom) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setZoom(%d)", __func__, new_zoom);
+ ALOGE("ERR(%s):Fail on mSecCamera->setZoom(%d)", __func__, new_zoom);
ret = UNKNOWN_ERROR;
} else {
mParameters.set(CameraParameters::KEY_ZOOM, new_zoom);
@@ -1865,7 +1865,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
} else {
if (!isSupportedParameter(new_focus_mode_str,
mParameters.get(CameraParameters::KEY_SUPPORTED_FOCUS_MODES))) {
- LOGE("%s: Unsupported focus mode: %s", __func__, new_focus_mode_str);
+ ALOGE("%s: Unsupported focus mode: %s", __func__, new_focus_mode_str);
ret = UNKNOWN_ERROR;
}
}
@@ -1890,13 +1890,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
new_image_effect = IMAGE_EFFECT_NEGATIVE;
else {
//posterize, whiteboard, blackboard, solarize
- LOGE("ERR(%s):Invalid effect(%s)", __func__, new_image_effect_str);
+ ALOGE("ERR(%s):Invalid effect(%s)", __func__, new_image_effect_str);
ret = UNKNOWN_ERROR;
}
if (new_image_effect >= 0) {
if (mSecCamera->setImageEffect(new_image_effect) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setImageEffect(effect(%d))", __func__, new_image_effect);
+ ALOGE("ERR(%s):Fail on mSecCamera->setImageEffect(effect(%d))", __func__, new_image_effect);
ret = UNKNOWN_ERROR;
} else {
const char *old_image_effect_str = mParameters.get(CameraParameters::KEY_EFFECT);
@@ -1916,7 +1916,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
int new_vtmode = mInternalParameters.getInt("vtmode");
if (0 <= new_vtmode) {
if (mSecCamera->setVTmode(new_vtmode) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setVTMode(%d)", __func__, new_vtmode);
+ ALOGE("ERR(%s):Fail on mSecCamera->setVTMode(%d)", __func__, new_vtmode);
ret = UNKNOWN_ERROR;
}
}
@@ -1926,7 +1926,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_contrast) {
if (mSecCamera->setContrast(new_contrast) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setContrast(%d)", __func__, new_contrast);
+ ALOGE("ERR(%s):Fail on mSecCamera->setContrast(%d)", __func__, new_contrast);
ret = UNKNOWN_ERROR;
}
}
@@ -1936,7 +1936,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_wdr) {
if (mSecCamera->setWDR(new_wdr) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_wdr);
+ ALOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_wdr);
ret = UNKNOWN_ERROR;
}
}
@@ -1946,7 +1946,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_anti_shake) {
if (mSecCamera->setAntiShake(new_anti_shake) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_anti_shake);
+ ALOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_anti_shake);
ret = UNKNOWN_ERROR;
}
}
@@ -1954,7 +1954,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
// gps latitude
const char *new_gps_latitude_str = params.get(CameraParameters::KEY_GPS_LATITUDE);
if (mSecCamera->setGPSLatitude(new_gps_latitude_str) < 0) {
- LOGE("%s::mSecCamera->setGPSLatitude(%s) fail", __func__, new_gps_latitude_str);
+ ALOGE("%s::mSecCamera->setGPSLatitude(%s) fail", __func__, new_gps_latitude_str);
ret = UNKNOWN_ERROR;
} else {
if (new_gps_latitude_str) {
@@ -1968,7 +1968,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
const char *new_gps_longitude_str = params.get(CameraParameters::KEY_GPS_LONGITUDE);
if (mSecCamera->setGPSLongitude(new_gps_longitude_str) < 0) {
- LOGE("%s::mSecCamera->setGPSLongitude(%s) fail", __func__, new_gps_longitude_str);
+ ALOGE("%s::mSecCamera->setGPSLongitude(%s) fail", __func__, new_gps_longitude_str);
ret = UNKNOWN_ERROR;
} else {
if (new_gps_longitude_str) {
@@ -1982,7 +1982,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
const char *new_gps_altitude_str = params.get(CameraParameters::KEY_GPS_ALTITUDE);
if (mSecCamera->setGPSAltitude(new_gps_altitude_str) < 0) {
- LOGE("%s::mSecCamera->setGPSAltitude(%s) fail", __func__, new_gps_altitude_str);
+ ALOGE("%s::mSecCamera->setGPSAltitude(%s) fail", __func__, new_gps_altitude_str);
ret = UNKNOWN_ERROR;
} else {
if (new_gps_altitude_str) {
@@ -1996,7 +1996,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
const char *new_gps_timestamp_str = params.get(CameraParameters::KEY_GPS_TIMESTAMP);
if (mSecCamera->setGPSTimeStamp(new_gps_timestamp_str) < 0) {
- LOGE("%s::mSecCamera->setGPSTimeStamp(%s) fail", __func__, new_gps_timestamp_str);
+ ALOGE("%s::mSecCamera->setGPSTimeStamp(%s) fail", __func__, new_gps_timestamp_str);
ret = UNKNOWN_ERROR;
} else {
if (new_gps_timestamp_str) {
@@ -2010,7 +2010,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
const char *new_gps_processing_method_str = params.get(CameraParameters::KEY_GPS_PROCESSING_METHOD);
if (mSecCamera->setGPSProcessingMethod(new_gps_processing_method_str) < 0) {
- LOGE("%s::mSecCamera->setGPSProcessingMethod(%s) fail", __func__, new_gps_processing_method_str);
+ ALOGE("%s::mSecCamera->setGPSProcessingMethod(%s) fail", __func__, new_gps_processing_method_str);
ret = UNKNOWN_ERROR;
} else {
if (new_gps_processing_method_str) {
@@ -2026,12 +2026,12 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 < new_recording_width && 0 < new_recording_height) {
if (mSecCamera->setRecordingSize(new_recording_width, new_recording_height) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_recording_width, new_recording_height);
+ ALOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_recording_width, new_recording_height);
ret = UNKNOWN_ERROR;
}
} else {
if (mSecCamera->setRecordingSize(new_preview_width, new_preview_height) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_preview_width, new_preview_height);
+ ALOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_preview_width, new_preview_height);
ret = UNKNOWN_ERROR;
}
}
@@ -2046,13 +2046,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
else if (!strcmp(new_gamma_str, "on"))
new_gamma = GAMMA_ON;
else {
- LOGE("%s::unmatched gamma(%s)", __func__, new_gamma_str);
+ ALOGE("%s::unmatched gamma(%s)", __func__, new_gamma_str);
ret = UNKNOWN_ERROR;
}
if (0 <= new_gamma) {
if (mSecCamera->setGamma(new_gamma) < 0) {
- LOGE("%s::mSecCamera->setGamma(%d) fail", __func__, new_gamma);
+ ALOGE("%s::mSecCamera->setGamma(%d) fail", __func__, new_gamma);
ret = UNKNOWN_ERROR;
}
}
@@ -2069,13 +2069,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
else if (!strcmp(new_slow_ae_str, "on"))
new_slow_ae = SLOW_AE_ON;
else {
- LOGE("%s::unmatched slow_ae(%s)", __func__, new_slow_ae_str);
+ ALOGE("%s::unmatched slow_ae(%s)", __func__, new_slow_ae_str);
ret = UNKNOWN_ERROR;
}
if (0 <= new_slow_ae) {
if (mSecCamera->setSlowAE(new_slow_ae) < 0) {
- LOGE("%s::mSecCamera->setSlowAE(%d) fail", __func__, new_slow_ae);
+ ALOGE("%s::mSecCamera->setSlowAE(%d) fail", __func__, new_slow_ae);
ret = UNKNOWN_ERROR;
}
}
@@ -2086,7 +2086,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_sensor_mode) {
if (mSecCamera->setSensorMode(new_sensor_mode) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setSensorMode(%d)", __func__, new_sensor_mode);
+ ALOGE("ERR(%s):Fail on mSecCamera->setSensorMode(%d)", __func__, new_sensor_mode);
ret = UNKNOWN_ERROR;
}
} else {
@@ -2098,7 +2098,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_shot_mode) {
if (mSecCamera->setShotMode(new_shot_mode) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setShotMode(%d)", __func__, new_shot_mode);
+ ALOGE("ERR(%s):Fail on mSecCamera->setShotMode(%d)", __func__, new_shot_mode);
ret = UNKNOWN_ERROR;
}
} else {
@@ -2110,7 +2110,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_blur_level) {
if (mSecCamera->setBlur(new_blur_level) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setBlur(%d)", __func__, new_blur_level);
+ ALOGE("ERR(%s):Fail on mSecCamera->setBlur(%d)", __func__, new_blur_level);
ret = UNKNOWN_ERROR;
}
}
@@ -2121,24 +2121,24 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (0 <= new_dataline) {
if (mSecCamera->setDataLineCheck(new_dataline) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setDataLineCheck(%d)", __func__, new_dataline);
+ ALOGE("ERR(%s):Fail on mSecCamera->setDataLineCheck(%d)", __func__, new_dataline);
ret = UNKNOWN_ERROR;
}
}
if (mSecCamera->setBatchReflection()) {
- LOGE("ERR(%s):Fail on mSecCamera->setBatchReflection()", __func__);
+ ALOGE("ERR(%s):Fail on mSecCamera->setBatchReflection()", __func__);
ret = UNKNOWN_ERROR;
}
- LOGV("%s return ret = %d", __func__, ret);
+ ALOGV("%s return ret = %d", __func__, ret);
return ret;
}
CameraParameters CameraHardwareSec::getParameters() const
{
- LOGV("%s :", __func__);
+ ALOGV("%s :", __func__);
return mParameters;
}
@@ -2149,7 +2149,7 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a
void CameraHardwareSec::release()
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
/* shut down any threads we have that might be running. do it here
* instead of the destructor. we're guaranteed to be on another thread
@@ -2211,7 +2211,7 @@ status_t CameraHardwareSec::storeMetaDataInBuffers(bool enable)
// metadata buffer mode can be turned on or off.
// Samsung needs to fix this.
if (!enable) {
- LOGE("Non-metadata buffer mode is not supported!");
+ ALOGE("Non-metadata buffer mode is not supported!");
return INVALID_OPERATION;
}
return OK;
@@ -2236,7 +2236,7 @@ static camera_device_t *g_cam_device;
static int HAL_camera_device_close(struct hw_device_t* device)
{
- LOGI("%s", __func__);
+ ALOGI("%s", __func__);
if (device) {
camera_device_t *cam_device = (camera_device_t *)device;
delete static_cast<CameraHardwareSec *>(cam_device->priv);
@@ -2255,7 +2255,7 @@ static inline CameraHardwareSec *obj(struct camera_device *dev)
static int HAL_camera_device_set_preview_window(struct camera_device *dev,
struct preview_stream_ops *buf)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->setPreviewWindow(buf);
}
@@ -2267,7 +2267,7 @@ static void HAL_camera_device_set_callbacks(struct camera_device *dev,
camera_request_memory get_memory,
void* user)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->setCallbacks(notify_cb, data_cb, data_cb_timestamp,
get_memory,
user);
@@ -2283,7 +2283,7 @@ static void HAL_camera_device_set_callbacks(struct camera_device *dev,
*/
static void HAL_camera_device_enable_msg_type(struct camera_device *dev, int32_t msg_type)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->enableMsgType(msg_type);
}
@@ -2299,7 +2299,7 @@ static void HAL_camera_device_enable_msg_type(struct camera_device *dev, int32_t
*/
static void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_t msg_type)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->disableMsgType(msg_type);
}
@@ -2310,7 +2310,7 @@ static void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_
*/
static int HAL_camera_device_msg_type_enabled(struct camera_device *dev, int32_t msg_type)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->msgTypeEnabled(msg_type);
}
@@ -2319,7 +2319,7 @@ static int HAL_camera_device_msg_type_enabled(struct camera_device *dev, int32_t
*/
static int HAL_camera_device_start_preview(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->startPreview();
}
@@ -2328,7 +2328,7 @@ static int HAL_camera_device_start_preview(struct camera_device *dev)
*/
static void HAL_camera_device_stop_preview(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->stopPreview();
}
@@ -2337,7 +2337,7 @@ static void HAL_camera_device_stop_preview(struct camera_device *dev)
*/
static int HAL_camera_device_preview_enabled(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->previewEnabled();
}
@@ -2373,7 +2373,7 @@ static int HAL_camera_device_preview_enabled(struct camera_device *dev)
*/
static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *dev, int enable)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->storeMetaDataInBuffers(enable);
}
@@ -2389,7 +2389,7 @@ static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *de
*/
static int HAL_camera_device_start_recording(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->startRecording();
}
@@ -2398,7 +2398,7 @@ static int HAL_camera_device_start_recording(struct camera_device *dev)
*/
static void HAL_camera_device_stop_recording(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->stopRecording();
}
@@ -2407,7 +2407,7 @@ static void HAL_camera_device_stop_recording(struct camera_device *dev)
*/
static int HAL_camera_device_recording_enabled(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->recordingEnabled();
}
@@ -2423,7 +2423,7 @@ static int HAL_camera_device_recording_enabled(struct camera_device *dev)
static void HAL_camera_device_release_recording_frame(struct camera_device *dev,
const void *opaque)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->releaseRecordingFrame(opaque);
}
@@ -2434,7 +2434,7 @@ static void HAL_camera_device_release_recording_frame(struct camera_device *dev,
*/
static int HAL_camera_device_auto_focus(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->autoFocus();
}
@@ -2446,7 +2446,7 @@ static int HAL_camera_device_auto_focus(struct camera_device *dev)
*/
static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->cancelAutoFocus();
}
@@ -2455,7 +2455,7 @@ static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev)
*/
static int HAL_camera_device_take_picture(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->takePicture();
}
@@ -2465,7 +2465,7 @@ static int HAL_camera_device_take_picture(struct camera_device *dev)
*/
static int HAL_camera_device_cancel_picture(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->cancelPicture();
}
@@ -2476,7 +2476,7 @@ static int HAL_camera_device_cancel_picture(struct camera_device *dev)
static int HAL_camera_device_set_parameters(struct camera_device *dev,
const char *parms)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
String8 str(parms);
CameraParameters p(str);
return obj(dev)->setParameters(p);
@@ -2485,7 +2485,7 @@ static int HAL_camera_device_set_parameters(struct camera_device *dev,
/** Return the camera parameters. */
char *HAL_camera_device_get_parameters(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
String8 str;
CameraParameters parms = obj(dev)->getParameters();
str = parms.flatten();
@@ -2494,7 +2494,7 @@ char *HAL_camera_device_get_parameters(struct camera_device *dev)
void HAL_camera_device_put_parameters(struct camera_device *dev, char *parms)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
free(parms);
}
@@ -2504,7 +2504,7 @@ void HAL_camera_device_put_parameters(struct camera_device *dev, char *parms)
static int HAL_camera_device_send_command(struct camera_device *dev,
int32_t cmd, int32_t arg1, int32_t arg2)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->sendCommand(cmd, arg1, arg2);
}
@@ -2514,7 +2514,7 @@ static int HAL_camera_device_send_command(struct camera_device *dev,
*/
static void HAL_camera_device_release(struct camera_device *dev)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
obj(dev)->release();
}
@@ -2523,19 +2523,19 @@ static void HAL_camera_device_release(struct camera_device *dev)
*/
static int HAL_camera_device_dump(struct camera_device *dev, int fd)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return obj(dev)->dump(fd);
}
static int HAL_getNumberOfCameras()
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]);
}
static int HAL_getCameraInfo(int cameraId, struct camera_info *cameraInfo)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
return 0;
}
@@ -2574,20 +2574,20 @@ static int HAL_camera_device_open(const struct hw_module_t* module,
const char *id,
struct hw_device_t** device)
{
- LOGV("%s", __func__);
+ ALOGV("%s", __func__);
int cameraId = atoi(id);
if (cameraId < 0 || cameraId >= HAL_getNumberOfCameras()) {
- LOGE("Invalid camera ID %s", id);
+ ALOGE("Invalid camera ID %s", id);
return -EINVAL;
}
if (g_cam_device) {
if (obj(g_cam_device)->getCameraId() == cameraId) {
- LOGV("returning existing camera ID %s", id);
+ ALOGV("returning existing camera ID %s", id);
goto done;
} else {
- LOGE("Cannot open camera %d. camera %d is already running!",
+ ALOGE("Cannot open camera %d. camera %d is already running!",
cameraId, obj(g_cam_device)->getCameraId());
return -ENOSYS;
}
@@ -2604,13 +2604,13 @@ static int HAL_camera_device_open(const struct hw_module_t* module,
g_cam_device->ops = &camera_device_ops;
- LOGI("%s: open camera %s", __func__, id);
+ ALOGI("%s: open camera %s", __func__, id);
g_cam_device->priv = new CameraHardwareSec(cameraId, g_cam_device);
done:
*device = (hw_device_t *)g_cam_device;
- LOGI("%s: opened camera %s (%p)", __func__, id, *device);
+ ALOGI("%s: opened camera %s (%p)", __func__, id, *device);
return 0;
}