2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__
18 #define __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__
20 #include <image_util_type.h>
35 #define LOG_TAG "CAPI_MEDIA_IMAGE_UTIL"
37 #define FONT_COLOR_RESET "\033[0m"
38 #define FONT_COLOR_RED "\033[31m"
40 #define image_util_debug(fmt, arg...) do { \
41 LOGD(FONT_COLOR_RESET""fmt""FONT_COLOR_RESET, ##arg); \
44 #define image_util_error(fmt, arg...) do { \
45 LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
48 #define image_util_warning(fmt, arg...) do { \
49 LOGW(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
52 #define image_util_retm_if(expr, fmt, arg...) do { \
54 LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
59 #define image_util_retvm_if(expr, val, fmt, arg...) do { \
61 LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
66 #define DEPRECATION_LOGW(deprecated, instead) do { \
67 image_util_warning("DEPRECATION WARNING: %s is deprecated and will be removed from next release. Use %s instead.", deprecated, instead); \
70 #define IMGCV_FUNC_NAME "mm_util_cv_extract_representative_color"
71 #define PATH_MMUTIL_IMGCV_LIB PATH_LIBDIR"/libmmutil_imgcv.so"
72 typedef gboolean(*ModuleFunc)(void *, int, int, unsigned char *, unsigned char *, unsigned char *);
77 image_util_transform_completed_cb image_processing_completed_cb;
83 image_util_colorspace_e colorspace;
84 image_util_rotation_e dest_rotation;
85 bool hardware_acceleration;
86 mm_util_imgp_h image_h;
87 image_util_cb_s *_util_cb;
90 image_util_rotation_e rotation;
103 image_util_decode_completed_cb image_decode_completed_cb;
108 image_util_encode_completed_cb image_encode_completed_cb;
112 image_util_type_e image_type;
114 unsigned long long src_size;
116 unsigned long long dst_size;
118 mm_util_imgp_h image_h;
120 unsigned long height;
123 unsigned int image_count;
124 unsigned int current_buffer_count;
125 unsigned int current_resolution_count;
126 unsigned int current_delay_count;
127 image_util_colorspace_e colorspace;
128 image_util_scale_e down_scale;
129 decode_cb_s *_decode_cb;
130 encode_cb_s *_encode_cb;
132 /* for multi instance */
148 #endif /* __TIZEN_MEDIA_IMAGE_UTIL_PRIVATE_H__ */