Use stdbool instead of gboolean
[platform/core/multimedia/libmm-utility.git] / common / include / mm_util_image.h
1 /*
2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 #ifndef __MM_UTIL_IMAGE_H__
18 #define __MM_UTIL_IMAGE_H__
19
20 #include <stdint.h>
21 #include "mm_util_type.h"
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define TEMP_DATA_SIZE  SIZE_MAX        //To be removed
28
29 bool mm_image_is_valid_image(mm_util_image_h image);
30 void mm_image_debug_image(mm_util_image_h image, const char *message);
31
32 int mm_image_create_image(unsigned int width, unsigned int height,
33                 mm_util_color_format_e color, const unsigned char *data, size_t size,
34                 mm_util_image_h *image);
35 int mm_image_create_image2(unsigned int width, unsigned int height,
36                 mm_util_color_format_e color, const unsigned char *data, size_t size,
37                 mm_util_image_h *image);
38 int mm_image_clone_image(mm_util_image_h src, mm_util_image_h *dst);
39 int mm_image_set_delay_time(mm_util_image_h image, unsigned int delay_time);
40 int mm_image_get_delay_time(mm_util_image_h image, unsigned int *delay_time);
41 /* After @data is used, it must be released using free().*/
42 int mm_image_get_image(mm_util_image_h image, unsigned int *width,
43                 unsigned int *height, mm_util_color_format_e *color,
44                 unsigned char **data, size_t *size);
45
46 void mm_image_destroy_image(mm_util_image_h image);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif    /*__MM_UTIL_IMAGE_H__*/