* limitations under the License.
*/
-#include "assert.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include "tct_common.h"
#include <glib.h>
-#include <string.h>
#include <thumbnail_util.h>
-#include <storage.h>
-#include "tct_common.h"
-
-#define MEDIA_IMAGE_WIDTH 512
-#define MEDIA_IMAGE_HEIGHT 288
-#define API_NAMESPACE "[THUMBNAIL-UTIL]"
+#define THUMB_WIDTH 320
+#define THUMB_HEIGHT 240
+#define PATH_MAX 4096
-#define SAFE_FREE(src) { if(src) {free(src); src = NULL;}}
+#define API_NAMESPACE "[THUMBNAIL-UTIL]"
-static thumbnail_h g_thumb_h = NULL;
-static int _startup_error = 0;
static int _retv = 0;
-static char *image_path = "sample.jpg";
-static char *video_path = "sample.mp4";
-static char *unsupported_image = "sample.tif";
-static char *thumb_path = "thumbnail.jpg";
-static char *unsupported_thumb = "thumbnail.png";
-
-static char *g_image_path = NULL;
-static char *g_video_path = NULL;
-static char *g_unsupported_image_path = NULL;
-static char *g_thumb_path = NULL;
-static char *g_unsupported_thumb_path = NULL;
+static const char *image = "res/sample.jpg";
+static const char *video = "res/sample.mp4";
+static const char *unsupported_image = "res/sample.tif";
+static const char *thumb = "res/thumbnail.jpg";
+static const char *unsupported_thumb = "res/thumbnail.png";
+
+static char g_image_path[PATH_MAX + 1] = { 0, };
+static char g_video_path[PATH_MAX + 1] = { 0, };
+static char g_unsupported_image_path[PATH_MAX + 1] = { 0, };
+static char g_thumb_path[PATH_MAX + 1] = { 0, };
+static char g_unsupported_thumb_path[PATH_MAX + 1] = { 0, };
+
GSource *source = NULL;
GMainContext *context = NULL;
GMainLoop *g_loop = NULL;
*/
void utc_thumbnail_util_startup(void)
{
- char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
- if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
- {
- PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
- g_image_path=(char*)malloc(strlen(pszValue)+strlen(image_path)+6);
- snprintf(g_image_path, strlen(pszValue)+strlen(image_path)+6, "%s/res/%s", pszValue, image_path);
- g_video_path=(char*)malloc(strlen(pszValue)+strlen(video_path)+6);
- snprintf(g_video_path, strlen(pszValue)+strlen(video_path)+6, "%s/res/%s", pszValue, video_path);
- g_unsupported_image_path=(char*)malloc(strlen(pszValue)+strlen(unsupported_image)+6);
- snprintf(g_unsupported_image_path, strlen(pszValue)+strlen(unsupported_image)+6, "%s/res/%s", pszValue, unsupported_image);
- g_thumb_path=(char*)malloc(strlen(pszValue)+strlen(thumb_path)+6);
- snprintf(g_thumb_path, strlen(pszValue)+strlen(thumb_path)+6, "%s/res/%s", pszValue, thumb_path);
- g_unsupported_thumb_path=(char*)malloc(strlen(pszValue)+strlen(unsupported_thumb)+6);
- snprintf(g_unsupported_thumb_path, strlen(pszValue)+strlen(unsupported_thumb)+6, "%s/res/%s", pszValue, unsupported_thumb);
- }
- else
- {
- PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
- }
+ char pszValue[CONFIG_VALUE_LEN_MAX] = { 0, };
+
+ if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE)) {
+ PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
- if (THUMBNAIL_UTIL_ERROR_NONE != thumbnail_util_create(&g_thumb_h)) {
- _startup_error = 1;
+ snprintf(g_image_path, PATH_MAX, "%s/%s", pszValue, image);
+ snprintf(g_video_path, PATH_MAX, "%s/%s", pszValue, video);
+ snprintf(g_unsupported_image_path, PATH_MAX, "%s/%s", pszValue, unsupported_image);
+ snprintf(g_thumb_path, PATH_MAX, "%s/%s", pszValue, thumb);
+ snprintf(g_unsupported_thumb_path, PATH_MAX, "%s/%s", pszValue, unsupported_thumb);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
}
}
*/
void utc_thumbnail_util_cleanup(void)
{
- if (g_thumb_h) {
- if (THUMBNAIL_UTIL_ERROR_NONE != thumbnail_util_destroy(g_thumb_h)) {
- fprintf(stderr, "Cleanup function error - can affect other tests.");
- }
- }
-
- if (g_image_path) free(g_image_path);
- if (g_video_path) free(g_video_path);
- if (g_unsupported_image_path) free(g_unsupported_image_path);
- if (g_thumb_path) free(g_thumb_path);
- if (g_unsupported_thumb_path) free(g_unsupported_thumb_path);
+ memset(&g_image_path, 0, PATH_MAX + 1);
+ memset(&g_video_path, 0, PATH_MAX + 1);
+ memset(&g_unsupported_image_path, 0, PATH_MAX + 1);
+ memset(&g_thumb_path, 0, PATH_MAX + 1);
+ memset(&g_unsupported_thumb_path, 0, PATH_MAX + 1);
}
/**
*/
int utc_thumbnail_util_create_n(void)
{
- int ret = thumbnail_util_create(NULL);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ ret = thumbnail_util_create(NULL);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_create_p(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
+
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
- int ret = thumbnail_util_destroy(g_thumb_h);
- ret = thumbnail_util_create(&g_thumb_h);
+ ret = thumbnail_util_destroy(thumb);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
return 0;
}
-void thumbnail_completed_cb(thumbnail_util_error_e error, int request_id, const char *path, int raw_width, int raw_height, unsigned char *raw_data, int raw_size, void *user_data)
+void thumbnail_completed_cb(thumbnail_util_error_e e, const char *id, int width, int height, unsigned char *data, int size, void *user_data)
{
- _retv = error;
- PRINT_UTC_LOG("[Line : %d][%s] thumbnail_completed_cb returned %d(%0x) error\\n", __LINE__, API_NAMESPACE, error, error);
+ _retv = e;
+ PRINT_UTC_LOG("[Line : %d][%s] thumbnail_completed_cb returned %d(%0x) error\\n", __LINE__, API_NAMESPACE, e, e);
g_main_loop_quit(g_loop);
}
{
int ret = THUMBNAIL_UTIL_ERROR_NONE;
char *request_id = NULL;
+ thumbnail_h test_info = NULL;
- thumbnail_h test_info;
- thumbnail_util_create(&test_info);
- thumbnail_util_set_path(test_info, g_image_path);
- thumbnail_util_set_size(test_info, MEDIA_IMAGE_WIDTH, MEDIA_IMAGE_HEIGHT);
- ret = thumbnail_util_extract(test_info, thumbnail_completed_cb, NULL, &request_id);
+ ret = thumbnail_util_create(&test_info);
+ if (ret != THUMBNAIL_UTIL_ERROR_NONE)
+ goto FINALIZE;
- if (ret != THUMBNAIL_UTIL_ERROR_NONE) {
- g_main_loop_quit(g_loop);
- _retv = ret;
- }
-
- if (!request_id)
- {
- _retv = THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER;
- }
+ ret = thumbnail_util_set_path(test_info, (const char *)data);
+ if (ret != THUMBNAIL_UTIL_ERROR_NONE)
+ goto FINALIZE;
- thumbnail_util_destroy(test_info);
- SAFE_FREE(request_id);
+ ret = thumbnail_util_set_size(test_info, THUMB_WIDTH, THUMB_HEIGHT);
+ if (ret != THUMBNAIL_UTIL_ERROR_NONE)
+ goto FINALIZE;
- return false;
-}
-
-gboolean extract_thumbnail_start_n(gpointer data)
-{
- int ret = THUMBNAIL_UTIL_ERROR_NONE;
- char *request_id = NULL;
-
- thumbnail_h test_info;
- thumbnail_util_create(&test_info);
- thumbnail_util_set_path(test_info, g_unsupported_image_path);
- thumbnail_util_set_size(test_info, MEDIA_IMAGE_WIDTH, MEDIA_IMAGE_HEIGHT);
ret = thumbnail_util_extract(test_info, thumbnail_completed_cb, NULL, &request_id);
+ FREE_MEMORY(request_id);
- if (ret != THUMBNAIL_UTIL_ERROR_NONE) {
- g_main_loop_quit(g_loop);
- _retv = ret;
- }
-
- if (!request_id)
- {
- _retv = THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER;
- }
+ FINALIZE:
+ if (test_info)
+ thumbnail_util_destroy(test_info);
- thumbnail_util_destroy(test_info);
- SAFE_FREE(request_id);
+ _retv = ret;
+ if (_retv != THUMBNAIL_UTIL_ERROR_NONE)
+ g_main_loop_quit(g_loop);
- return false;
+ return FALSE;
}
-
/**
* @testcase utc_thumbnail_util_extract_n1
* @since_tizen 2.4
*/
int utc_thumbnail_util_extract_n1(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
char *request_id = NULL;
- int ret = thumbnail_util_extract(g_thumb_h, thumbnail_completed_cb, NULL, &request_id);
+ thumbnail_h test_info = NULL;
+ ret = thumbnail_util_create(&test_info);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+
+ ret = thumbnail_util_extract(test_info, thumbnail_completed_cb, NULL, &request_id);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
- SAFE_FREE(request_id);
+ FREE_MEMORY(request_id);
+
+ ret = thumbnail_util_destroy(test_info);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+
return 0;
}
*/
int utc_thumbnail_util_extract_n2(void)
{
- assert_eq(_startup_error, 0);
g_loop = g_main_loop_new(NULL, false);
context = g_main_loop_get_context(g_loop);
source = g_idle_source_new();
- g_source_set_callback (source, extract_thumbnail_start_n, NULL, NULL);
- g_source_attach (source, context);
+ g_source_set_callback(source, extract_thumbnail_start, (gpointer) g_unsupported_image_path, NULL);
+ g_source_attach(source, context);
g_main_loop_run(g_loop);
g_main_loop_unref(g_loop);
*/
int utc_thumbnail_util_extract_p(void)
{
- assert_eq(_startup_error, 0);
-
g_loop = g_main_loop_new(NULL, false);
context = g_main_loop_get_context(g_loop);
source = g_idle_source_new();
- g_source_set_callback (source, extract_thumbnail_start, NULL, NULL);
- g_source_attach (source, context);
+ g_source_set_callback(source, extract_thumbnail_start, (gpointer) g_image_path, NULL);
+ g_source_attach(source, context);
g_main_loop_run(g_loop);
g_main_loop_unref(g_loop);
*/
int utc_thumbnail_util_set_path_n(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
- int ret = thumbnail_util_set_path(g_thumb_h, NULL);
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ ret = thumbnail_util_set_path(thumb, NULL);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
+ ret = thumbnail_util_destroy(thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+
return 0;
}
*/
int utc_thumbnail_util_set_path_p(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
+
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
- int ret = thumbnail_util_set_path(g_thumb_h, g_image_path);
+ ret = thumbnail_util_set_path(thumb, g_image_path);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ ret = thumbnail_util_destroy(thumb);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
return 0;
*/
int utc_thumbnail_util_set_size_n(void)
{
- assert_eq(_startup_error, 0);
-
- int ret = thumbnail_util_set_size(NULL, MEDIA_IMAGE_WIDTH, MEDIA_IMAGE_HEIGHT);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ ret = thumbnail_util_set_size(NULL, THUMB_WIDTH, THUMB_HEIGHT);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_set_size_p(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
- int ret = thumbnail_util_set_size(g_thumb_h, MEDIA_IMAGE_WIDTH, MEDIA_IMAGE_HEIGHT);
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ ret = thumbnail_util_set_size(thumb, THUMB_WIDTH, THUMB_HEIGHT);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
- return 0;
+ ret = thumbnail_util_destroy(thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ return 0;
}
/**
*/
int utc_thumbnail_util_cancel_n(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
- int ret = thumbnail_util_cancel(g_thumb_h, NULL);
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ ret = thumbnail_util_cancel(thumb, NULL);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
+ ret = thumbnail_util_destroy(thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+
return 0;
}
-void thumbnail_cancel_cb(thumbnail_util_error_e error, int request_id, const char *path, int raw_width, int raw_height, unsigned char *raw_data, int raw_size, void *user_data)
+void thumbnail_cancel_cb(thumbnail_util_error_e e, const char *id, int width, int height, unsigned char *data, int size, void *user_data)
{
- return;
}
/**
*/
int utc_thumbnail_util_cancel_p(void)
{
- assert_eq(_startup_error, 0);
int ret = THUMBNAIL_UTIL_ERROR_NONE;
char *request_id = NULL;
+ thumbnail_h test_info = NULL;
- thumbnail_h test_info;
thumbnail_util_create(&test_info);
thumbnail_util_set_path(test_info, g_image_path);
- thumbnail_util_set_size(test_info, MEDIA_IMAGE_WIDTH, MEDIA_IMAGE_HEIGHT);
- ret = thumbnail_util_extract(test_info, thumbnail_cancel_cb, NULL, &request_id);
- if(request_id) {
- free(request_id);
- request_id = NULL;
- }
- ret = thumbnail_util_extract(test_info, thumbnail_cancel_cb, NULL, &request_id);
+ thumbnail_util_set_size(test_info, THUMB_WIDTH, THUMB_HEIGHT);
- ret = thumbnail_util_cancel(g_thumb_h, request_id);
+ ret = thumbnail_util_extract(test_info, thumbnail_cancel_cb, NULL, &request_id);
+ FREE_MEMORY(request_id);
+ ret = thumbnail_util_extract(test_info, thumbnail_cancel_cb, NULL, &request_id);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
- if(request_id) {
- free(request_id);
- request_id = NULL;
- }
+ ret = thumbnail_util_cancel(test_info, request_id);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ FREE_MEMORY(request_id);
return 0;
*/
int utc_thumbnail_util_destroy_n(void)
{
- int ret = thumbnail_util_destroy(NULL);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ ret = thumbnail_util_destroy(NULL);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_destroy_p(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
+ thumbnail_h thumb = NULL;
- int ret = thumbnail_util_destroy(g_thumb_h);
- g_thumb_h = NULL;
+ ret = thumbnail_util_create(&thumb);
+ assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
+ ret = thumbnail_util_destroy(thumb);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
return 0;
*/
int utc_thumbnail_util_extract_to_file_n1(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
- int ret = thumbnail_util_extract_to_file(NULL, 320, 240, g_thumb_path);
+ ret = thumbnail_util_extract_to_file(NULL, THUMB_WIDTH, THUMB_HEIGHT, g_thumb_path);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_extract_to_file_n2(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
- int ret = thumbnail_util_extract_to_file(g_unsupported_image_path, 320, 240, g_thumb_path);
+ ret = thumbnail_util_extract_to_file(g_unsupported_image_path, THUMB_WIDTH, THUMB_HEIGHT, g_thumb_path);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT);
return 0;
*/
int utc_thumbnail_util_extract_to_file_n3(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
- int ret = thumbnail_util_extract_to_file(g_video_path, 320, 240, g_unsupported_thumb_path);
+ ret = thumbnail_util_extract_to_file(g_video_path, THUMB_WIDTH, THUMB_HEIGHT, g_unsupported_thumb_path);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_extract_to_file_p1(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
- int ret = thumbnail_util_extract_to_file(g_image_path, 320, 240, g_thumb_path);
+ ret = thumbnail_util_extract_to_file(g_image_path, THUMB_WIDTH, THUMB_HEIGHT, g_thumb_path);
if (g_file_test(g_thumb_path, G_FILE_TEST_IS_REGULAR)) {
unlink(g_thumb_path);
} else {
*/
int utc_thumbnail_util_extract_to_file_p2(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
- int ret = thumbnail_util_extract_to_file(g_video_path, 320, 240, g_thumb_path);
+ ret = thumbnail_util_extract_to_file(g_video_path, THUMB_WIDTH, THUMB_HEIGHT, g_thumb_path);
if (g_file_test(g_thumb_path, G_FILE_TEST_IS_REGULAR)) {
unlink(g_thumb_path);
} else {
*/
int utc_thumbnail_util_extract_to_buffer_n1(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
unsigned char *buf = NULL;
unsigned int width = 0;
unsigned int height = 0;
size_t size = 0;
- int ret = thumbnail_util_extract_to_buffer(NULL, 320, 240, &buf, &size, &width, &height);
+ ret = thumbnail_util_extract_to_buffer(NULL, THUMB_WIDTH, THUMB_HEIGHT, &buf, &size, &width, &height);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_thumbnail_util_extract_to_buffer_n2(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
unsigned char *buf = NULL;
unsigned int width = 0;
unsigned int height = 0;
size_t size = 0;
- int ret = thumbnail_util_extract_to_buffer(g_unsupported_image_path, 320, 240, &buf, &size, &width, &height);
+ ret = thumbnail_util_extract_to_buffer(g_unsupported_image_path, THUMB_WIDTH, THUMB_HEIGHT, &buf, &size, &width, &height);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT);
return 0;
*/
int utc_thumbnail_util_extract_to_buffer_p1(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
unsigned char *buf = NULL;
unsigned int width = 0;
unsigned int height = 0;
size_t size = 0;
- int ret = thumbnail_util_extract_to_buffer(g_image_path, 320, 240, &buf, &size, &width, &height);
- if (buf != NULL && size > 0) {
- free(buf);
- buf = NULL;
- } else {
- ret = THUMBNAIL_UTIL_ERROR_INVALID_OPERATION;
- }
-
+ ret = thumbnail_util_extract_to_buffer(g_image_path, THUMB_WIDTH, THUMB_HEIGHT, &buf, &size, &width, &height);
+ FREE_MEMORY(buf);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
return 0;
*/
int utc_thumbnail_util_extract_to_buffer_p2(void)
{
- assert_eq(_startup_error, 0);
+ int ret = THUMBNAIL_UTIL_ERROR_NONE;
unsigned char *buf = NULL;
unsigned int width = 0;
unsigned int height = 0;
size_t size = 0;
- int ret = thumbnail_util_extract_to_buffer(g_video_path, 320, 240, &buf, &size, &width, &height);
- if (buf != NULL && size > 0) {
- free(buf);
- buf = NULL;
- } else {
- ret = THUMBNAIL_UTIL_ERROR_INVALID_OPERATION;
- }
-
+ ret = thumbnail_util_extract_to_buffer(g_video_path, THUMB_WIDTH, THUMB_HEIGHT, &buf, &size, &width, &height);
+ FREE_MEMORY(buf);
assert_eq(ret, THUMBNAIL_UTIL_ERROR_NONE);
return 0;