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)
{
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);
{
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");
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);
}
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) {
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");