#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <sys/vfs.h> /* struct statfs */
#include <sys/time.h> /* gettimeofday */
#include <sys/stat.h>
#include "mm_camcorder_internal.h"
#include "mm_camcorder_util.h"
#include "mm_camcorder_sound.h"
+#include <mm_util_image.h>
#include <mm_util_imgp.h>
#include <mm_util_jpeg.h>
buf_size = buf_size - 8; /* include tag */
}
- _mmcam_dbg_log("seek %lu", buf_size);
+ _mmcam_dbg_log("seek %"PRIu64, buf_size);
if (fseeko(f, (off_t)buf_size, SEEK_CUR) != 0) {
_mmcam_dbg_err("fseeko() fail");
return FALSE;
buf_size = buf_size - 8; /* include tag */
}
- _mmcam_dbg_log("seek %lu", buf_size);
+ _mmcam_dbg_log("seek %"PRIu64, buf_size);
if (fseeko(f, (off_t)buf_size, SEEK_CUR) != 0) {
_mmcam_dbg_err("fseeko() fail");
return FALSE;
result = result | (temp << 8);
result = result | size[3];
- _mmcam_dbg_log("result : %lu", result);
+ _mmcam_dbg_log("result : %"G_GUINT64_FORMAT, result);
return result;
}
result = result | (temp << 8);
result = result | size[7];
- _mmcam_dbg_log("result : %lu", result);
+ _mmcam_dbg_log("result : %"G_GUINT64_FORMAT, result);
return result;
}
*free_space = vfs.f_bsize * vfs.f_bavail;
/*
_mmcam_dbg_log("vfs.f_bsize [%lu], vfs.f_bavail [%lu]", vfs.f_bsize, vfs.f_bavail);
- _mmcam_dbg_log("memory size %lu [%s]", *free_space, path);
+ _mmcam_dbg_log("memory size %"G_GUINT64_FORMAT" [%s]", *free_space, path);
*/
return 0;
}
int ret = TRUE;
int mm_ret = MM_ERROR_NONE;
int input_format = MM_UTIL_COLOR_YUV420;
+ mm_util_image_h src_image = NULL;
+ mm_util_image_h dst_image = NULL;
if (!src_data || !dst_data || !dst_width || !dst_height || !dst_length) {
_mmcam_dbg_err("something is NULL %p,%p,%p,%p,%p",
_mmcam_dbg_log("src size %dx%d -> dst size %dx%d", src_width, src_height, *dst_width, *dst_height);
- mm_ret = mm_util_resize_image(src_data, src_width, src_height, input_format,
- *dst_width, *dst_height, dst_data, dst_width, dst_height, dst_length);
+ mm_ret = mm_image_create_image(src_width, src_height, input_format, src_data, (size_t)src_length, &src_image);
+ if (mm_ret != MM_ERROR_NONE) {
+ GST_ERROR("mm_image_create_image failed 0x%x", ret);
+ return FALSE;
+ }
+ mm_ret = mm_util_resize_image(src_image, *dst_width, *dst_height, &dst_image);
+ mm_image_destroy_image(src_image);
if (mm_ret != MM_ERROR_NONE) {
GST_ERROR("mm_util_resize_image failed 0x%x", ret);
return FALSE;
}
+ mm_ret = mm_image_get_image(dst_image, dst_width, dst_height, NULL, dst_data, dst_length);
+ mm_image_destroy_image(dst_image);
+ if (mm_ret != MM_ERROR_NONE) {
+ GST_ERROR("mm_image_get_image failed 0x%x", ret);
+ return FALSE;
+ }
+
_mmcam_dbg_log("resize done %dx%d -> %dx%d, %p, length %zu",
src_width, src_height, *dst_width, *dst_height, *dst_data, *dst_length);