summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-12-06 19:21:00 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-12-06 19:21:00 +0100
commit8d57bd027ab7f354e1707510d3ba5654ba16c0aa (patch)
treecc97bee06f5baeb174c67adf8910a9e469892909
parent0ded58328e444217dea007e46eb51564dcf5d092 (diff)
downloaddevice_samsung_smdk4412-common-8d57bd027ab7f354e1707510d3ba5654ba16c0aa.zip
device_samsung_smdk4412-common-8d57bd027ab7f354e1707510d3ba5654ba16c0aa.tar.gz
device_samsung_smdk4412-common-8d57bd027ab7f354e1707510d3ba5654ba16c0aa.tar.bz2
be more verbose in the camera threadHEADmaster
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--camera/smdk4x12_camera.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/camera/smdk4x12_camera.c b/camera/smdk4x12_camera.c
index 8cb5cea..53cc16f 100644
--- a/camera/smdk4x12_camera.c
+++ b/camera/smdk4x12_camera.c
@@ -2641,7 +2641,7 @@ int smdk4x12_camera_picture_callback(struct smdk4x12_camera *smdk4x12_camera,
if (smdk4x12_camera == NULL || buffers == NULL || buffers_count <= 0)
return -EINVAL;
-// ALOGD("%s()", __func__);
+ ALOGD("%s()", __func__);
width = smdk4x12_camera->picture_width;
height = smdk4x12_camera->picture_height;
@@ -2659,7 +2659,9 @@ int smdk4x12_camera_picture_callback(struct smdk4x12_camera *smdk4x12_camera,
return 0;
}
+ ALOGE("%s: locking picture_mutex", __func__);
pthread_mutex_lock(&smdk4x12_camera->picture_mutex);
+ ALOGE("%s: locked picture_mutex", __func__);
if (!smdk4x12_camera->picture_enabled && !smdk4x12_camera->camera_fimc_is) {
if (smdk4x12_camera->camera_capture_format == V4L2_PIX_FMT_INTERLEAVED && smdk4x12_camera->zoom == 0 && smdk4x12_camera->focus_mode == FOCUS_MODE_CONTINOUS_PICTURE) {
@@ -2710,7 +2712,9 @@ int smdk4x12_camera_picture_callback(struct smdk4x12_camera *smdk4x12_camera,
return 0;
}
+ ALOGE("%s: unlocking picture_mutex", __func__);
pthread_mutex_unlock(&smdk4x12_camera->picture_mutex);
+ ALOGE("%s: unlocked picture_mutex", __func__);
smdk4x12_camera->picture_listener->busy = 1;
@@ -2734,7 +2738,7 @@ buffers_continue:
}
if (jpeg_buffer == NULL && yuv_buffer == NULL) {
-// ALOGE("%s: Unable to find an appropriate buffer for picture", __func__);
+ ALOGE("%s: Unable to find an appropriate buffer for picture", __func__);
smdk4x12_camera->picture_listener->busy = 0;
return 0;
}
@@ -2949,6 +2953,8 @@ int smdk4x12_camera_picture(struct smdk4x12_camera *smdk4x12_camera)
}
}
+ ALOGE("%s: finished jpeg", __func__);
+
// Thumbnail
if (jpeg_thumbnail_data == NULL) {
@@ -3052,6 +3058,8 @@ int smdk4x12_camera_picture(struct smdk4x12_camera *smdk4x12_camera)
}
}
+ ALOGE("%s: Thumbnail finished", __func__);
+
// EXIF
memset(&exif, 0, sizeof(exif));
@@ -3083,6 +3091,8 @@ int smdk4x12_camera_picture(struct smdk4x12_camera *smdk4x12_camera)
goto error;
}
+ ALOGE("%s: exif finished", __func__);
+
p = (unsigned char *) memory->data;
// Copy the first two bytes of the JPEG picture
@@ -3144,16 +3154,20 @@ void *smdk4x12_camera_picture_thread(void *data)
smdk4x12_camera->picture_thread_running = 1;
while (smdk4x12_camera->picture_thread_enabled) {
+ ALOGE("%s: in while loop", __func__);
pthread_mutex_lock(&smdk4x12_camera->picture_lock_mutex);
-
+ ALOGE("%s: lock_mutex locked", __func__);
pthread_mutex_lock(&smdk4x12_camera->picture_mutex);
+ ALOGE("%s: picture_mutex locked", __func__);
if (smdk4x12_camera->picture_listener == NULL) {
+ ALOGE("%s: no listener", __func__);
pthread_mutex_unlock(&smdk4x12_camera->picture_mutex);
break;
}
if (smdk4x12_camera->picture_listener->busy) {
+ ALOGE("%s: listener busy", __func__);
rc = smdk4x12_camera_picture(smdk4x12_camera);
if (rc < 0) {
ALOGE("%s: Unable to take picture", __func__);
@@ -3163,12 +3177,15 @@ void *smdk4x12_camera_picture_thread(void *data)
}
pthread_mutex_unlock(&smdk4x12_camera->picture_mutex);
+ ALOGE("%s: picture_mutex unlocked", __func__);
if (smdk4x12_camera->picture_completed) {
+ ALOGE("%s: picture completed", __func__);
smdk4x12_camera->picture_thread_running = 0;
smdk4x12_camera_picture_thread_stop(smdk4x12_camera);
break;
}
+ ALOGE("%s: still while loop", __func__);
}
smdk4x12_camera->picture_thread_running = 0;