1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* libmedia-thumbnail
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: Hyunjun Ko <zzoon.ko@samsung.com>
*
* 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.
*
*/
#include <stdbool.h>
#include <media-util-err.h>
#include "media-thumbnail.h"
#include "media-thumb-util.h"
#ifndef _MEDIA_THUMB_INTERNAL_H_
#define _MEDIA_THUMB_INTERNAL_H_
/* The maximum of resolution to be able to get thumbnail is 3000 x 3000, except for only jpeg */
#define THUMB_MAX_ALLOWED_MEM_FOR_THUMB 9000000
typedef struct {
int size;
int width;
int height;
unsigned char *data;
} media_thumb_info;
typedef struct {
ThumbFunc func;
void *user_data;
} thumbUserData;
typedef struct {
ThumbRawFunc func;
void *user_data;
} thumbRawUserData;
int _media_thumb_image(const char *origin_path, char *thumb_path, int thumb_width, int thumb_height, media_thumb_info *thumb_info);
int _media_thumb_video(const char *origin_path, const char *thumb_path, int thumb_width, int thumb_height, media_thumb_info *thumb_info);
int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid);
#endif /*_MEDIA_THUMB_INTERNAL_H_*/
|