Commit 2963913a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Utils: rename time-to-string function

parent f6e6c40b
......@@ -59,13 +59,13 @@ create_image(Evas_Object *parent, const char *image_path)
}
char *
duration_string(int64_t duration)
media_timetostr(int64_t time)
{
lldiv_t d;
long long sec;
char *str;
d = lldiv(duration, 60);
d = lldiv(time, 60);
sec = d.rem;
d = lldiv(d.quot, 60);
asprintf(&str, "%02lld:%02lld:%02lld", d.quot, d.rem, sec);
......
......@@ -33,7 +33,7 @@ Evas_Object*
create_image(Evas_Object *parent, const char *image_path);
char *
duration_string(int64_t duration);
media_timetostr(int64_t time);
#endif /* UTILS_H_ */
......@@ -102,7 +102,7 @@ ps_on_new_len_cb(playback_service *p_ps, void *p_user_data, double i_len)
{
view_sys *vd = p_user_data;
char *str = duration_string((int64_t)i_len);
char *str = media_timetostr((int64_t)i_len);
elm_object_text_set(vd->duration_text, str);
free(str);
}
......@@ -113,7 +113,7 @@ ps_on_new_time_cb(playback_service *p_ps, void *p_user_data, double i_time, doub
view_sys *vd = p_user_data;
elm_slider_value_set(vd->progress_slider, i_pos);
char *str = duration_string((int64_t)i_time);
char *str = media_timetostr((int64_t)i_time);
elm_object_text_set(vd->time_text, str);
free(str);
}
......
......@@ -93,7 +93,7 @@ genlist_text_get_cb(void *data, Evas_Object *obj, const char *part)
if(vli->p_media_item->i_duration < 0)
return NULL;
else
return duration_string(vli->p_media_item->i_duration/1000);
return media_timetostr(vli->p_media_item->i_duration/1000);
}
else if (!strcmp(part, "elm.text.sub.right.bottom")) {
if (vli->p_media_item->i_w <= 0 || vli->p_media_item->i_h <= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment