Commit bfeed644 authored by Thomas Guillem's avatar Thomas Guillem

playback_service: also end i_pos from cb

parent 330e6732
......@@ -97,7 +97,10 @@ ps_emotion_position_update_cb(void *data, Evas_Object *obj, void *event)
else
{
double i_time = emotion_object_position_get(obj);
PS_SEND_CALLBACK(pf_on_new_time, i_time);
double i_len = emotion_object_play_length_get(obj);
double i_pos = (i_time > 0.0 && i_len > 0.0) ? i_time / i_len : 0.0;
PS_SEND_CALLBACK(pf_on_new_time, i_time, i_pos);
}
}
......
......@@ -44,7 +44,7 @@ struct playback_service_callbacks
void (*pf_on_started)(playback_service *p_ps, void *p_user_data, media_item *p_mi);
void (*pf_on_stopped)(playback_service *p_ps, void *p_user_data, media_item *p_mi);
void (*pf_on_new_len)(playback_service *p_ps, void *p_user_data, double i_len);
void (*pf_on_new_time)(playback_service *p_ps, void *p_user_data, double i_time);
void (*pf_on_new_time)(playback_service *p_ps, void *p_user_data, double i_time, double i_pos);
void (*pf_on_seek_done)(playback_service *p_ps, void *p_user_data);
void *p_user_data;
};
......
......@@ -947,7 +947,7 @@ mini_player_fullscreen_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_
}
static void
ps_on_new_time_cb(playback_service *p_ps, void *p_user_data, double i_time)
ps_on_new_time_cb(playback_service *p_ps, void *p_user_data, double i_time, double i_pos)
{
mini_player *mpd = p_user_data;
......
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