summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-03-23 19:42:38 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-03-23 19:42:38 +0000
commita39a4f612e629509bcc457855bb769b53df4fe57 (patch)
tree536510e11a4faf87894b26a6ca023dae15f4ed75 /legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c
parent8e73b14577f737c918dd9a41fed7075220064123 (diff)
emotion/generic-vlc: Don't try to stop the player from event thread.
Must send the command through the pipe so the main thread can stop it. SVN revision: 69591
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/generic_players/vlc/emotion_generic_vlc.c9
1 files changed, 8 insertions, 1 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 feecac3285..266ae65019 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_STOPPED,
26 EM_THREAD_LAST 27 EM_THREAD_LAST
27}; 28};
28 29
@@ -367,7 +368,8 @@ _event_cb(const struct libvlc_event_t *ev, void *data)
367 _send_file_set(app); 368 _send_file_set(app);
368 break; 369 break;
369 case libvlc_MediaPlayerEndReached: 370 case libvlc_MediaPlayerEndReached:
370 _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); 371 thread_event = EM_THREAD_PLAYBACK_STOPPED;
372 write(app->fd_write, &thread_event, sizeof(thread_event));
371 break; 373 break;
372 } 374 }
373} 375}
@@ -718,6 +720,11 @@ _process_thread_events(struct _App *app)
718 case EM_THREAD_POSITION_CHANGED: 720 case EM_THREAD_POSITION_CHANGED:
719 _position_changed(app); 721 _position_changed(app);
720 break; 722 break;
723 case EM_THREAD_PLAYBACK_STOPPED:
724 libvlc_media_player_stop(app->mp);
725 app->playing = 0;
726 _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED);
727 break;
721 } 728 }
722} 729}
723 730