Revise some testsuite code 82/221682/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_unified tizen tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.121322 accepted/tizen/6.0/unified/hotfix/20201103.003515 accepted/tizen/6.0/unified/hotfix/20201103.050244 accepted/tizen/unified/20200113.222533 submit/tizen/20200113.065513 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 7 Jan 2020 04:05:39 +0000 (13:05 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 7 Jan 2020 04:07:19 +0000 (13:07 +0900)
[Version] 0.1.16
[Issue Type] Revision

Change-Id: Ia856ed395c73a208340fef10eee288d79feec153

packaging/capi-media-video-util.spec
test/video_util_test.c

index a28049e..d1365eb 100644 (file)
@@ -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
index e62a0de..0b703c7 100644 (file)
@@ -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");