forked from enlightenment/efl
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
This commit is contained in:
parent
a39a4f612e
commit
c40be46fc4
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue