summaryrefslogtreecommitdiff
path: root/legacy/emotion/src
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-03-23 20:18:22 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-03-23 20:18:22 +0000
commitc40be46fc4a0c7bc66ccee684c2d6f2ad9450d28 (patch)
tree4ef80d5dea887c9e97f674491f07ee2cbf2dd1e0 /legacy/emotion/src
parenta39a4f612e629509bcc457855bb769b53df4fe57 (diff)
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
Diffstat (limited to 'legacy/emotion/src')
-rw-r--r--legacy/emotion/src/examples/emotion_generic_example.c3
-rw-r--r--legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c2
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)
21static void 21static void
22_playback_stopped_cb(void *data, Evas_Object *o, void *event_info) 22_playback_stopped_cb(void *data, Evas_Object *o, void *event_info)
23{ 23{
24 printf("Emotion playback stopped.\n");
24 emotion_object_play_set(o, EINA_FALSE); 25 emotion_object_play_set(o, EINA_FALSE);
25 emotion_object_position_set(o, 0); 26 emotion_object_position_set(o, 0);
26} 27}
@@ -35,7 +36,7 @@ _create_emotion_object(Evas *e)
35 evas_object_smart_callback_add( 36 evas_object_smart_callback_add(
36 em, "playback_started", _playback_started_cb, NULL); 37 em, "playback_started", _playback_started_cb, NULL);
37 evas_object_smart_callback_add( 38 evas_object_smart_callback_add(
38 em, "playback_stopped", _playback_stopped_cb, NULL); 39 em, "playback_finished", _playback_stopped_cb, NULL);
39 40
40 return em; 41 return em;
41} 42}
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)
310 else 310 else
311 { 311 {
312 libvlc_time_t new_time = pos * 1000; 312 libvlc_time_t new_time = pos * 1000;
313 libvlc_media_player_play(app->mp);
314 libvlc_media_player_set_time(app->mp, new_time); 313 libvlc_media_player_set_time(app->mp, new_time);
314 libvlc_media_player_play(app->mp);
315 app->playing = 1; 315 app->playing = 1;
316 } 316 }
317} 317}