From 165a06a6d386666818cbd3ae1bc5c88be5c9418f Mon Sep 17 00:00:00 2001 From: antognolli Date: Fri, 23 Mar 2012 20:18:22 +0000 Subject: [PATCH] emotion/generic-vlc: Change playing position before start playing. This will avoid that a video that reached its end starts playing from that end when started again. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@69592 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/examples/emotion_generic_example.c | 3 ++- src/generic_players/vlc/emotion_generic_vlc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/examples/emotion_generic_example.c b/src/examples/emotion_generic_example.c index 53398c8..b838286 100644 --- a/src/examples/emotion_generic_example.c +++ b/src/examples/emotion_generic_example.c @@ -21,6 +21,7 @@ _playback_started_cb(void *data, Evas_Object *o, void *event_info) static void _playback_stopped_cb(void *data, Evas_Object *o, void *event_info) { + printf("Emotion playback stopped.\n"); emotion_object_play_set(o, EINA_FALSE); emotion_object_position_set(o, 0); } @@ -35,7 +36,7 @@ _create_emotion_object(Evas *e) evas_object_smart_callback_add( em, "playback_started", _playback_started_cb, NULL); evas_object_smart_callback_add( - em, "playback_stopped", _playback_stopped_cb, NULL); + em, "playback_finished", _playback_stopped_cb, NULL); return em; } diff --git a/src/generic_players/vlc/emotion_generic_vlc.c b/src/generic_players/vlc/emotion_generic_vlc.c index 266ae65..72649ac 100644 --- a/src/generic_players/vlc/emotion_generic_vlc.c +++ b/src/generic_players/vlc/emotion_generic_vlc.c @@ -310,8 +310,8 @@ _play(struct _App *app) else { libvlc_time_t new_time = pos * 1000; - libvlc_media_player_play(app->mp); libvlc_media_player_set_time(app->mp, new_time); + libvlc_media_player_play(app->mp); app->playing = 1; } } -- 2.7.4