thumb_dbg_slog("Thumb path : %s", thumb_path);
- if (g_file_test(thumb_path, G_FILE_TEST_IS_REGULAR)) {
- thumb_warn("thumb path already exists in file system.. remove the existed file");
- _media_thumb_remove_file(thumb_path);
- }
-
err = _thumbnail_get_data(origin_path, thumb_path);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_thumbnail_get_data failed - %d", err);
+++ /dev/null
-SET(TEST-THUMB "test-thumb.c")
-
-INCLUDE(FindPkgConfig)
- pkg_check_modules(pkgs REQUIRED glib-2.0 gthread-2.0 dlog mm-fileinfo aul libmedia-utils libtzplatform-config)
-
-FOREACH(flag ${pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
-
-ADD_EXECUTABLE(test-thumb ${TEST-THUMB})
-TARGET_LINK_LIBRARIES(test-thumb ${pkgs_LDFLAGS} ${MEDIATHUMB-LIB} )
+++ /dev/null
-/*
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-
-#include "media-thumbnail.h"
-#include "thumb-server-internal.h"
-#include "media-thumb-debug.h"
-#include "media-thumb-ipc.h"
-#include "media-thumb-util.h"
-
-int main(int argc, char *argv[])
-{
- int mode;
- int err = -1;
- unsigned int req_id = 0;
- const char *origin_path = NULL;
-
- if ((argc != 3) && (argc != 4)) {
- printf("Usage: %s [test mode number] [path]\n", argv[0]);
- return -1;
- }
-
- mode = atoi(argv[1]);
- origin_path = argv[2];
-
- if (origin_path && (mode == 1)) {
- printf("Test _thumbnail_get_data\n");
-#if 0
- char *thumb_path = "thumbnail_path.jpg";
-
- //long start = thumb_get_debug_time();
-
- err = _thumbnail_get_data(origin_path, thumb_path);
- if (err < 0) {
- printf("_thumbnail_get_data failed - %d\n", err);
- return -1;
- }
-
- //long end = thumb_get_debug_time();
- //printf("Time : %f\n", ((double)(end - start) / (double)CLOCKS_PER_SEC));
-#endif
- } else if (mode == 2) {
- printf("Test thumbnail_request_cancel_media\n");
-
- err = thumbnail_request_cancel_media(req_id);
- if (err < 0) {
- printf("thumbnail_request_cancel_media failed : %d\n", err);
- return -1;
- } else {
- printf("thumbnail_request_cancel_media success!\n");
- }
- }
-
- thumb_dbg("Test is Completed");
-
- return 0;
-}
-