summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-06-08 04:59:37 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-06-08 04:59:37 +0000
commit080e163c6f579796ac390da52b12641c50d91ead (patch)
treed01bcc7b1e38d2a3cf0b365bd3975c47d08d57a7 /legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
parent3b9b38c619c541238ccd50ea36a36ec3c1657620 (diff)
emotion: Add support for "playback_started" callback to generic player.
Patch by Pierre Le Magourou <pierre.lemagourou@openwide.fr> SVN revision: 71830
Diffstat (limited to 'legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c')
-rw-r--r--legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c6
1 files changed, 6 insertions, 0 deletions
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 72649ace9b..4fe1d16fbc 100644
--- a/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
+++ b/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
@@ -23,6 +23,7 @@
23 23
24enum _Thread_Events { 24enum _Thread_Events {
25 EM_THREAD_POSITION_CHANGED, 25 EM_THREAD_POSITION_CHANGED,
26 EM_THREAD_PLAYBACK_STARTED,
26 EM_THREAD_PLAYBACK_STOPPED, 27 EM_THREAD_PLAYBACK_STOPPED,
27 EM_THREAD_LAST 28 EM_THREAD_LAST
28}; 29};
@@ -363,6 +364,8 @@ _event_cb(const struct libvlc_event_t *ev, void *data)
363 break; 364 break;
364 case libvlc_MediaPlayerPlaying: 365 case libvlc_MediaPlayerPlaying:
365 _send_resize(app, app->w, app->h); 366 _send_resize(app, app->w, app->h);
367 thread_event = EM_THREAD_PLAYBACK_STARTED;
368 write(app->fd_write, &thread_event, sizeof(thread_event));
366 break; 369 break;
367 case libvlc_MediaPlayerStopped: 370 case libvlc_MediaPlayerStopped:
368 _send_file_set(app); 371 _send_file_set(app);
@@ -720,6 +723,9 @@ _process_thread_events(struct _App *app)
720 case EM_THREAD_POSITION_CHANGED: 723 case EM_THREAD_POSITION_CHANGED:
721 _position_changed(app); 724 _position_changed(app);
722 break; 725 break;
726 case EM_THREAD_PLAYBACK_STARTED:
727 _send_cmd(app, EM_RESULT_PLAYBACK_STARTED);
728 break;
723 case EM_THREAD_PLAYBACK_STOPPED: 729 case EM_THREAD_PLAYBACK_STOPPED:
724 libvlc_media_player_stop(app->mp); 730 libvlc_media_player_stop(app->mp);
725 app->playing = 0; 731 app->playing = 0;