From c40be46fc4a0c7bc66ccee684c2d6f2ad9450d28 Mon Sep 17 00:00:00 2001 From: Rafael 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. SVN revision: 69592 --- legacy/emotion/src/examples/emotion_generic_example.c | 3 ++- legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/legacy/emotion/src/examples/emotion_generic_example.c b/legacy/emotion/src/examples/emotion_generic_example.c index 53398c86d4..b8382862d5 100644 --- a/legacy/emotion/src/examples/emotion_generic_example.c +++ b/legacy/emotion/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/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c b/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c index 266ae65019..72649ace9b 100644 --- a/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c +++ b/legacy/emotion/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; } }