Change type of parameters for thumbnail
[platform/core/multimedia/libmedia-thumbnail.git] / src / include / media-thumb-internal.h
1 /*
2  * libmedia-thumbnail
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyunjun Ko <zzoon.ko@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #include <stdbool.h>
23 #include <media-util-err.h>
24 #include "media-thumbnail.h"
25 #include "media-thumb-util.h"
26
27 #ifndef _MEDIA_THUMB_INTERNAL_H_
28 #define _MEDIA_THUMB_INTERNAL_H_
29
30 /* The maximum of resolution to be able to get thumbnail is 3000 x 3000, except for only jpeg */
31 #define THUMB_MAX_ALLOWED_MEM_FOR_THUMB 9000000
32
33 typedef struct {
34         size_t size;
35         unsigned int width;
36         unsigned int height;
37         unsigned char *data;
38 } media_thumb_info;
39
40 typedef struct {
41         ThumbFunc func;
42         void *user_data;
43 } thumbUserData;
44
45 typedef struct {
46         ThumbRawFunc func;
47         void *user_data;
48 } thumbRawUserData;
49
50 int _media_thumb_image(const char *origin_path, char *thumb_path, unsigned int thumb_width, unsigned int thumb_height, media_thumb_info *thumb_info);
51 int _media_thumb_video(const char *origin_path, const char *thumb_path, unsigned int thumb_width, unsigned int thumb_height, media_thumb_info *thumb_info);
52 int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid);
53
54 #endif /*_MEDIA_THUMB_INTERNAL_H_*/