From 7b3fe6bf23910684e2a5b7c64b20b7e4995af666 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Tue, 7 Jan 2020 13:05:39 +0900 Subject: [PATCH] Revise some testsuite code [Version] 0.1.16 [Issue Type] Revision Change-Id: Ia856ed395c73a208340fef10eee288d79feec153 --- packaging/capi-media-video-util.spec | 2 +- test/video_util_test.c | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/packaging/capi-media-video-util.spec b/packaging/capi-media-video-util.spec index a28049e..d1365eb 100644 --- a/packaging/capi-media-video-util.spec +++ b/packaging/capi-media-video-util.spec @@ -1,6 +1,6 @@ Name: capi-media-video-util Summary: A Video Utility library in Tizen Native API -Version: 0.1.15 +Version: 0.1.16 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/test/video_util_test.c b/test/video_util_test.c index e62a0de..0b703c7 100644 --- a/test/video_util_test.c +++ b/test/video_util_test.c @@ -70,9 +70,9 @@ typedef struct { test_util_s *_util_s; -static void display_sub_basic(); +static void _display_sub_basic(void); static void _video_util_start_transcoding(test_util_s *util_s); -static void _reset_var(); +static void _reset_var(void); void _quit_program(void) { @@ -237,17 +237,14 @@ static void _video_util_start_transcoding(test_util_s *util_s) LOGI("input start_time: %lu, duration: %lu, output_file_path: %s", util_s->start_time, util_s->duration, output_file_path); ret = video_util_start_transcoding(util_s->video_h, util_s->start_time, util_s->duration, output_file_path, _transcode_progress_cb, _transcode_completed_cb, util_s); - if (ret != VIDEO_UTIL_ERROR_NONE) { + if (ret != VIDEO_UTIL_ERROR_NONE) LOGE("video_util_start_transcoding is failed (%d)", ret); - g_free(output_file_path); - return; - } g_free(output_file_path); return; } -static void _reset_var() +static void _reset_var(void) { if (video_h) { video_util_destroy(video_h); @@ -275,7 +272,6 @@ static void input_filename(char *filename) { int len = strlen(filename); int ret = VIDEO_UTIL_ERROR_NONE; - gchar *g_uri = NULL; if (len < 0 || len > MAX_STRING_LEN - 1) { LOGE("Input file name is wrong"); @@ -292,23 +288,17 @@ static void input_filename(char *filename) video_h = NULL; ret = video_util_create(&video_h); - if (ret != VIDEO_UTIL_ERROR_NONE) { LOGE("video_util create is failed (%d)", ret); return; } - g_uri = g_strndup(filename, len); - - ret = video_util_set_file_path(video_h, g_uri); + ret = video_util_set_file_path(video_h, filename); if (ret != VIDEO_UTIL_ERROR_NONE) { LOGE("video_util_set_file_path is failed"); - g_free(g_uri); return; } - g_free(g_uri); - _supported_spec_check(video_h); } @@ -400,7 +390,7 @@ void _interpret_main_menu(char *cmd) static void displaymenu(void) { if (g_menu_state == CURRENT_STATUS_MAINMENU) { - display_sub_basic(); + _display_sub_basic(); } else if (g_menu_state == CURRENT_STATUS_FILENAME) { g_print("*** input mediapath.\n"); } else if (g_menu_state == CURRENT_STATUS_SET_FORMAT) { @@ -636,7 +626,7 @@ static void interpret(char *cmd) g_timeout_add(100, timeout_menu_display, 0); } -static void display_sub_basic() +static void _display_sub_basic(void) { g_print("\n"); g_print("=========================================================================================\n"); -- 2.7.4