From: Jiyong Min Date: Tue, 3 Jan 2017 07:50:01 +0000 (+0900) Subject: Merge branch 'tizen_3.0' into tizen X-Git-Tag: submit/tizen/20170323.063443~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03279b69e659159b0889018fba2bfb8d14bbd431;p=platform%2Fcore%2Fapi%2Fimage-util.git Merge branch 'tizen_3.0' into tizen Conflicts: include/wearable/image_util.h include/wearable/image_util_private.h Change-Id: I577231fd6a55f0ed1acff225a2c8803b73779c86 Signed-off-by: jiyong.min --- 03279b69e659159b0889018fba2bfb8d14bbd431 diff --cc include/image_util_private.h index a339aa7,0000000..eef9732 mode 100755,000000..100755 --- a/include/image_util_private.h +++ b/include/image_util_private.h @@@ -1,148 -1,0 +1,145 @@@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__ +#define __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__ + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef LOG_TAG +#undef LOG_TAG +#endif + +#define LOG_TAG "CAPI_MEDIA_IMAGE_UTIL" + +#define FONT_COLOR_RESET "\033[0m" +#define FONT_COLOR_RED "\033[31m" + +#define image_util_debug(fmt, arg...) do { \ + LOGD(FONT_COLOR_RESET""fmt""FONT_COLOR_RESET, ##arg); \ + } while (0) + +#define image_util_error(fmt, arg...) do { \ + LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + } while (0) + +#define image_util_warning(fmt, arg...) do { \ + LOGW(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + } while (0) + +#define image_util_retm_if(expr, fmt, arg...) do { \ + if (expr) { \ + LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + return; \ + } \ + } while (0) + +#define image_util_retvm_if(expr, val, fmt, arg...) do { \ + if (expr) { \ + LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + return (val); \ + } \ + } while (0) + +#define DEPRECATION_LOGW(deprecated, instead) do { \ + image_util_warning("DEPRECATION WARNING: %s is deprecated and will be removed from next release. Use %s instead.", deprecated, instead); \ + } while (0) + +#define IMGCV_FUNC_NAME "mm_util_cv_extract_representative_color" +#define PATH_MMUTIL_IMGCV_LIB PATH_LIBDIR"/libmmutil_imgcv.so" +typedef gboolean(*ModuleFunc)(void *, int, int, unsigned char *, unsigned char *, unsigned char *); + +typedef struct { + void *user_data; + media_packet_h dst; + image_util_transform_completed_cb image_processing_completed_cb; +} image_util_cb_s; + +typedef struct { + media_packet_h src; + media_packet_h dst; + image_util_colorspace_e colorspace; + image_util_rotation_e dest_rotation; + bool hardware_acceleration; + mm_util_imgp_h image_h; + image_util_cb_s *_util_cb; + unsigned int width; + unsigned int height; + image_util_rotation_e rotation; + unsigned int start_x; + unsigned int start_y; + unsigned int end_x; + unsigned int end_y; + bool set_convert; + bool set_resize; + bool set_rotate; + bool set_crop; +} transformation_s; + +typedef struct { + void *user_data; + image_util_decode_completed_cb image_decode_completed_cb; +} decode_cb_s; + +typedef struct { + void *user_data; + image_util_encode_completed_cb image_encode_completed_cb; +} encode_cb_s; + +typedef struct { + image_util_type_e image_type; + void **src_buffer; + unsigned long long src_size; + void **dst_buffer; + unsigned long long dst_size; + const char *path; + mm_util_imgp_h image_h; + unsigned long width; + unsigned long height; + bool is_decode; + int quality; + unsigned int image_count; + unsigned int current_buffer_count; + unsigned int current_resolution_count; + unsigned int current_delay_count; + image_util_colorspace_e colorspace; + image_util_scale_e down_scale; + decode_cb_s *_decode_cb; + encode_cb_s *_encode_cb; + - /* for multi instance */ - GCond thread_cond; - GMutex thread_mutex; ++ /* for async */ + GThread *thread; - - bool is_finish; ++ GAsyncQueue *async_queue; +} decode_encode_s; + +/** +* @} +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__ */