34aa4cebefea72ff6e31f36d8d92f90d2e29acb7
[platform/core/multimedia/libmm-utility.git] / anim / include / mm_util_anim.h
1 /*
2 * Copyright (c) 2020 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_ANIM_H__
18 #define __MM_UTIL_ANIM_H__
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include <stdbool.h>
25 #include "mm_util_type.h"
26
27 typedef void *mm_util_anim_enc_h;
28
29 int mm_util_anim_enc_create(mm_util_anim_codec_type type, mm_util_anim_enc_h *anim_enc_h);
30 int mm_util_anim_enc_set_bgcolor(mm_util_anim_enc_h anim_enc_h, unsigned char r, unsigned char g, unsigned char b, unsigned char a);
31 int mm_util_anim_enc_set_loop_count(mm_util_anim_enc_h anim_enc_h, unsigned int loop_count);
32 int mm_util_anim_enc_set_lossless(mm_util_anim_enc_h anim_enc_h, bool lossless);
33 int mm_util_anim_enc_add_image(mm_util_anim_enc_h anim_enc_h, mm_util_image_h image);
34 int mm_util_anim_enc_save_to_file(mm_util_anim_enc_h anim_enc_h, const char *path);
35 int mm_util_anim_enc_save_to_buffer(mm_util_anim_enc_h anim_enc_h, unsigned char **buf, size_t *buf_size);
36 void mm_util_anim_enc_destroy(mm_util_anim_enc_h anim_enc_h);
37
38 #ifdef __cplusplus
39 }
40 #endif
41 #endif    /*__MM_UTIL_ANIM_H__*/